@font-face { font-family: 'Aref Ruqaa'; src: url('./fonts/ArefRuqaa-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Aref Ruqaa'; src: url('./fonts/ArefRuqaa-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('./fonts/Tajawal-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('./fonts/Tajawal-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('./fonts/Tajawal-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

.aisha {
    margin: -24px;
    padding: 32px 20px 48px;
    min-height: 72vh;
    background: var(--aisha-bg);
    color: var(--aisha-ink);
    font-family: 'Tajawal', Tahoma, "Segoe UI", sans-serif;
    transition: background-color .5s ease, color .5s ease;
}
.aisha section { animation: aisha-fadein .5s ease both; }
@keyframes aisha-fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .aisha section { animation: none; }
    .aisha *, .aisha *::before, .aisha *::after { transition: none !important; }
}

.aisha-brandname, .aisha-hero-title, .aisha-sectionhead h2,
.aisha-cardname, .aisha-productname, .aisha-details h3, .aisha-log h3, .aisha-form h3,
.aisha-nav a, .aisha-btn, .aisha-cardprice, .aisha-productprice,
.aisha-more, .aisha-count, .aisha-footerlinks a, .aisha-tag, .aisha-empty {
    font-family: 'Aref Ruqaa', 'Tajawal', Tahoma, serif;
}
@media (min-width: 768px) {
    .aisha { margin: -36px; padding: 40px 36px 56px; }
}
.aisha--noor { --aisha-bg: #faf5ec; --aisha-ink: #2e2416; --aisha-accent: #a8842c; --aisha-soft: #f1e7d3; --aisha-card: #fffdf8; --aisha-hairline: #e3d6ba; }
.aisha--layl { --aisha-bg: #141118; --aisha-ink: #f2e9d8; --aisha-accent: #d4af6a; --aisha-soft: #211c29; --aisha-card: #221d2b; --aisha-hairline: #3a3345; }
.aisha--ward { --aisha-bg: #f9eef0; --aisha-ink: #40222b; --aisha-accent: #b76e79; --aisha-soft: #f3dfe2; --aisha-card: #fffafa; --aisha-hairline: #e8ccd1; }

.aisha h2, .aisha h3 { color: var(--aisha-ink); }

.aisha-ornament { color: var(--aisha-accent); display: flex; justify-content: center; margin: 14px 0; }

.aisha-top { display: flex; flex-direction: column; gap: 16px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--aisha-hairline); margin-bottom: 30px; }
.aisha-brandmark { display: flex; align-items: center; gap: 12px; color: var(--aisha-accent); }
.aisha-brandwords { display: flex; flex-direction: column; }
.aisha-brandname { font-size: 30px; font-weight: 700; letter-spacing: 0; color: var(--aisha-ink); line-height: 1.15; }
.aisha-brandsub { font-size: 11px; letter-spacing: 3.5px; color: var(--aisha-accent); direction: ltr; text-align: start; }

.aisha-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.aisha-nav a {
    padding: 8px 18px; border-radius: 999px; font-size: 14px; text-decoration: none;
    color: var(--aisha-ink); border: 1px solid var(--aisha-hairline); background: var(--aisha-card);
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.aisha-nav a:hover { border-color: var(--aisha-accent); color: var(--aisha-accent); transform: translateY(-1px); }
.aisha-nav a[aria-current="page"] { background: var(--aisha-accent); border-color: var(--aisha-accent); color: var(--aisha-bg); font-weight: 700; }
.aisha-nav a[aria-current="page"]:hover { color: var(--aisha-bg); transform: none; }

.aisha-hero { text-align: center; padding: 30px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.aisha-hero .aisha-brandmark { transform: scale(1.25); margin-bottom: 10px; }
.aisha-hero-title { font-size: 26px; font-weight: 700; margin: 6px 0 0; }
@media (min-width: 768px) { .aisha-hero-title { font-size: 34px; } }
.aisha-hero-sub { color: var(--aisha-accent); font-size: 14px; margin: 0; letter-spacing: 0.5px; }
.aisha-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.aisha-btn {
    display: inline-block; padding: 12px 24px; border-radius: 999px; font-size: 15px; font-weight: 700;
    text-decoration: none; border: 1px solid var(--aisha-accent); cursor: pointer; font-family: inherit;
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, opacity .25s ease;
}
.aisha-btn--primary { background: var(--aisha-accent); color: var(--aisha-bg); }
.aisha-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px var(--aisha-accent); }
.aisha-btn--ghost { background: transparent; color: var(--aisha-accent); }
.aisha-btn--ghost:hover { background: var(--aisha-soft); }
.aisha-btn--disabled { background: var(--aisha-soft); border-color: var(--aisha-hairline); color: var(--aisha-ink); opacity: 0.6; cursor: default; }
.aisha-btn:disabled { opacity: 0.5; cursor: default; }

.aisha-sectionhead { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 14px; border-bottom: 1px solid var(--aisha-hairline); padding-bottom: 8px; }
.aisha-sectionhead h2 { font-size: 20px; margin: 0; }
.aisha-more { color: var(--aisha-accent); font-size: 13px; text-decoration: none; }
.aisha-count { color: var(--aisha-accent); font-size: 13px; }

.aisha-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .aisha-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.aisha-card {
    display: flex; flex-direction: column; background: var(--aisha-card); border: 1px solid var(--aisha-hairline);
    border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.aisha-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgba(46, 36, 22, .25); border-color: var(--aisha-accent); }
.aisha-cardimg { position: relative; aspect-ratio: 3 / 4; background: var(--aisha-soft); overflow: hidden; }
.aisha-cardimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.aisha-card:hover .aisha-cardimg img { transform: scale(1.04); }
.aisha-tag {
    position: absolute; top: 10px; inset-inline-start: 10px; background: var(--aisha-accent); color: var(--aisha-bg);
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.aisha-cardbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.aisha-cardname { font-size: 16px; font-weight: 700; }
.aisha-cardprice { font-size: 16px; color: var(--aisha-accent); font-weight: 700; }
.aisha-stock { font-size: 13px; opacity: 0.85; }
.aisha-stock--in { color: #4c8a5a; }
.aisha--layl .aisha-stock--in { color: #7fbf8e; }
.aisha-stock--low { color: #b06f1f; }
.aisha--layl .aisha-stock--low { color: #dba255; }
.aisha-stock--out { color: #b3403c; text-decoration: line-through; }
.aisha--layl .aisha-stock--out { color: #d97a74; }

.aisha-product { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .aisha-product { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; } }
.aisha-productimg { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--aisha-hairline); background: var(--aisha-soft); }
.aisha-productimg img { width: 100%; display: block; }
.aisha-productinfo { display: flex; flex-direction: column; gap: 10px; }
.aisha-productname { font-size: 28px; margin: 0; }
.aisha-productprice { font-size: 26px; font-weight: 700; color: var(--aisha-accent); }
.aisha-details h3 { font-size: 17px; margin: 0 0 4px; color: var(--aisha-accent); }
.aisha-details p { font-size: 16px; line-height: 1.9; margin: 0 0 6px; }

.aisha-about { text-align: center; margin: 34px auto 0; max-width: 560px; }
.aisha-about p { font-size: 15px; line-height: 2; margin: 8px 0; }

.aisha-note { font-size: 13px; opacity: 0.85; line-height: 1.9; margin-top: 18px; }
.aisha-empty { text-align: center; padding: 30px 0; font-size: 15px; }
.aisha-emptywrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.aisha-stocklist { display: flex; flex-direction: column; }
.aisha-stockrow {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 0; border-bottom: 1px solid var(--aisha-hairline);
}
.aisha-stockrow-main { display: flex; align-items: center; gap: 12px; }
.aisha-thumb { width: 52px; height: 66px; object-fit: cover; border-radius: 8px; border: 1px solid var(--aisha-hairline); }
.aisha-stockctl { display: flex; gap: 8px; }
.aisha-mini {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--aisha-accent);
    background: var(--aisha-card); color: var(--aisha-accent); font-size: 20px; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.aisha-mini:hover { background: var(--aisha-accent); color: var(--aisha-bg); }
.aisha-mini:active { transform: scale(.94); }
.aisha-mini--wide { width: auto; padding: 0 14px; font-size: 13px; height: 34px; }
.aisha-mini--danger { border-color: #b3403c; color: #b3403c; }
.aisha-mini--danger:hover { background: #b3403c; color: #fff; }
.aisha-footerlinks a { color: var(--aisha-accent); font-size: 14px; text-decoration: none; font-weight: 700; transition: opacity .25s ease; }
.aisha-footerlinks a:hover { opacity: .7; }

.aisha-log { margin-top: 22px; }
.aisha-log h3 { font-size: 15px; color: var(--aisha-accent); margin: 0 0 8px; }
.aisha-logrow { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--aisha-hairline); }
.aisha-logdate { opacity: 0.7; }

.aisha-form {
    background: var(--aisha-card); border: 1px solid var(--aisha-hairline); border-radius: 14px;
    padding: 16px; display: flex; flex-direction: column; gap: 10px; margin: 14px 0 20px; color: #251f21;
}
.aisha-form h3 { margin: 0; font-size: 16px; color: var(--aisha-accent); }
.aisha-form--inline { margin: 10px 0 4px; }

.aisha-adminrow { padding: 12px 0; border-bottom: 1px solid var(--aisha-hairline); display: flex; flex-direction: column; gap: 8px; }
.aisha-adminactions { display: flex; gap: 8px; flex-wrap: wrap; }

.aisha-themepicker { margin-top: 14px; display: flex; justify-content: center; }
.aisha-footer { margin-top: 40px; text-align: center; }
.aisha-footerlinks { display: flex; gap: 18px; justify-content: center; margin-top: 12px; }
.aisha-footnote { font-size: 12px; opacity: 0.75; margin-top: 12px; }
.aisha-sharebox {
    margin: 18px auto 0; max-width: 420px; text-align: center;
    background: var(--aisha-card); border: 1px solid var(--aisha-hairline); border-radius: 14px;
    padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.aisha-sharetitle { margin: 0; font-size: 14px; font-weight: 700; color: var(--aisha-accent); }
.aisha-sharelink { margin: 0; font-size: 11.5px; opacity: 0.65; direction: ltr; word-break: break-all; }
.aisha-shareactions { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }


.aisha .file-control-label { color: var(--aisha-ink); opacity: 0.85; }

/* ---- standalone page adaptation (replaces the hosted-card offsets) ---- */
html.aisha { margin: 0; padding: 0; min-height: 100vh; }
html.aisha body { margin: 0 auto; padding: 28px 20px 48px; max-width: 1024px; }
@media (min-width: 768px) { html.aisha body { padding: 40px 36px 56px; } }
html.aisha .aisha { margin: 0; }

/* ---- auth + staff UI ---- */
.aisha-demobar {
    background: var(--aisha-accent); color: var(--aisha-bg); text-align: center;
    font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.aisha-sessionbar { text-align: center; font-size: 13px; margin-bottom: 10px; opacity: .9; }
.aisha-linkbtn { background: none; border: none; color: var(--aisha-accent); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.aisha-loginwrap { display: flex; justify-content: center; padding: 24px 0; }
.aisha-login { width: 100%; max-width: 380px; }
.aisha-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: inherit; }
.aisha-form input, .aisha-form textarea {
    border: 1px solid var(--aisha-hairline); border-radius: 10px; padding: 10px 12px; font: inherit;
    background: var(--aisha-bg); color: var(--aisha-ink); transition: border-color .25s ease, box-shadow .25s ease;
}
.aisha-form input:focus, .aisha-form textarea:focus { outline: none; border-color: var(--aisha-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aisha-accent) 20%, transparent); }
.aisha-form { color: var(--aisha-ink); }
.aisha-error { color: #b3403c; font-size: 13px; margin: 0; }
.aisha-themes { display: flex; gap: 8px; justify-content: center; }
.aisha-themebtn {
    border: 1px solid var(--aisha-hairline); background: var(--aisha-card); color: var(--aisha-ink);
    border-radius: 999px; padding: 6px 16px; font: inherit; font-size: 13px; cursor: pointer;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.aisha-themebtn.is-on { background: var(--aisha-accent); border-color: var(--aisha-accent); color: var(--aisha-bg); font-weight: 700; }
