/* =====================================================================
 * Perfume Shop - Storefront design system
 *
 * One place for the colours, type scale and layout primitives the shop is
 * built from. components.css builds on these tokens, so changing a value
 * here changes it everywhere.
 *
 * Layout uses logical properties (inline-start/end, margin-inline) so the
 * Arabic right-to-left version needs no separate stylesheet.
 * ===================================================================== */

:root {
    /* ---- Colour ---- */
    --ink: #14110f;
    --ink-soft: #55504b;
    --ink-muted: #8a827a;
    --paper: #ffffff;
    --sand: #faf7f2;
    --sand-deep: #f2ece2;
    --line: #e8e1d6;
    --gold: #b48a3f;
    --gold-dark: #8d6b2c;
    --gold-tint: #f6efe1;
    --sale: #b3261e;
    --ok: #1f7a5c;

    /* Legacy aliases so older rules keep working */
    --primary-color: var(--gold);
    --secondary-color: var(--ink);
    --text-color: var(--ink);
    --muted-color: var(--ink-muted);
    --border-color: var(--line);
    --light-color: var(--sand);
    --dark-color: var(--ink);
    --danger-color: var(--sale);
    --success-color: var(--ok);

    /* ---- Shape & depth ---- */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(20, 17, 15, .06);
    --shadow-md: 0 8px 26px rgba(20, 17, 15, .09);
    --shadow-lg: 0 18px 48px rgba(20, 17, 15, .14);

    /* ---- Type ---- */
    --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;

    /* ---- Rhythm ---- */
    --section-y: clamp(2.5rem, 5vw, 4.5rem);
    --header-h: 68px;
}

/* Arabic gets one font for everything - Tajawal has no serif companion,
   and mixing a Latin serif into Arabic headings looks broken. */
.lang-ar {
    --font-body: 'Tajawal', system-ui, 'Segoe UI', sans-serif;
    --font-display: 'Tajawal', system-ui, 'Segoe UI', sans-serif;
}

/* ---------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------ */

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.lang-ar body,
.lang-ar { letter-spacing: 0; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: .75rem;
}

.display-serif {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .01em;
}

a {
    color: var(--ink);
    text-decoration: none;
    transition: color .18s ease;
}
a:hover { color: var(--gold-dark); }

.text-muted { color: var(--ink-muted) !important; }

img { max-width: 100%; }

::selection { background: var(--gold-tint); }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------ */

.btn {
    --bs-btn-border-radius: 999px;
    font-weight: 500;
    letter-spacing: .01em;
    padding-inline: 1.4rem;
    transition: transform .12s ease, background .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    --bs-btn-bg: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-bg: var(--gold-dark);
    --bs-btn-hover-border-color: var(--gold-dark);
    --bs-btn-active-bg: var(--gold-dark);
    --bs-btn-active-border-color: var(--gold-dark);
    --bs-btn-disabled-bg: var(--ink-muted);
    --bs-btn-disabled-border-color: var(--ink-muted);
    background: var(--ink);
    border-color: var(--ink);
}

.btn-gold {
    --bs-btn-color: #fff;
    background: var(--gold);
    border: 1px solid var(--gold);
    color: #fff;
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }

.btn-outline-dark {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-bg: var(--ink);
}

.btn-outline-primary {
    --bs-btn-color: var(--gold-dark);
    --bs-btn-border-color: var(--gold);
    --bs-btn-hover-bg: var(--gold);
    --bs-btn-hover-border-color: var(--gold);
    --bs-btn-hover-color: #fff;
}

.btn-lg { padding: .8rem 2rem; font-size: 1rem; }

/* ---------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */

.announcement-bar {
    background: var(--ink);
    color: #f3ece0;
    font-size: .82rem;
    letter-spacing: .02em;
    padding: .5rem 0;
}
.announcement-bar i { color: var(--gold); margin-inline-end: .35rem; }

.site-header {
    background: var(--paper);
    box-shadow: none;
    border-bottom: 1px solid var(--line);
}

.header-utility {
    border-bottom: 1px solid var(--line);
    font-size: .8rem;
    color: var(--ink-muted);
    padding: .4rem 0;
}
.header-utility a { color: var(--ink-muted); }
.header-utility a:hover { color: var(--gold-dark); }
.utility-left a { margin-inline-end: 1.1rem; }

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.lang-switch a {
    padding: .1rem .7rem;
    font-size: .78rem;
    color: var(--ink-muted);
    background: transparent;
}
.lang-switch a.active {
    background: var(--ink);
    color: #fff;
}

.header-main {
    background: var(--paper);
    padding: .6rem 0;
    z-index: 1035;
}

