/* =====================================================================
   Attar Group storefront — marketplace style
   Loaded after theme.css. Every new component uses the "as-" prefix.
   ===================================================================== */

:root {
    --as-ink: #0f1419;
    --as-ink-2: #1b2631;
    --as-ink-3: #273644;
    --as-blue: #4dbef8;
    --as-blue-600: #1ea7ef;
    --as-blue-700: #0b86c8;
    --as-blue-50: #e9f7fe;
    --as-link: #0a6fa8;
    --as-bg: #eef1f3;
    --as-card: #ffffff;
    --as-line: #dde3e8;
    --as-text: #0f1111;
    --as-muted: #565959;
    --as-deal: #cc0c39;
    --as-green: #067d62;
    --as-star: #ffa41c;
    --as-radius: 10px;
    --as-shadow: 0 1px 2px rgba(15, 20, 25, .08), 0 2px 8px rgba(15, 20, 25, .06);
    --as-font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ---------- Base ---------- */
html, body { background: var(--as-bg); }
body.as-body {
    font-family: var(--as-font);
    color: var(--as-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body.as-body h1, body.as-body h2, body.as-body h3, body.as-body h4, body.as-body h5, body.as-body h6,
body.as-body .btn, body.as-body input, body.as-body select, body.as-body textarea, body.as-body button {
    font-family: var(--as-font);
}
/* Older pages still carry inline "font-family: baloo" — unify them with the new font */
body.as-body [style*="baloo"] { font-family: var(--as-font) !important; }
body.as-body a { color: var(--as-link); }
body.as-body a:hover { color: var(--as-blue-700); }
[dir="rtl"] body.as-body { text-align: right; }
.as-wrap { max-width: 1500px; margin: 0 auto; padding: 0 16px; }
.as-main { min-height: 50vh; padding-bottom: 32px; }
.as-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Electro theme helpers that fight the new layout */
body.as-body .container { max-width: 1500px; }
body.as-body .text-primary { color: var(--as-blue-700) !important; }
body.as-body .bg-primary { background-color: var(--as-blue) !important; }
body.as-body .btn-primary,
body.as-body .btn-primary:not(:disabled):not(.disabled):active {
    background: var(--as-blue); border-color: var(--as-blue); color: var(--as-ink); font-weight: 700;
}
body.as-body .btn-primary:hover, body.as-body .btn-primary:focus {
    background: var(--as-blue-600); border-color: var(--as-blue-600); color: var(--as-ink);
}
body.as-body .form-control {
    border-radius: 8px; border: 1px solid #a6adb4; min-height: 40px; box-shadow: none;
}
body.as-body .form-control:focus { border-color: var(--as-blue-600); box-shadow: 0 0 0 3px rgba(77, 190, 248, .35); }
body.as-body .breadcrumb { background: transparent; padding: 0; margin: 0; font-size: 13px; }

/* ---------- Buttons ---------- */
.as-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important;
    transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap;
}
.as-btn:active { transform: translateY(1px); }
.as-btn:focus-visible { outline: 3px solid rgba(77, 190, 248, .55); outline-offset: 2px; }
.as-btn--primary { background: var(--as-blue); color: var(--as-ink) !important; }
.as-btn--primary:hover { background: var(--as-blue-600); }
.as-btn--dark { background: var(--as-ink); color: #fff !important; }
.as-btn--dark:hover { background: var(--as-ink-3); }
.as-btn--ghost { background: #fff; border-color: #c9d1d8; color: var(--as-text) !important; }
.as-btn--ghost:hover { background: #f5f7f8; }
.as-btn--block { display: flex; width: 100%; }
.as-btn--sm { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.as-btn[disabled] { opacity: .5; cursor: not-allowed; }

.as-link { color: var(--as-link) !important; }
.as-link:hover { color: var(--as-deal) !important; text-decoration: underline; }

/* ---------- Header ---------- */
.as-header { position: sticky; top: 0; z-index: 1030; }
.as-topbar { background: var(--as-ink); color: #fff; }
.as-topbar__row { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.as-logo { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; color: #fff !important; text-decoration: none !important; flex-shrink: 0; }
.as-logo:hover, .as-navlink:hover, .as-hitem:hover { border-color: rgba(255, 255, 255, .8); }
.as-logo img { height: 40px; width: auto; }
.as-logo__text { display: flex; flex-direction: column; line-height: 1; font-family: 'Montserrat', var(--as-font); direction: ltr; }
.as-logo__text b { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.as-logo__text small { font-size: 10px; font-weight: 600; letter-spacing: 5px; color: var(--as-blue); margin-top: 3px; }

.as-hitem {
    display: flex; flex-direction: column; justify-content: center; padding: 6px 8px; border: 1px solid transparent;
    border-radius: 6px; color: #fff !important; text-decoration: none !important; line-height: 1.2; white-space: nowrap; flex-shrink: 0;
    background: none; font: inherit; cursor: pointer;
}
.as-hitem small { font-size: 12px; color: #ccd3d9; }
.as-hitem strong { font-size: 14px; font-weight: 700; }
.as-hitem--icon { flex-direction: row; align-items: center; gap: 6px; }
.as-hitem i { font-size: 18px; }

.as-search { flex: 1; display: flex; position: relative; min-width: 0; }
.as-search form { display: flex; flex: 1; height: 42px; border-radius: 8px; overflow: hidden; background: #fff; }
.as-search form:focus-within { box-shadow: 0 0 0 3px var(--as-blue); }
.as-search__cat {
    border: 0; background: #e6e9ec; color: #333; font-size: 12px; padding: 0 10px; max-width: 140px; cursor: pointer;
    border-inline-end: 1px solid #cfd5da; font-family: var(--as-font);
}
.as-search input { flex: 1; min-width: 0; border: 0; padding: 0 12px; font-size: 16px; outline: none; color: var(--as-text); background: #fff; }
.as-search button[type=submit] { width: 52px; border: 0; background: var(--as-blue); color: var(--as-ink); font-size: 18px; cursor: pointer; }
.as-search button[type=submit]:hover { background: var(--as-blue-600); }
.as-suggest {
    position: absolute; top: calc(100% + 4px); inset-inline: 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    z-index: 1040; overflow: hidden; display: none; max-height: 70vh; overflow-y: auto;
}
.as-suggest.is-open { display: block; }
.as-suggest__item { display: flex; align-items: center; gap: 12px; padding: 8px 14px; color: var(--as-text) !important; text-decoration: none !important; border-bottom: 1px solid #f0f2f4; }
.as-suggest__item:hover, .as-suggest__item.is-active { background: var(--as-blue-50); }
.as-suggest__item img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.as-suggest__name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-suggest__price { font-weight: 700; font-size: 13px; white-space: nowrap; }
.as-suggest__empty { padding: 14px; color: var(--as-muted); }

.as-cart { position: relative; flex-direction: row; align-items: flex-end; gap: 4px; }
.as-cart i { font-size: 30px; }
.as-cart__count {
    position: absolute; top: 2px; inset-inline-start: 22px; min-width: 22px; text-align: center; color: var(--as-blue);
    font-weight: 800; font-size: 15px; line-height: 1;
}
.as-cart strong { padding-bottom: 2px; }

/* Language dropdown */
.as-dd { position: relative; }
.as-dd__menu {
    position: absolute; top: 100%; inset-inline-end: 0; min-width: 180px; background: #fff; border-radius: 8px; padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25); display: none; z-index: 1050;
}
.as-dd:hover .as-dd__menu, .as-dd:focus-within .as-dd__menu { display: block; }
.as-dd__menu a { display: block; padding: 8px 16px; color: var(--as-text) !important; text-decoration: none !important; }
.as-dd__menu a:hover { background: var(--as-blue-50); }
.as-dd__menu a.is-current { font-weight: 700; color: var(--as-blue-700) !important; }

/* Second row */
.as-nav { background: var(--as-ink-2); color: #fff; }
.as-nav__row { display: flex; align-items: center; gap: 2px; min-height: 40px; overflow-x: auto; scrollbar-width: none; }
.as-nav__row::-webkit-scrollbar { display: none; }
.as-navlink {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid transparent; border-radius: 6px;
    color: #fff !important; text-decoration: none !important; font-size: 14px; white-space: nowrap; background: none; cursor: pointer; font-family: var(--as-font);
}
.as-navlink--all { font-weight: 700; }
.as-navlink--accent { color: var(--as-blue) !important; font-weight: 700; }

/* Mega dropdown on desktop */
.as-mega { position: static; }
.as-mega__panel {
    position: absolute; inset-inline: 0; top: 100%; background: #fff; color: var(--as-text); box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
    display: none; z-index: 1035; border-top: 3px solid var(--as-blue);
}
.as-nav { position: relative; }
.as-mega:hover .as-mega__panel, .as-mega:focus-within .as-mega__panel { display: block; }
.as-mega__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 28px; padding: 22px 16px 26px; }
.as-mega__title { font-weight: 800; font-size: 15px; color: var(--as-text) !important; display: block; margin-bottom: 6px; }
.as-mega__grid ul { list-style: none; padding: 0; margin: 0; }
.as-mega__grid li a { display: block; padding: 3px 0; color: var(--as-muted) !important; font-size: 14px; }
.as-mega__grid li a:hover { color: var(--as-blue-700) !important; text-decoration: underline; }

/* Mobile header bits */
.as-msearch { display: none; background: var(--as-ink); padding: 0 12px 10px; }
.as-msearch .as-search form { height: 44px; }
.as-burger { display: none; }

/* ---------- Drawer (All menu) ---------- */
.as-drawer { position: fixed; inset: 0; z-index: 2000; visibility: hidden; }
.as-drawer.is-open { visibility: visible; }
.as-drawer__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); opacity: 0; transition: opacity .25s; }
.as-drawer.is-open .as-drawer__scrim { opacity: 1; }
.as-drawer__panel {
    position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(365px, 86vw); background: #fff; overflow-y: auto;
    transform: translateX(-100%); transition: transform .25s ease;
}
[dir="rtl"] .as-drawer__panel { transform: translateX(100%); }
.as-drawer.is-open .as-drawer__panel { transform: none; }
.as-drawer__head {
    background: var(--as-ink-2); color: #fff; padding: 14px 20px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 2;
}
.as-drawer__head i { font-size: 24px; }
.as-drawer__close {
    position: absolute; top: 10px; inset-inline-start: min(375px, calc(86vw + 10px)); color: #fff; background: none; border: 0; font-size: 30px;
    line-height: 1; cursor: pointer; opacity: 0; transition: opacity .25s;
}
.as-drawer.is-open .as-drawer__close { opacity: 1; }
.as-drawer__sec { padding: 10px 0; border-bottom: 1px solid #d5dbdb; }
.as-drawer__sec h3 { font-size: 17px; font-weight: 800; padding: 8px 20px 4px; margin: 0; color: var(--as-text); }
.as-drawer a.as-dlink, .as-drawer button.as-dlink {
    display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 11px 20px; color: var(--as-text) !important;
    text-decoration: none !important; font-size: 14px; background: none; border: 0; text-align: start; cursor: pointer; font-family: var(--as-font);
}
.as-drawer .as-dlink:hover { background: #eaeded; }
.as-drawer .as-dlink i { color: #8a9399; }
.as-dsub { display: none; background: #f7f9fa; }
.as-dsub.is-open { display: block; }
.as-dsub .as-dlink { padding-inline-start: 34px; font-weight: 600; }
.as-dsub .as-dsub .as-dlink { padding-inline-start: 48px; font-weight: 400; color: var(--as-muted) !important; }
.as-dlink[aria-expanded="true"] i { transform: rotate(90deg); }
[dir="rtl"] .as-dlink[aria-expanded="true"] i { transform: rotate(-90deg); }
[dir="rtl"] .as-dlink .fa-chevron-right::before { content: "\f053"; }

/* ---------- Section cards ---------- */
.as-card { background: var(--as-card); border-radius: var(--as-radius); box-shadow: var(--as-shadow); }
.as-card--pad { padding: 20px; }
.as-sec { margin-top: 20px; }
.as-sec__head { display: flex; align-items: baseline; gap: 16px; padding: 18px 20px 4px; }
.as-sec__title { font-size: 21px; font-weight: 800; margin: 0; color: var(--as-text); }
.as-sec__more { font-size: 14px; font-weight: 600; }

/* ---------- Hero ---------- */
.as-hero { position: relative; max-width: 1500px; margin: 0 auto; }
.as-hero .carousel-item img { width: 100%; height: clamp(180px, 34vw, 520px); object-fit: cover; }
.as-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; pointer-events: none;
    background: linear-gradient(to bottom, rgba(238, 241, 243, 0), var(--as-bg));
}
.as-hero .carousel-control-prev, .as-hero .carousel-control-next { width: 70px; height: 60%; top: 0; bottom: auto; z-index: 2; }
.as-hero .carousel-control-prev-icon, .as-hero .carousel-control-next-icon { width: 34px; height: 34px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.as-hero .carousel-indicators { display: none; }
.as-hero__caption { position: absolute; top: 12%; inset-inline-start: 6%; max-width: 46%; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); z-index: 1; }
.as-hero__caption h2 { font-size: clamp(18px, 2.6vw, 38px); font-weight: 800; color: #fff; margin: 0 0 6px; }
.as-hero__caption p { font-size: clamp(13px, 1.2vw, 18px); margin: 0; }

/* Cards that overlap the hero */
.as-tiles { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(-260px, -16vw, -40px); }
.as-tile { padding: 18px 18px 14px; display: flex; flex-direction: column; }
.as-tile h3 { font-size: 20px; font-weight: 800; margin: 0 0 10px; line-height: 1.25; color: var(--as-text); }
.as-tile__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; flex: 1; }
.as-tile__grid a { display: block; color: var(--as-text) !important; font-size: 12px; text-decoration: none !important; }
.as-tile__grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #f7f8f8; border-radius: 6px; margin-bottom: 4px; }
.as-tile__grid span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.as-tile__more { margin-top: 12px; font-size: 13px; font-weight: 600; }

/* ---------- Product strip (horizontal scroller) ---------- */
.as-strip { position: relative; padding: 4px 8px 16px; }
.as-strip__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
    padding: 8px 12px 10px; scrollbar-width: thin; scroll-behavior: smooth;
}
@media (min-width: 1200px) { .as-strip__track { grid-auto-columns: calc((100% - 6 * 14px) / 7); } }
.as-strip__track > * { scroll-snap-align: start; }
.as-strip__btn {
    position: absolute; top: 40%; transform: translateY(-50%); z-index: 2; width: 42px; height: 90px; border: 1px solid #d5d9d9; background: rgba(255, 255, 255, .95);
    border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); cursor: pointer; font-size: 20px; color: var(--as-text); display: none;
}
@media (hover: hover) and (min-width: 768px) {
    .as-strip:hover .as-strip__btn { display: block; }
}
.as-strip__btn--prev { inset-inline-start: 4px; }
.as-strip__btn--next { inset-inline-end: 4px; }
[dir="rtl"] .as-strip__btn i { transform: scaleX(-1); }

/* ---------- Product card ---------- */
.as-pcard { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 8px; min-width: 0; height: 100%; }
.as-pcard--boxed { border: 1px solid #e3e6e6; padding: 12px; transition: box-shadow .15s; }
.as-pcard--boxed:hover { box-shadow: 0 4px 16px rgba(15, 20, 25, .12); }
.as-pcard__media { position: relative; display: block; background: #f7f8f8; border-radius: 6px; aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 8px; }
.as-pcard__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s; }
.as-pcard:hover .as-pcard__media img { transform: scale(1.04); }
.as-pcard__badge {
    position: absolute; top: 8px; inset-inline-start: 8px; background: var(--as-deal); color: #fff; font-size: 12px; font-weight: 700;
    padding: 2px 8px; border-radius: 4px; z-index: 1;
}
.as-pcard__wish {
    position: absolute; top: 6px; inset-inline-end: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92);
    color: #6b7378; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); cursor: pointer; z-index: 1; display: flex; align-items: center; justify-content: center;
}
.as-pcard__wish:hover { color: var(--as-deal); }
.as-pcard__cat { font-size: 12px; color: var(--as-muted); margin-bottom: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.as-pcard__title {
    font-size: 14px; line-height: 1.4; font-weight: 500; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: calc(1.4em * 2);
}
.as-pcard__title a { color: var(--as-text) !important; text-decoration: none !important; }
.as-pcard__title a:hover { color: var(--as-blue-700) !important; }
.as-pcard__rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--as-link); min-height: 18px; }
.as-pcard__price { margin-top: 4px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.as-pcard__meta { font-size: 12px; color: var(--as-muted); min-height: 18px; }
.as-pcard__meta .as-free { color: var(--as-green); font-weight: 700; }
.as-pcard__oos { color: var(--as-deal); font-size: 12px; font-weight: 700; }
.as-pcard__cta { margin-top: auto; padding-top: 10px; }

.as-price { font-weight: 700; color: var(--as-text); white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.as-price__cur { font-size: 12px; vertical-align: top; position: relative; top: .25em; margin-inline-end: 2px; }
.as-price__num { font-size: 22px; line-height: 1; }
.as-price--lg .as-price__num { font-size: 30px; }
.as-price--sm .as-price__num { font-size: 17px; }
.as-was { color: var(--as-muted); font-size: 12px; text-decoration: line-through; white-space: nowrap; }
.as-dealpct { color: var(--as-deal); font-weight: 600; font-size: 13px; }

.as-stars { display: inline-flex; gap: 1px; color: var(--as-star); font-size: 13px; direction: ltr; }
.as-stars .is-off { color: #d5d9d9; }

/* ---------- Grids ---------- */
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

/* ---------- Banner ---------- */
.as-banner { display: block; margin-top: 20px; border-radius: var(--as-radius); overflow: hidden; box-shadow: var(--as-shadow); }
.as-banner img { display: block; width: 100%; height: auto; }

/* ---------- Brands ---------- */
.as-brands { display: grid; grid-auto-flow: column; grid-auto-columns: 130px; gap: 12px; overflow-x: auto; padding: 8px 20px 18px; scrollbar-width: thin; }
.as-brands a { display: flex; align-items: center; justify-content: center; height: 72px; background: #fff; border: 1px solid #e3e6e6; border-radius: 8px; padding: 10px; }
.as-brands a:hover { border-color: var(--as-blue); }
.as-brands img { max-width: 100%; max-height: 50px; object-fit: contain; }

/* ---------- Tabs (deals) ---------- */
.as-tabs { display: flex; gap: 8px; padding: 0 20px; flex-wrap: wrap; }
.as-tab {
    border: 1px solid #c9d1d8; background: #fff; color: var(--as-text); border-radius: 999px; padding: 5px 16px; font-weight: 700; cursor: pointer; font-family: var(--as-font);
}
.as-tab.is-active { background: var(--as-ink); color: #fff; border-color: var(--as-ink); }
.as-tabpane { display: none; }
.as-tabpane.is-active { display: block; }

/* ---------- Breadcrumb ---------- */
.as-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--as-muted); padding: 12px 0; list-style: none; margin: 0; }
.as-crumbs li + li::before { content: "›"; margin-inline-end: 6px; color: #9aa3a8; }
.as-crumbs a { color: var(--as-muted) !important; }
.as-crumbs a:hover { color: var(--as-blue-700) !important; text-decoration: underline; }
.as-crumbs li:last-child { color: var(--as-text); font-weight: 600; }

/* ---------- Listing page ---------- */
.as-resbar { background: #fff; box-shadow: 0 1px 0 var(--as-line); margin-bottom: 16px; }
.as-resbar__row { display: flex; align-items: center; gap: 12px; min-height: 52px; flex-wrap: wrap; }
.as-resbar__count { flex: 1; font-size: 14px; }
.as-resbar__count b { color: var(--as-deal); }
.as-select {
    border: 1px solid #c9d1d8; border-radius: 8px; padding: 6px 10px; background: #f0f2f2; font-family: var(--as-font); font-size: 13px; cursor: pointer;
}
.as-listing { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.as-filters { font-size: 14px; position: sticky; top: 120px; max-height: calc(100vh - 130px); overflow-y: auto; }
.as-filters h4 { font-size: 15px; font-weight: 800; margin: 0 0 8px; }
.as-filters section { padding: 14px 16px; border-bottom: 1px solid #edf0f2; }
.as-filters section:last-child { border-bottom: 0; }
.as-filters ul { list-style: none; padding: 0; margin: 0; }
.as-filters li a { display: block; padding: 3px 0; color: var(--as-text) !important; }
.as-filters li a:hover { color: var(--as-blue-700) !important; }
.as-filters li.is-current > a { font-weight: 800; }
.as-filters li ul { padding-inline-start: 12px; }
.as-filters label { display: flex; gap: 8px; align-items: center; cursor: pointer; margin: 4px 0; }
.as-pricebox { display: flex; gap: 6px; align-items: center; }
.as-pricebox input { width: 100%; min-width: 0; border: 1px solid #a6adb4; border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.as-filters-toggle { display: none; }
.as-empty { text-align: center; padding: 60px 20px; }
.as-empty i { font-size: 48px; color: #c4ccd2; }
.as-empty h3 { font-size: 20px; font-weight: 800; margin: 14px 0 6px; }

/* ---------- Product details ---------- */
.as-pdp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(260px, 3fr); gap: 28px; align-items: start; padding: 20px; }
.as-gallery { display: grid; grid-template-columns: 64px 1fr; gap: 12px; position: sticky; top: 120px; }
.as-gallery__thumbs { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.as-gallery__thumbs button { width: 60px; height: 60px; border: 1px solid #c9d1d8; border-radius: 6px; background: #fff; padding: 3px; cursor: pointer; }
.as-gallery__thumbs button.is-active { border-color: var(--as-blue-600); box-shadow: 0 0 0 2px rgba(77, 190, 248, .5); }
.as-gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.as-gallery__main { background: #fff; border-radius: 8px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.as-gallery__main img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; }
.as-gallery__main.is-zoomed img { transform: scale(1.8); }
.as-pdp__brand { font-size: 14px; }
.as-pdp__title { font-size: 24px; font-weight: 600; line-height: 1.35; margin: 2px 0 6px; color: var(--as-text); }
.as-pdp__rating { display: flex; align-items: center; gap: 8px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid #e3e6e6; flex-wrap: wrap; }
.as-pdp__pricebox { padding: 12px 0; border-bottom: 1px solid #e3e6e6; }
.as-pdp__pricebox .as-dealpct { font-size: 26px; font-weight: 300; margin-inline-end: 8px; }
.as-pdp__list { font-size: 13px; color: var(--as-muted); margin-top: 4px; }
.as-pdp__facts { width: 100%; font-size: 14px; margin: 12px 0; }
.as-pdp__facts th { font-weight: 700; padding: 4px 0; width: 40%; vertical-align: top; }
.as-pdp__facts td { padding: 4px 0; }
.as-pdp__about h3 { font-size: 16px; font-weight: 800; margin: 14px 0 6px; }
.as-pdp__about p { font-size: 14px; white-space: pre-line; }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.as-chip { border: 1px solid #a6adb4; background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: var(--as-font); }
.as-chip:hover { background: #f5f7f8; }
.as-chip.is-active { border-color: var(--as-blue-700); box-shadow: 0 0 0 2px rgba(77, 190, 248, .55); font-weight: 700; }
.as-optlabel { font-size: 14px; margin-top: 10px; }
.as-optlabel b { font-weight: 700; }
.as-buybox { border: 1px solid #d5d9d9; border-radius: 10px; padding: 18px; position: sticky; top: 120px; font-size: 14px; background: #fff; }
.as-buybox__stock { font-size: 18px; font-weight: 600; margin: 8px 0; }
.as-buybox__stock.is-in { color: var(--as-green); }
.as-buybox__stock.is-out { color: var(--as-deal); }
.as-buybox__row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.as-buybox__row select { flex: 1; }
.as-buybox .as-btn { margin-top: 8px; }
.as-buybox__meta { margin-top: 14px; font-size: 12px; color: var(--as-muted); display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.as-buybox__meta b { color: var(--as-text); font-weight: 600; }
.as-pdp-sec { padding: 22px; margin-top: 20px; }
.as-pdp-sec > h2 { font-size: 21px; font-weight: 800; margin: 0 0 14px; }
.as-desc { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.as-desc img { max-width: 100%; height: auto; }
.as-video { position: relative; aspect-ratio: 16 / 9; max-width: 900px; }
.as-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.as-reviews { display: grid; grid-template-columns: 300px 1fr; gap: 32px; }
.as-review { padding: 14px 0; border-bottom: 1px solid #edf0f2; }
.as-review__who { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 4px; }
.as-review__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--as-blue-50); color: var(--as-blue-700); display: flex; align-items: center; justify-content: center; }
.as-rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
[dir="rtl"] .as-rate { flex-direction: row-reverse; justify-content: flex-end; }
.as-rate input { position: absolute; opacity: 0; pointer-events: none; }
.as-rate label { font-size: 28px; color: #d5d9d9; cursor: pointer; margin: 0; line-height: 1; }
.as-rate label:hover, .as-rate label:hover ~ label, .as-rate input:checked ~ label { color: var(--as-star); }
.as-rate input:focus-visible + label { outline: 2px solid var(--as-blue); border-radius: 4px; }

/* ---------- Cart ---------- */
.as-cartpage { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 20px; }
.as-cartlist { padding: 20px 24px; }
.as-cartlist h1 { font-size: 28px; font-weight: 600; margin: 0; }
.as-cartlist__head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid #ddd; padding-bottom: 8px; }
.as-cartlist__head span { font-size: 13px; color: var(--as-muted); }
.as-citem { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; padding: 16px 0; border-bottom: 1px solid #ddd; }
.as-citem__img { width: 150px; height: 150px; object-fit: contain; background: #f7f8f8; border-radius: 6px; }
.as-citem__name { font-size: 17px; font-weight: 600; color: var(--as-text) !important; line-height: 1.35; display: block; margin-bottom: 4px; }
.as-citem__opts { font-size: 13px; color: var(--as-muted); }
.as-citem__stock { font-size: 13px; color: var(--as-green); }
.as-citem__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; }
.as-qty { display: inline-flex; align-items: center; border: 3px solid var(--as-blue); border-radius: 999px; overflow: hidden; height: 36px; }
.as-qty button { width: 34px; height: 100%; border: 0; background: #fff; font-size: 16px; cursor: pointer; color: var(--as-text); }
.as-qty button:disabled { color: #bbb; cursor: not-allowed; }
.as-qty span { min-width: 30px; text-align: center; font-weight: 700; }
.as-citem__del { background: none; border: 0; color: var(--as-link); cursor: pointer; padding: 0; font-family: var(--as-font); font-size: 13px; }
.as-citem__del:hover { text-decoration: underline; color: var(--as-deal); }
.as-citem__price { text-align: end; }
.as-cartsum { padding: 20px; position: sticky; top: 120px; }
.as-cartsum__line { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 15px; }
.as-cartsum__line.is-total { font-size: 19px; font-weight: 800; border-top: 1px solid #ddd; margin-top: 6px; padding-top: 10px; }
.as-cartsum__coupon { margin-top: 14px; border-top: 1px solid #edf0f2; padding-top: 14px; }
.as-cartsum__coupon .as-inline { display: flex; gap: 8px; }
.as-cartsum__coupon input { flex: 1; min-width: 0; }
.as-freebar { background: var(--as-blue-50); border: 1px solid #b9e5fb; color: #04577f; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }

/* ---------- Checkout ---------- */
.as-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-top: 20px; }
.as-step { padding: 20px 24px; margin-bottom: 16px; }
.as-step__head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.as-step__num { width: 30px; height: 30px; border-radius: 50%; background: var(--as-ink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.as-step__head h2 { font-size: 19px; font-weight: 800; margin: 0; }
.as-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.as-fgrid .is-wide { grid-column: 1 / -1; }
.as-field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.as-field label .req { color: var(--as-deal); }
.as-pay { display: grid; gap: 10px; }
.as-pay label {
    display: flex; align-items: center; gap: 14px; border: 1px solid #c9d1d8; border-radius: 10px; padding: 12px 16px; cursor: pointer; margin: 0; background: #fff;
}
.as-pay label:hover { background: #fafbfc; }
.as-pay input { width: 18px; height: 18px; accent-color: var(--as-blue-700); }
.as-pay label:has(input:checked) { border-color: var(--as-blue-700); background: var(--as-blue-50); box-shadow: 0 0 0 1px var(--as-blue-700); }
.as-pay img { height: 34px; width: auto; margin-inline-start: auto; }
.as-pay strong { font-size: 15px; }
.as-osum { padding: 20px; position: sticky; top: 120px; }
.as-osum h2 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.as-oitem { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f2f4; font-size: 13px; }
.as-oitem img { width: 54px; height: 54px; object-fit: contain; background: #f7f8f8; border-radius: 6px; flex-shrink: 0; }
.as-oitem__name { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.as-oitem__opts { color: var(--as-muted); }

/* ---------- Generic content pages (account, policies, auth) ---------- */
.as-page { margin-top: 20px; }
.as-page-title { font-size: 26px; font-weight: 800; margin: 18px 0 12px; }
.as-auth { max-width: 420px; margin: 28px auto; }
.as-auth .as-card { padding: 26px; }
.as-auth h1 { font-size: 26px; font-weight: 600; margin: 0 0 16px; }
.as-divider { display: flex; align-items: center; gap: 10px; color: var(--as-muted); font-size: 12px; margin: 18px 0; }
.as-divider::before, .as-divider::after { content: ""; flex: 1; height: 1px; background: #e3e6e6; }
body.as-body .cart-page .table { background: #fff; }
body.as-body .cart-page .table thead th { border-top: 0; background: #f7f9fa; color: var(--as-text); font-weight: 700; }

/* ---------- Footer ---------- */
.as-footer { margin-top: 36px; color: #ddd; }
.as-totop { display: block; width: 100%; background: var(--as-ink-3); color: #fff !important; text-align: center; padding: 14px; font-size: 13px; border: 0; cursor: pointer; font-family: var(--as-font); }
.as-totop:hover { background: #33475a; }
.as-footer__main { background: var(--as-ink-2); padding: 40px 0 30px; }
.as-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.as-footer h4 { color: #fff; font-size: 16px; font-weight: 800; margin: 0 0 12px; }
.as-footer ul { list-style: none; padding: 0; margin: 0; }
.as-footer li { margin: 0 0 8px; font-size: 14px; }
.as-footer a { color: #dde3e8 !important; }
.as-footer a:hover { color: #fff !important; text-decoration: underline; }
.as-footer__addr li { display: flex; gap: 8px; color: #c6cdd3; }
.as-footer__addr i { color: var(--as-blue); margin-top: 4px; }
.as-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.as-social a { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); color: #fff !important; text-decoration: none !important; }
.as-social a:hover { background: var(--as-blue); color: var(--as-ink) !important; }
.as-footer__bar { background: var(--as-ink); padding: 22px 0; text-align: center; font-size: 12px; color: #aab4bc; }
.as-footer__bar .as-logo { margin-bottom: 10px; }
.as-footer__bar p { margin: 4px 0; }

/* WhatsApp float */
.as-wa {
    position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 1020; width: 54px; height: 54px; border-radius: 50%; background: #25d366;
    color: #fff !important; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); text-decoration: none !important;
}
.as-wa:hover { transform: scale(1.06); }

/* Quick view modal (existing #exampleModal) */
#exampleModal .modal-content { border-radius: 12px; border: 0; overflow: hidden; }
#exampleModal .modal-header { background: var(--as-ink) !important; color: #fff; border: 0; }
#exampleModal .modal-header h5 { color: #fff; font-weight: 700; font-size: 17px; }
#exampleModal .list-group-item { font-size: 15px !important; }
#exampleModal .btn-warning { background: var(--as-blue); border-color: var(--as-blue); color: var(--as-ink); border-radius: 999px; padding: 8px 26px; font-weight: 700; }

/* toastr / sweetalert font */
.swal2-popup, #toast-container > div { font-family: var(--as-font) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .as-tiles { grid-template-columns: repeat(2, 1fr); }
    .as-pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .as-pdp__buy { grid-column: 1 / -1; }
    .as-buybox { position: static; }
    .as-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .as-hitem--hide-lg { display: none; }
}
@media (max-width: 991.98px) {
    .as-topbar .as-search, .as-hitem--desk { display: none; }
    .as-msearch { display: block; }
    .as-burger { display: flex; }
    .as-topbar__row { min-height: 56px; gap: 4px; }
    .as-topbar__spacer { flex: 1; }
    .as-mega__panel { display: none !important; }
    .as-listing { grid-template-columns: 1fr; }
    .as-filters { position: static; max-height: none; display: none; }
    .as-filters.is-open { display: block; }
    .as-filters-toggle { display: inline-flex; }
    .as-cartpage, .as-checkout { grid-template-columns: 1fr; }
    .as-cartsum, .as-osum { position: static; }
    .as-reviews { grid-template-columns: 1fr; }
    .as-gallery { position: static; }
}
@media (max-width: 767.98px) {
    .as-wrap { padding: 0 12px; }
    .as-logo img { height: 32px; }
    .as-logo__text b { font-size: 18px; }
    .as-logo__text small { font-size: 9px; letter-spacing: 4px; }
    .as-tiles { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -30px; }
    .as-tile { padding: 12px; }
    .as-tile h3 { font-size: 15px; }
    .as-tile__grid { gap: 8px; }
    .as-tile__grid span { font-size: 11px; }
    .as-hero__caption { display: none; }
    .as-sec__title { font-size: 18px; }
    .as-sec__head { padding: 14px 14px 2px; }
    .as-strip__track { grid-auto-columns: 46%; padding: 8px 6px; gap: 10px; }
    .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .as-pcard--boxed { padding: 8px; }
    .as-price__num { font-size: 19px; }
    .as-pdp { grid-template-columns: 1fr; padding: 14px; gap: 18px; }
    .as-gallery { grid-template-columns: 1fr; }
    .as-gallery__thumbs { flex-direction: row; order: 2; overflow-x: auto; }
    .as-gallery__thumbs button { flex-shrink: 0; }
    .as-pdp__title { font-size: 19px; }
    .as-citem { grid-template-columns: 96px 1fr; }
    .as-citem__img { width: 96px; height: 96px; }
    .as-citem__price { grid-column: 2; text-align: start; }
    .as-fgrid { grid-template-columns: 1fr; }
    .as-footer__cols { grid-template-columns: 1fr 1fr; gap: 22px; }
    .as-cartlist, .as-step { padding: 16px; }
    .as-pdp-sec { padding: 16px; }
}
@media (max-width: 420px) {
    .as-hitem--acct small { display: none; }
    .as-footer__cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Keep long names from stretching grid columns */
.as-tile, .as-tile__grid > a, .as-strip, .as-strip__track, .as-sec, .as-listing > *, .as-pdp > *, .as-cartpage > *, .as-checkout > * { min-width: 0; }
body.as-body { overflow-x: clip; }
.as-dealpct, .as-pcard__badge { direction: ltr; unicode-bidi: isolate; }

/* ---------- Older account pages (dashboard, order details, tracking, policies) ---------- */
body.as-body main.cart-page { padding-top: 6px; }
body.as-body main.cart-page > .bg-gray-13 { background: transparent !important; }
body.as-body main.cart-page .nav-classic, body.as-body main.cart-page .nav-tab {
    background: #fff; border-radius: var(--as-radius); box-shadow: var(--as-shadow); padding: 4px 8px; border: 0; flex-wrap: wrap;
}
body.as-body main.cart-page .nav-classic .nav-link { border-bottom: 3px solid transparent; font-weight: 700; color: var(--as-text) !important; }
body.as-body main.cart-page .nav-classic .nav-link.active { border-bottom-color: var(--as-blue); }
body.as-body main.cart-page .nav-classic .nav-link .text-primary { color: inherit !important; }
body.as-body main.cart-page .tab-content {
    background-color: #fff !important; background-image: none !important; border-radius: var(--as-radius); box-shadow: var(--as-shadow); padding: 20px; margin-top: 16px;
}
body.as-body main.cart-page .table { background: #fff; border-radius: var(--as-radius); overflow: hidden; box-shadow: var(--as-shadow); font-size: 14px; }
body.as-body main.cart-page .table td, body.as-body main.cart-page .table th { vertical-align: middle; border-color: #edf0f2; }
body.as-body main.cart-page h1, body.as-body main.cart-page h2, body.as-body main.cart-page h3, body.as-body main.cart-page h4 { color: var(--as-text); font-weight: 800; }
body.as-body main.cart-page .btn { border-radius: 999px; font-weight: 700; padding-inline: 18px; }
body.as-body main.cart-page .card { border-radius: var(--as-radius); border: 0; box-shadow: var(--as-shadow); }

/* Original store logo (images/logo1.png) shown as is, on a white badge so it reads on the dark header */
.as-logo--orig { background: #fff; padding: 2px 6px; border-radius: 8px; }
.as-logo--orig:hover { border-color: var(--as-blue); }
.as-logo--orig img { height: 58px !important; width: auto; }
.as-logo--footer img { height: 90px !important; }
@media (max-width: 767.98px) {
    .as-logo--orig img { height: 46px !important; }
    .as-logo--footer img { height: 80px !important; }
}

/* ---------- Mobile app bar + PWA (2026-11-29) ---------- */
.as-bnav { display: none; }
.as-appback { display: none !important; }
@media (max-width: 767.98px) {
    .as-bnav {
        display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 1030; background: #fff; border-top: 1px solid #dde3e8;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); padding-bottom: env(safe-area-inset-bottom);
    }
    .as-bnav > a, .as-bnav > button {
        flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
        height: 58px; background: none; border: 0; padding: 0 2px; color: #56636e !important; font: inherit; font-size: 11px; font-weight: 600;
        text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .as-bnav i { font-size: 20px; line-height: 1; }
    .as-bnav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .as-bnav .is-active { color: var(--as-blue-700) !important; }
    .as-bnav .is-active::before { content: ""; position: absolute; top: 0; inset-inline: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--as-blue); }
    .as-bnav__count {
        position: absolute; top: 6px; inset-inline-start: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
        background: var(--as-blue); color: var(--as-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
    }
    body.as-body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    .as-wa { bottom: calc(72px + env(safe-area-inset-bottom)); width: 48px; height: 48px; font-size: 26px; inset-inline-start: 12px; }
    .as-totop { margin-bottom: 0; }
    input, select, textarea, .form-control { font-size: 16px !important; }
}
/* Installed app (standalone) */
@media (display-mode: standalone) {
    .as-appback.is-shown { display: inline-flex !important; }
    .as-header { padding-top: env(safe-area-inset-top); }
}
html.as-standalone .as-appback.is-shown { display: inline-flex !important; }
html.as-standalone .as-header { padding-top: env(safe-area-inset-top); }
.as-appback { align-items: center; justify-content: center; font-size: 18px; }
