/* ============================================
   PAMUSHA COMPONENTS — components.css
   Baya Living inspired
   ============================================ */

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
    padding: 14px 36px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--chestnut);
    color: var(--ivory);
}

.btn-primary:hover {
    background-color: #4a3f3f;
}

.btn-secondary {
    background-color: transparent;
    color: var(--chestnut);
    border: 1px solid var(--chestnut);
}

.btn-secondary:hover {
    background-color: var(--chestnut);
    color: var(--ivory);
}

.btn-light {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-light:hover {
    background-color: var(--white);
    color: var(--chestnut);
}

.btn-text {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
    color: var(--chestnut);
    border-bottom: 1px solid var(--chestnut);
    padding-bottom: 2px;
    transition: opacity var(--transition-fast);
}

.btn-text:hover {
    opacity: 0.6;
}

.btn-small {
    padding: 8px 18px;
    font-size: var(--text-xs);
}

.btn-full {
    width: 100%;
}

/* --- Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    /* Fully opaque colour layer — visitors must never see page text scrolling
       past beneath the header. */
    background-color: var(--ivory);
    opacity: 1 !important;
    isolation: isolate;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* No transitions, no shadow, no border — the header is the same colour as
       the page background and should sit seamlessly on top of it. */
    box-shadow: none;
    border: 0;
}

.site-header.scrolled {
    box-shadow: none;
    background-color: var(--ivory);
    opacity: 1 !important;
}

/* Announcement bar */
.announcement-bar {
    position: relative;
    z-index: 10000;
    background-color: var(--chestnut);
    color: var(--ivory);
    text-align: center;
    padding: 8px var(--edge);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
}

.nav-container {
    /* Header-only inset: smaller than the page --edge so the PAMUSHA logo sits
       closer to the left edge and the nav tabs closer to the right. */
    --header-edge: 1.5rem;
    max-width: var(--width-site);
    margin: 0 auto;
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
    padding-left: var(--header-edge);
    /* The right side reserves a scrollbar gutter (html { scrollbar-gutter: stable }),
       which would otherwise push the tabs ~15px further in than the logo. Subtract
       that gutter width (100vw - 100%) so the left and right edge gaps are equal. */
    padding-right: calc(var(--header-edge) - (100vw - 100%));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-header);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: var(--letters-xwide);
    color: var(--chestnut);
    text-transform: uppercase;
}

@media (min-width: 1152px) {
    .nav-logo {
        font-size: 1.35rem;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: calc(var(--text-sm) * 0.7);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
    color: var(--chestnut);
    transition: opacity var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    opacity: 0.5;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--chestnut);
    transition: width var(--transition-medium);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cart {
    position: relative;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 1px;
    background-color: var(--chestnut);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile AND tablet/iPad (≤1024px): the hamburger opens the same full-screen
   overlay, and the bars morph into an X, on both. (Tablet used to fall outside
   this block, so its hamburger never animated into an X — now unified.) */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background-color: var(--ivory);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-xl);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-medium);
        z-index: 1000;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: var(--text-lg);
        letter-spacing: var(--letters-xwide);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-toggle.active .nav-toggle-bar:first-child {
        transform: rotate(45deg) translate(2px, 2px);
    }

    .nav-toggle.active .nav-toggle-bar:last-child {
        transform: rotate(-45deg) translate(2px, -2px);
    }
}

/* --- Custom cursor (hollow ring, follows mouse, shrinks + fills on hover) --- */
@media (hover: hover) and (pointer: fine) {
    /* Universal override: nothing on the site shows a native cursor. */
    *,
    *::before,
    *::after {
        cursor: none !important;
    }
    /* Explicit reinforcement for the elements that are most likely
       to be overridden by component-level styles. */
    html,
    body {
        cursor: none !important;
    }
    a,
    button {
        cursor: none !important;
    }
}

/* .site-cursor is positioned + sized inline by custom-cursor.js + Motion. */
.site-cursor svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Touch / coarse-pointer devices keep their native cursor and no ring. */
@media (hover: none), (pointer: coarse) {
    .site-cursor { display: none; }
}

/* --- Nav dropdown (Our Story → Pamusha Story / Meet the Artisans & Vendors) --- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(-2px);
    /* Match the width of the toggle text (and the underline beneath it) so the
       panel lines up exactly with the label above it. */
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0.25rem;
    list-style: none;
    /* Translucent white wash at 50% opacity. The !important guards against any
       future rule on .nav-dropdown-menu accidentally overriding the alpha. */
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 1000;
    text-align: center;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-menu li,
.nav-dropdown:focus-within .nav-dropdown-menu li,
.nav-dropdown.open .nav-dropdown-menu li {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger so items breathe in one-by-one — sleeker than a panel snap */
.nav-dropdown-menu li:nth-child(1) { transition-delay: 0.04s; }
.nav-dropdown-menu li:nth-child(2) { transition-delay: 0.08s; }
.nav-dropdown-menu li:nth-child(3) { transition-delay: 0.12s; }
.nav-dropdown-menu li:nth-child(4) { transition-delay: 0.16s; }
.nav-dropdown-menu li:nth-child(5) { transition-delay: 0.20s; }
.nav-dropdown-menu li:nth-child(6) { transition-delay: 0.24s; }

.nav-dropdown-menu a {
    display: inline-block;
    padding: 0.32rem 0;
    font-size: calc(var(--text-sm) * 0.62);
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--chestnut);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.18s ease;
    background: transparent;
}