.header-grid {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.header-logo img { height: 42px; width: auto; max-width: 190px; object-fit: contain; }

/* Used when no logo image has been uploaded in Settings. */
.wordmark {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--ink);
    white-space: nowrap;
}
.wordmark--light { color: #fff; font-size: 1.35rem; }
.lang-ar .wordmark { letter-spacing: 0; }

.header-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 520px;
    margin-inline: auto;
}
.header-search .form-control {
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--sand);
    padding-inline-end: 3rem;
    height: 44px;
}
.header-search .form-control:focus {
    background: var(--paper);
    border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(180, 138, 63, .15);
}
.header-search .btn {
    position: absolute;
    inset-inline-end: 4px;
    top: 4px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
}
.header-search .btn:hover { background: var(--gold-dark); color: #fff; }

.header-actions {
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-inline-start: auto;
}

.header-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .5rem;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: .95rem;
    border-radius: 999px;
}
.header-icon:hover { background: var(--sand); color: var(--ink); }
.header-icon.dropdown-toggle::after { display: none; }

.cart-badge {
    position: absolute;
    top: 4px;
    inset-inline-end: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: .66rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--gold);
    border-radius: 999px;
}

/* ---- Category row + mega menu ---- */

.header-nav { border-top: 1px solid var(--line); }
.nav-list {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-list > li > a {
    display: inline-block;
    padding: .7rem .9rem;
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--ink);
}
.nav-list > li > a:hover { color: var(--gold-dark); }
.nav-list > li > a i { font-size: .62rem; margin-inline-start: .25rem; color: var(--ink-muted); }
.nav-offers { color: var(--sale) !important; font-weight: 600 !important; }

.has-mega { position: static; }
.mega-menu {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 1040;
    padding: 1.5rem 0 1rem;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.header-nav { position: relative; }
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .4rem .5rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--ink);
}
.mega-item:hover { background: var(--sand); color: var(--gold-dark); }
.mega-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--sand-deep);
}
.mega-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-footer {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
    font-size: .85rem;
    font-weight: 600;
}
.mega-footer a { color: var(--gold-dark); }
.mega-footer i { font-size: .7rem; }
[dir="rtl"] .mega-footer i,
[dir="rtl"] .link-arrow i { transform: scaleX(-1); }

/* ---- Drawer (mobile menu) ---- */

.drawer-nav, .drawer-subnav { list-style: none; margin: 0; padding: 0; }
.drawer-nav > li > a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem .25rem;
    font-size: .95rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.drawer-nav > li > a i:first-child { width: 20px; color: var(--ink-muted); }
.drawer-subnav { padding: .25rem 0 .5rem 2rem; }
[dir="rtl"] .drawer-subnav { padding: .25rem 2rem .5rem 0; }
.drawer-subnav a {
    display: block;
    padding: .45rem 0;
    font-size: .88rem;
    color: var(--ink-soft);
}
.drawer-lang { margin-top: 1.25rem; }

/* ---------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------ */

.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    margin: 0;
}
.lang-ar .section-title { font-weight: 700; }
.section-sub {
    margin: .25rem 0 0;
    color: var(--ink-muted);
    font-size: .92rem;
}
.link-arrow {
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gold-dark);
    white-space: nowrap;
}
.link-arrow i { font-size: .7rem; margin-inline-start: .3rem; }

.eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: .5rem;
}

/* ---------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------ */

.hero {
    position: relative;
    background: var(--sand-deep);
    border-radius: 0;
    overflow: hidden;
}
.hero-slide {
    position: relative;
    min-height: clamp(320px, 52vw, 560px);
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to inline-end, rgba(20, 17, 15, .72), rgba(20, 17, 15, .15));
}
[dir="rtl"] .hero-slide::after {
    background: linear-gradient(to left, rgba(20, 17, 15, .72), rgba(20, 17, 15, .15));
}
[dir="ltr"] .hero-slide::after {
    background: linear-gradient(to right, rgba(20, 17, 15, .72), rgba(20, 17, 15, .15));
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    color: #fff;
    padding-block: 2.5rem;
}
.hero-content h1,
.hero-content .hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: .75rem;
}
.hero-content p {
    font-size: clamp(.95rem, 1.6vw, 1.1rem);
    color: rgba(255, 255, 255, .88);
    margin-bottom: 1.5rem;
}
.hero .carousel-indicators { margin-bottom: 1rem; }
.hero .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .55);
}
.hero .carousel-indicators .active { background: var(--gold); }

/* ---------------------------------------------------------------------
 * Category & brand tiles
 * ------------------------------------------------------------------ */

.category-tile {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--sand-deep);
    aspect-ratio: 3 / 4;
}
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.category-tile:hover img { transform: scale(1.05); }
.category-tile__label {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 2.5rem .9rem .9rem;
    background: linear-gradient(to top, rgba(20, 17, 15, .8), transparent);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
}

.brand-tile {
    display: grid;
    place-items: center;
    height: 92px;
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-weight: 500;
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.brand-tile:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}
.brand-tile img { max-height: 46px; object-fit: contain; }

/* ---------------------------------------------------------------------
 * Value props
 * ------------------------------------------------------------------ */

.value-prop {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1.1rem;
    height: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.value-prop i {
    font-size: 1.15rem;
    color: var(--gold);
    margin-top: .15rem;
}
.value-prop h3 { font-size: .95rem; margin-bottom: .15rem; }
.value-prop p { margin: 0; font-size: .84rem; color: var(--ink-muted); }

/* ---------------------------------------------------------------------
 * Product detail
 * ------------------------------------------------------------------ */

.product-gallery .main-image {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--sand);
}
.product-gallery .thumbnail {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: .75;
    transition: opacity .2s ease, border-color .2s ease;
}
.product-gallery .thumbnail:hover,
.product-gallery .thumbnail.active {
    opacity: 1;
    border-color: var(--gold);
}

.product-info .product-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    margin-bottom: .35rem;
}
.product-info .product-brand {
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: .9rem;
}
.product-info .product-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1rem;
}
.product-info .product-price .original-price {
    font-size: 1rem;
    font-weight: 400;
    color: var(--ink-muted);
    text-decoration: line-through;
    margin-inline-start: .5rem;
}
.product-meta-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .4rem 1rem;
    margin: 0 0 1.5rem;
    font-size: .9rem;
}
.product-meta-list dt { color: var(--ink-muted); font-weight: 400; }
.product-meta-list dd { margin: 0; font-weight: 500; }

.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.quantity-selector .btn {
    width: 42px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
}
.quantity-selector .btn:hover { background: var(--sand); }
.quantity-selector input {
    /* Room for a weight like 125.5 (grams), not only a count of 1 */
    width: 68px;
    height: 44px;
    text-align: center;
    border: 0;
    border-inline: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    font-weight: 600;
}
.quantity-selector input:focus { outline: none; box-shadow: none; }
/* The - / + buttons do this; the browser's own tiny arrows only crowd the number. */
.quantity-selector input::-webkit-outer-spin-button, .quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-selector input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .7rem;
    font-size: .78rem;
    font-weight: 500;
    border-radius: 999px;
    background: var(--gold-tint);
    color: var(--gold-dark);
}
.stock-pill--ok { background: #e8f5ef; color: var(--ok); }
.stock-pill--out { background: #fdeceb; color: var(--sale); }

/* ---------------------------------------------------------------------
 * Cart
 * ------------------------------------------------------------------ */

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item .item-image {
    width: 92px;
    height: 92px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--sand);
}
.cart-item .item-title { font-weight: 600; font-size: .98rem; margin-bottom: .15rem; }
.cart-item .item-variant { font-size: .82rem; color: var(--ink-muted); }
.cart-item .item-remove { color: var(--ink-muted); border: 0; background: none; }
.cart-item .item-remove:hover { color: var(--sale); }

.cart-summary,
.summary-card {
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem;
}
.summary-card .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .6rem;
    font-size: .93rem;
}
.summary-card .summary-row span:first-child { color: var(--ink-muted); }
.summary-card .summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: .75rem;
    margin-top: .75rem;
    border-top: 1px solid var(--line);
    font-size: 1.15rem;
    font-weight: 700;
}

/* ---------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------ */

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--line);
    padding: .6rem .85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(180, 138, 63, .15);
}
.form-label { font-weight: 500; font-size: .88rem; margin-bottom: .35rem; }

/* ---------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------ */

footer.site-footer {
    background: var(--ink);
    color: #cdc5ba;
}

/* ---------------------------------------------------------------------
 * Utility
 * ------------------------------------------------------------------ */

.breadcrumb {
    font-size: .84rem;
    --bs-breadcrumb-divider-color: var(--ink-muted);
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb .active { color: var(--ink); }

.badge-sale { background: var(--sale); }
.badge-new { background: var(--ink); }
.badge-soft { background: var(--gold-tint); color: var(--gold-dark); }

.whatsapp-float {
    position: fixed;
    width: 54px;
    height: 54px;
    bottom: 28px;
    inset-inline-end: 22px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    font-size: 26px;
    box-shadow: var(--shadow-md);
    z-index: 1040;
    display: grid;
    place-items: center;
}
.whatsapp-float:hover { background: #128c7e; color: #fff; }

.fade-in { animation: fadeIn .4s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 991.98px) {
    .header-main { position: sticky; top: 0; }
    .header-logo img { height: 32px; }
    .hero-content { max-width: 100%; text-align: center; }
    .hero-slide::after {
        background: linear-gradient(to top, rgba(20, 17, 15, .8), rgba(20, 17, 15, .35)) !important;
    }
}

@media (max-width: 575.98px) {
    .section-head { flex-direction: column; align-items: flex-start; gap: .35rem; }
    .cart-item .item-image { width: 72px; height: 72px; }
}