.nav-dropdown-menu a:hover {
    background: transparent;
    opacity: 0.5;
}

/* Suppress the underline-on-hover effect for items inside the dropdown — looks busy. */
.nav-dropdown-menu a::after {
    display: none;
}

/* Tiny caret cue after the toggle */
.nav-dropdown-toggle::before {
    content: '';
    position: absolute;
    inset: -10px -8px;
    /* invisible expansion so hover doesn't drop when crossing the gap to the menu */
}

/* NB: The mobile/tablet dropdown "accordion" reset (static positioning, no
   translucent panel, collapse/expand) lives in ONE place — responsive.css's
   `@media (max-width: 1024px)` "MOBILE / TABLET NAV DROPDOWNS" block — so phones
   and tablets (≤1024px) get identical styling with no 768–1024px gap. The old
   `@media (max-width: 768px)` reset that used to sit here was dead code
   (superseded by that block's !important rules) and has been removed. */

/* --- Product Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gutter);
    max-width: var(--width-site);
    margin: 0 auto;
    align-items: start;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1152px) {
    .product-grid-shop {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.product-card {
    display: block;
    transition: opacity var(--transition-medium);
}

.product-card:hover {
    opacity: 0.85;
}

.product-card-image {
    overflow: hidden;
    background-color: var(--ivory);
    margin-bottom: var(--space-sm);
    position: relative;
}

/* Show the full image at its natural height — never crop length-wise. */
.product-card-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.8s var(--ease-out);
}

/* The primary image stays in flow and defines the card's height; the hover
   image is overlaid on top of it (contained so it is never cropped either). */
.product-card-image .product-card-main {
    position: relative;
    opacity: 1;
    z-index: 2;
}

.product-card-image .product-card-alt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    z-index: 1;
}

.product-card:hover .product-card-main {
    opacity: 0;
}

.product-card:hover .product-card-alt {
    opacity: 1;
}

.product-card-info {
    padding: 0 var(--space-xxs);
}

.product-card-name {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: 400;
    letter-spacing: var(--letters-normal);
    margin-bottom: 2px;
    text-transform: none;
    line-height: var(--line-snug);
}

.product-card-tagline {
    font-size: var(--text-sm);
    color: var(--seasonal-four);
    margin-bottom: 4px;
    letter-spacing: var(--letters-normal);
}

.product-card-price {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--seasonal-four);
    margin-bottom: 0;
    letter-spacing: var(--letters-normal);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    background-color: var(--seasonal-one);
    opacity: 0.4;
}

/* --- Forms --- */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 0;
    font-family: var(--font-body);
    font-size: calc(var(--text-md) - 0.25rem);
    font-weight: 400;
    color: var(--chestnut);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    outline: none;
    transition: border-color var(--transition-fast);
    -webkit-appearance: none;
    letter-spacing: var(--letters-normal);
    line-height: var(--line-normal);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-bottom-color: var(--chestnut);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--seasonal-one);
}

.form-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
    color: var(--seasonal-four);
    margin-bottom: var(--space-xs);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    display: block;
    font-size: var(--text-xs);
    color: var(--red);
    margin-top: 4px;
    letter-spacing: var(--letters-normal);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group-error .form-input,
.form-group-error .form-textarea,
.form-group-error .form-select {
    border-bottom-color: var(--red);
}

/* Radio group */
.form-radio-group {
    display: flex;
    gap: var(--space-lg);
    padding-top: var(--space-xs);
}

.form-radio-group li {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.form-radio-group label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    font-size: var(--text-md);
}

.form-radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--chestnut);
}

/* --- Section Header --- */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    max-width: var(--width-site);
    margin: 0 auto var(--space-xl);
}

.section-link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
    color: var(--seasonal-four);
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.section-link:hover {
    color: var(--chestnut);
    border-bottom-color: var(--chestnut);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--ivory);
    color: var(--chestnut);
    padding: 0.52rem var(--edge);
    /* Seamless with the page background — no top border, no shadow. */
    border: 0;
    box-shadow: none;
}

/* Locations line — mirrors the homepage splash's "London | Harare | Dubai"
   treatment (same font, weight, tracking, uppercase, colour), centred in the
   footer so it appears identically on every page. */
.footer-locations {
    margin: 0;
    /* Sits in the centre column of the footer row; line-height:1 so its text
       bottom lines up with the PAMUSHA logo and the icons (all bottom-aligned
       by the grid's align-items:end). */
    max-width: none;
    line-height: 1;
    text-align: center;
    font-family: var(--font-body);
    font-size: calc(var(--text-sm) * 0.7);
    font-weight: 400;
    letter-spacing: var(--letters-wide);
    text-transform: uppercase;
    color: var(--chestnut);
}

/* Desktop (>1024px) keeps the plain inline "London | Harare | Dubai": the
   separators carry the spacing so it renders exactly as before. */
.footer-locations .loc-sep {
    margin: 0 0.45em;
}

/* ── Mobile + tablet/iPad (≤1024px): a compact, centred flex row —
   "London | Harare | Dubai" sit together in the middle. Desktop (>1024px) is
   untouched. Extra-specific + !important to beat both `p { max-width: 60ch }`
   and the global `body :is(p, …) { text-align: justify !important }`. ── */
@media (max-width: 1024px) {
    .site-footer .footer-locations {
        display: flex !important;
        justify-content: center !important;
        align-items: baseline !important;
        width: auto !important;
    }
    .site-footer .footer-locations .loc-sep {
        margin: 0 0.45em !important;
    }
}
/* Footer typography: copyright + "London | Harare | Dubai" in the Cormorant
   serif (matching the wordmark), with the logo a touch larger. var(--font-header)
   is the site's brand-font token — identical to "Cormorant Garamond", Georgia,
   serif — so it follows the admin heading-font setting. */
.footer-brand .footer-meta {
    font-family: var(--font-header) !important;
    text-transform: none !important;
    font-size: calc(var(--text-sm) * 1.05) !important;
}
.footer-locations {
    font-family: var(--font-header) !important;
    font-size: calc(var(--text-sm) * 1.05) !important;
}
.site-footer .footer-logo {
    font-size: calc(var(--text-sm) * 1.26) !important;
}

@media (max-width: 767px) {
    .footer-brand .footer-meta { font-size: 0.54rem !important; }
    .site-footer .footer-locations { font-size: 0.54rem !important; }
    .site-footer .footer-logo { font-size: 0.648rem !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .footer-brand .footer-meta { font-size: 0.6rem !important; }
    .site-footer .footer-locations { font-size: 0.6rem !important; }
    .site-footer .footer-logo { font-size: 0.72rem !important; }
}

/* Hidden footer verse: 1px, painted in the site background colour, and made
   non-selectable — its selection highlight is background-coloured too, so it
   stays invisible even if someone drags across it. The element itself carries
   aria-hidden. Editable in admin under Site Settings → Footer Verse.
   NB: uses var(--ivory) — the site's ACTUAL background — not the #FAFAFA
   placeholder, so it truly blends. */
.footer-hidden-text {
    color: var(--ivory);
    font-size: 1px;
    line-height: 1.4;
    text-align: center;
    margin: 0.5rem 0 0;
    user-select: none;
    -webkit-user-select: none;
}
.footer-hidden-text::selection {
    background: var(--ivory);
    color: var(--ivory);
}
.footer-hidden-text::-moz-selection {
    background: var(--ivory);
    color: var(--ivory);
}

.footer-container {
    max-width: var(--width-site);
    margin: 0 auto;
    display: grid;
    /* Brand (left) · locations (page-centred, between equal 1fr sides) · icons (right). */
    grid-template-columns: 1fr auto 1fr;
    gap: 0.64rem;
    /* Bottom-align all three so the logo, "London | Harare | Dubai" and the icons
       share the same baseline at the bottom of the row. */
    align-items: end;
}

.footer-brand {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    min-width: 0;
}

.footer-logo {
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--chestnut);
    margin-bottom: 0;
    text-transform: uppercase;
    line-height: 1;
}

.footer-logo-link {
    text-decoration: none;
    display: inline-block;
    line-height: 1;
    transition: opacity var(--transition-fast);
}

.footer-logo-link:hover {
    opacity: 0.7;
}

.footer-meta {
    font-size: 0.35rem;
    color: var(--chestnut);
    letter-spacing: 0.01rem;
    margin-bottom: 0;
    max-width: none;
    line-height: 1;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.26rem;
}

.footer-links a {
    display: inline-flex;
    /* Sit the icon at the bottom of its tap-target so the symbols bottom-align
       with the PAMUSHA logo and the "London | Harare | Dubai" text in the row. */
    align-items: flex-end;
    justify-content: center;
    width: 1.54rem;
    height: 1.54rem;
    color: var(--chestnut);
    transition: opacity var(--transition-fast);
    line-height: 1;
}

.footer-links a:hover {
    opacity: 0.6;
}

.footer-links svg {
    width: 1.08rem;
    height: 1.08rem;
    display: block;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 0.38rem;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.44rem;
    }

    .footer-links {
        justify-content: center;
        gap: 0.38rem;
    }
}

/* --- Messages --- */
.messages-container {
    position: fixed;
    top: 80px;
    right: var(--edge);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.message {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--chestnut);
    color: var(--ivory);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideIn 0.4s var(--ease-out);
    max-width: 380px;
    letter-spacing: var(--letters-normal);
}

.message-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.5;
    margin-left: auto;
    padding: 0;
}

.message-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Restore the real cursor inside the enquiry popup — the custom blend-mode
   cursor can become invisible against this modal's solid background. */
.enquire-modal,
.enquire-modal * {
    cursor: auto !important;
}
.enquire-modal a,
.enquire-modal button {
    cursor: pointer !important;
}
