/* ==========================================================================
   ZARGHOON JEWELLERS - Design Foundation (Phase 1)
   This file establishes the reusable design system only: CSS variables,
   a sane reset, base typography, and a couple of generic utility classes.
   Homepage/shop/product component styling is intentionally NOT included
   yet - it will be added in a later phase once those pages are built.
   ========================================================================== */

:root {
    --ivory: #F8F5F0;
    --gold: #B08A4A;
    --black: #111111;
    --text: #292725;
    --light-gold: #E7D6B5;
    --card: #F1ECE4;

    /* Derived tones used for hover/border states */
    --gold-dark: #8f6f39;
    --white: #FFFFFF;
    --border-soft: rgba(17, 17, 17, 0.08);

    /* Phase 8: named aliases matching the brand spec exactly, so new
       component CSS can reference the spec's own variable names without
       renaming (and risking breakage of) every existing declaration. */
    --gold-light: var(--light-gold);
    --muted: #77716A;
    --border: var(--border-soft);

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

    /* Shared measurements, reused across future component CSS */
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 30px rgba(17, 17, 17, 0.06);
    --container-max: 1280px;

    /* Phase 8: animation timing scale (spec Part 35) */
    --ease-fast: 180ms ease;
    --ease-normal: 300ms ease;
    --ease-slow: 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Respect prefers-reduced-motion globally: collapses every transition/
   animation duration to near-zero rather than disabling each one by
   hand, so nothing here needs a parallel "no-motion" variant. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------------
   Reset
   --------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--ivory);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------------------------------------------------------------------
   Accessibility foundation (Phase 8)
   --------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    z-index: 3000;
    background-color: var(--black);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: top var(--ease-fast);
}

.skip-link:focus {
    top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ---------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--black);
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 0.5em;
    letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1em;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.text-muted {
    color: #6b6864;
}

/* ---------------------------------------------------------------------
   Layout utilities
   --------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 72px 0;
}

.section-tight {
    padding: 48px 0;
}

.bg-dark {
    background-color: var(--black);
    color: var(--white);
}

.bg-card {
    background-color: var(--card);
}

.gold-rule {
    width: 64px;
    height: 2px;
    background-color: var(--gold);
    border: none;
    margin: 18px 0;
}

/* ---------------------------------------------------------------------
   Buttons (base styles only - variants/hover choreography can be
   extended once real page templates exist)
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
    background-color: var(--black);
    border-color: var(--black);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--gold);
    border-color: var(--gold);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--black);
    color: var(--black);
}

.btn-outline:hover {
    background-color: var(--black);
    color: var(--white);
}

.btn-gold {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

.btn-gold:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
}

/* ---------------------------------------------------------------------
   Forms (base styles only)
   --------------------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.84rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
}

/* ---------------------------------------------------------------------
   Alerts (used by flash() messages)
   --------------------------------------------------------------------- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.92rem;
}

.alert-success {
    background-color: #e6f4ea;
    color: #256b30;
    border: 1px solid #bfe4c8;
}

.alert-error {
    background-color: #fbe9e7;
    color: #a13324;
    border: 1px solid #f3c6bd;
}

.alert-info {
    background-color: var(--card);
    color: var(--text);
    border: 1px solid var(--light-gold);
}

.form-help {
    font-size: 0.78rem;
    color: #6b6864;
    margin-top: 6px;
}

.form-error {
    font-size: 0.78rem;
    color: #c0392b;
    margin-top: 6px;
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.72rem;
}

.btn-block {
    width: 100%;
}

/* ---------------------------------------------------------------------
   Public site header (Phase 4)
   --------------------------------------------------------------------- */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 500;
    transition: box-shadow var(--ease-normal);
}

/* Phase 8: a small scripted class toggle (assets/js/main.js) - a subtle
   shadow and tighter padding once the page has scrolled, so the header
   never grows heavy or distracting while still feeling "alive". */
.site-header.is-scrolled {
    box-shadow: 0 6px 24px rgba(17, 17, 17, 0.08);
}

.site-header.is-scrolled .site-header-inner {
    padding: 12px 0;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    transition: padding var(--ease-normal);
}

.site-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.site-logo-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
}

.site-logo-tag {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav-link {
    font-size: 0.86rem;
    letter-spacing: 0.03em;
}

.site-nav-link:hover {
    color: var(--gold-dark);
}

.site-nav-hi {
    font-size: 0.86rem;
    color: var(--text);
}

.site-account-icon {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
    padding: 6px;
}

/* Phase 8: the hamburger/menu drawer - a real slide-in panel (not a
   dropdown), with a dedicated overlay and close button, and body-scroll
   locked while open (see assets/js/main.js). */
.site-account-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(17, 17, 17, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--ease-normal);
}

.site-account-menu-overlay.open {
    display: block;
    opacity: 1;
}

.site-account-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    max-width: 86vw;
    background-color: var(--white);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 64px 28px 24px;
    transform: translateX(100%);
    transition: transform var(--ease-normal);
    box-shadow: -12px 0 40px rgba(17, 17, 17, 0.12);
}

.site-account-menu.open {
    transform: translateX(0);
}

.site-account-menu-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--black);
    padding: 6px;
}

.site-account-menu a {
    padding: 12px 0;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-soft);
}

.site-account-menu a:last-child {
    border-bottom: none;
}

/* ---------------------------------------------------------------------
   Public site footer (Phase 4, expanded Phase 8)
   --------------------------------------------------------------------- */
.site-footer {
    background-color: var(--black);
    color: #cfcbc3;
    margin-top: 48px;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 32px;
    padding: 56px 0 40px;
}

.footer-col .site-logo-name {
    color: var(--white);
}

.footer-col .text-muted {
    color: #a8a39a;
    font-size: 0.86rem;
}

.footer-col h4 {
    color: var(--gold-light);
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: #cfcbc3;
    font-size: 0.88rem;
}

.footer-col a:hover {
    color: var(--gold);
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    font-size: 0.78rem;
    text-align: center;
    color: #8a857c;
}

/* Generic link-list utility, reused outside the footer (e.g. the social
   row on contact.php) - kept separate from .footer-col so it isn't tied
   to the footer's dark-background color. */
.site-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------------------------------------------------------------------
   Auth pages: register / login / forgot / reset password (Phase 4)
   --------------------------------------------------------------------- */
.auth-section {
    padding: 56px 0;
}

.auth-container {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background-color: var(--white);
    border: 1px solid var(--light-gold);
    border-radius: var(--radius-md);
    padding: 40px 36px;
    box-shadow: var(--shadow-soft);
}

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--gold-dark);
    font-weight: 500;
}

/* ---------------------------------------------------------------------
   Account pages (Phase 4)
   --------------------------------------------------------------------- */
.account-section {
    padding: 48px 0 72px;
}

.account-heading {
    margin-bottom: 28px;
}

.account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background-color: var(--card);
    border-radius: var(--radius-md);
    padding: 12px;
}

.account-nav-link {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}

.account-nav-link:hover {
    background-color: var(--white);
}

.account-nav-link.active {
    background-color: var(--black);
    color: var(--white);
}

.account-nav-link.is-disabled {
    color: #a39d90;
    cursor: default;
}

.account-nav-link.is-disabled:hover {
    background-color: transparent;
}

.account-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.account-card {
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.account-card.is-disabled {
    opacity: 0.7;
}

.account-card h3 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.tag-coming-soon {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background-color: var(--card);
    color: var(--gold-dark);
    padding: 3px 10px;
    border-radius: 20px;
}

.account-panel {
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-soft);
}

.account-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin: 0 0 24px;
}

.account-info dt {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8579;
    margin-bottom: 4px;
}

.account-info dd {
    margin: 0;
    font-size: 0.98rem;
}

.account-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Header icons: search / cart / account (Phase 5)
   --------------------------------------------------------------------- */
.site-header-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
    padding: 8px;
    display: inline-flex;
}

.site-icon-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--gold);
    color: var(--white);
    font-size: 0.6rem;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.site-search-panel {
    display: none;
    background-color: var(--white);
    border-top: 1px solid var(--border-soft);
    padding: 16px 0;
}

.site-search-panel.open {
    display: block;
}

.site-search-panel form {
    display: flex;
    gap: 10px;
}

.site-search-panel input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

body.no-scroll {
    overflow: hidden;
}

/* ---------------------------------------------------------------------
   Breadcrumbs (Phase 5)
   --------------------------------------------------------------------- */
.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #6b6864;
    padding: 18px 0 0;
}

.breadcrumbs a:hover {
    color: var(--gold-dark);
}

.breadcrumb-current {
    color: var(--text);
}

/* ---------------------------------------------------------------------
   Category / collection landing pages (Phase 5)
   --------------------------------------------------------------------- */
.category-hero-inner {
    display: flex;
    gap: 28px;
    align-items: center;
    padding-top: 20px;
    flex-wrap: wrap;
}

.category-hero-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.category-count {
    color: var(--gold-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.collection-card {
    display: block;
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.collection-card:hover {
    box-shadow: var(--shadow-soft);
}

.collection-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.collection-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background-color: var(--card);
    color: var(--gold);
}

.collection-card-body {
    padding: 18px 20px;
    text-align: center;
}

.collection-card-count {
    font-size: 0.78rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 8px 0 14px;
}

/* ---------------------------------------------------------------------
   Shop toolbar / filters / results (Phase 5)
   --------------------------------------------------------------------- */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.shop-search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 420px;
}

.shop-search-input {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.shop-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.shop-filters-toggle {
    display: none;
}

.shop-sort-select {
    min-width: 210px;
}

.shop-search-status {
    margin-bottom: 18px;
    font-size: 0.92rem;
}

.shop-clear-search {
    margin-left: 10px;
    color: var(--gold-dark);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.shop-result-count {
    font-size: 0.85rem;
    color: #6b6864;
    margin-bottom: 16px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

.shop-filters {
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 20px;
}

.shop-filters-head {
    display: none;
}

.shop-filters-overlay {
    display: none;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group > label {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    color: var(--text);
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-range .form-control {
    padding: 10px 12px;
}

.empty-state {
    text-align: center;
    padding: 56px 20px;
    color: #6b6864;
}

.empty-state .icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background-color: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

/* ---------------------------------------------------------------------
   Product grid + card (Phase 5)
   --------------------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    /* Without align-content/align-items: start, a grid with only one
       (short) row - e.g. a "You May Also Like" section with a single
       related product - stretches that lone row to fill the section's
       full height by default grid alignment, blowing up the card's
       aspect-ratio media box. Sizing to content keeps every card the
       same natural height regardless of how many rows/items exist. */
    align-content: start;
    align-items: start;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.product-card-media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--card);
}

.product-card-image-link {
    /* Absolutely positioned (not display:block + height:100%) so this
       link never participates in normal-flow sizing of its parent -
       .product-card-media's height comes ONLY from aspect-ratio against
       its grid-track width. A normal-flow child with a percentage
       height here created a sizing ambiguity that blew up the card's
       height whenever it was the only item in its grid row. */
    position: absolute;
    inset: 0;
}

.product-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.5s ease;
}

.product-card-image.is-secondary {
    opacity: 0;
}

.product-card-media:hover .product-card-image.is-primary {
    opacity: 0;
}

.product-card-media:hover .product-card-image.is-secondary {
    opacity: 1;
}

.product-card-media:hover .product-card-image {
    transform: scale(1.05);
}

.product-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.product-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--white);
}

.badge-new {
    background-color: var(--gold);
}

.badge-bestseller {
    background-color: var(--black);
}

.badge-featured {
    background-color: var(--gold-dark);
}

.product-card-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.wishlist-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--black);
}

.wishlist-btn.is-active {
    color: #c0392b;
}

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

.product-card-body {
    padding: 16px 18px 20px;
    text-align: center;
}

.product-card-name {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.product-card-name a:hover {
    color: var(--gold-dark);
}

.product-card-meta {
    font-size: 0.78rem;
    color: #6b6864;
    margin-bottom: 8px;
}

.product-card-price {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--black);
    margin-bottom: 10px;
}

.stock-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.stock-in_stock {
    background-color: #e6f4ea;
    color: #256b30;
}

.stock-out_of_stock {
    background-color: #fbe9e7;
    color: #a13324;
}

.stock-made_to_order {
    background-color: #e7effa;
    color: #24487a;
}

/* ---------------------------------------------------------------------
   Product detail page (Phase 5)
   --------------------------------------------------------------------- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-top: 24px;
}

.product-gallery-main {
    aspect-ratio: 4 / 5;
    background-color: var(--card);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.product-gallery-thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.product-gallery-thumbs img.active,
.product-gallery-thumbs img:hover {
    opacity: 1;
    border-color: var(--gold);
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 17, 17, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}

.lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
}

.product-info-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.product-sku {
    color: #6b6864;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.product-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}

.product-facts span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a8579;
    margin-bottom: 4px;
}

.product-gold-rate {
    font-size: 0.88rem;
    color: #6b6864;
    margin-bottom: 14px;
}

.product-price-breakdown {
    background-color: var(--card);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.86rem;
}

.product-price-breakdown div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.product-price {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 8px;
}

.product-price-disclaimer {
    font-size: 0.76rem;
    color: #8a8579;
    margin-bottom: 18px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.product-cart-form {
    display: flex;
    gap: 10px;
}

.product-qty-input {
    max-width: 90px;
}

.product-actions .btn.is-active {
    border-color: #c0392b;
    color: #c0392b;
}

.product-description {
    padding: 40px 0;
    border-top: 1px solid var(--border-soft);
    margin-top: 40px;
}

.section-heading {
    text-align: center;
    margin-bottom: 28px;
}

/* ---------------------------------------------------------------------
   Cart page (Phase 5)
   --------------------------------------------------------------------- */
.cart-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.cart-row {
    display: grid;
    grid-template-columns: 80px 1fr 170px 120px auto;
    gap: 16px;
    align-items: center;
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.cart-row-image img,
.cart-row-image .product-card-placeholder {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card);
    color: var(--gold);
}

.cart-row-info a {
    font-weight: 500;
}

.cart-row-qty {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cart-row-qty input {
    width: 70px;
    padding: 8px 10px;
}

.cart-row-total {
    font-family: var(--font-serif);
    font-weight: 600;
    text-align: right;
}

.cart-summary {
    max-width: 380px;
    margin-left: auto;
    background-color: var(--card);
    border-radius: var(--radius-md);
    padding: 24px;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.cart-summary .btn {
    margin-bottom: 10px;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------------
   Flash message action link (Phase 6, e.g. "Added to your bag. View Cart")
   --------------------------------------------------------------------- */
.alert-action {
    font-weight: 600;
    text-decoration: underline;
    margin-left: 6px;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Cart quantity stepper + summary lines (Phase 6)
   --------------------------------------------------------------------- */
.cart-row-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-row-qty form {
    display: inline-flex;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    background-color: var(--white);
    color: var(--black);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 500;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: #6b6864;
    padding: 4px 0;
}

.empty-state-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--black);
    margin: 0;
}

/* ---------------------------------------------------------------------
   Checkout page (Phase 6)
   --------------------------------------------------------------------- */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: start;
}

.checkout-items {
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 10px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.9rem;
}

.checkout-summary-panel {
    position: sticky;
    top: 90px;
}

/* ---------------------------------------------------------------------
   Gold rate header ticker (Phase 7)
   --------------------------------------------------------------------- */
.site-gold-ticker {
    background-color: var(--black);
    color: var(--light-gold);
}

.site-gold-ticker-inner {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 6px 0;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.site-logo-image {
    height: 40px;
    display: block;
}

/* ---------------------------------------------------------------------
   Homepage hero slider (Phase 7)
   --------------------------------------------------------------------- */
.hero-slider {
    position: relative;
    height: 620px;
    max-height: 82vh;
    overflow: hidden;
    background-color: var(--black);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-media-placeholder {
    background: linear-gradient(135deg, #111 0%, #2a2620 100%);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17,17,17,0.35) 0%, rgba(17,17,17,0.65) 100%);
}

.hero-slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.hero-slide-content h1 {
    color: var(--white);
    max-width: 760px;
    margin: 0 auto 16px;
}

.hero-slide-content p {
    max-width: 560px;
    margin: 0 auto 24px;
    color: #e9e5dd;
    font-size: 1.05rem;
}

.hero-slide-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-light {
    border-color: var(--white);
    color: var(--white);
}

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

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--white);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-nav:hover {
    background-color: rgba(255,255,255,0.28);
}

.hero-nav-prev { left: 20px; }
.hero-nav-next { right: 20px; }

.hero-dots {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
    z-index: 5;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    padding: 0;
}

.hero-dot.active {
    background-color: var(--gold);
    width: 22px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------------
   Shop by Category grid (Phase 7)
   --------------------------------------------------------------------- */
.homepage-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.homepage-category-card {
    display: block;
    background-color: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.25s ease;
}

.homepage-category-card:hover {
    box-shadow: var(--shadow-soft);
}

.homepage-category-card img,
.homepage-category-card .collection-card-placeholder {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.homepage-category-card-body {
    padding: 16px;
}

.homepage-category-card-body h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.homepage-category-link {
    font-size: 0.78rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------------
   Collection banner (Phase 7)
   --------------------------------------------------------------------- */
.collection-banner {
    position: relative;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--black);
    overflow: hidden;
}

.collection-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.5);
}

.collection-banner-content {
    position: relative;
    color: var(--white);
    width: 100%;
}

.collection-banner-content h2 {
    color: var(--white);
}

.collection-banner-content p {
    max-width: 520px;
    margin: 0 auto 20px;
    color: #e9e5dd;
}

/* ---------------------------------------------------------------------
   Why Zarghoon features (Phase 7)
   --------------------------------------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 28px 18px;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--gold);
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

/* ---------------------------------------------------------------------
   Public gold rate section (Phase 7)
   --------------------------------------------------------------------- */
.gold-rate-public-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.gold-rate-public-card {
    background-color: var(--white);
    border: 1px solid var(--light-gold);
    border-radius: var(--radius-md);
    padding: 22px 32px;
    min-width: 140px;
}

.gold-rate-public-card .karat {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--gold-dark);
    margin-bottom: 6px;
}

.gold-rate-public-card .rate {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   About section (Phase 7)
   --------------------------------------------------------------------- */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-md);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.about-content p {
    line-height: 1.75;
}

/* ---------------------------------------------------------------------
   Instagram gallery (Phase 7)
   --------------------------------------------------------------------- */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.instagram-tile {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.instagram-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-tile:hover img {
    transform: scale(1.06);
}

/* ---------------------------------------------------------------------
   Newsletter section (Phase 7)
   --------------------------------------------------------------------- */
.newsletter-section {
    background-color: var(--black);
    color: #e9e5dd;
}

.newsletter-section h2 {
    margin-top: 8px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 480px;
    margin: 24px auto 0;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.25);
    background-color: rgba(255,255,255,0.08);
    color: var(--white);
}

.newsletter-form input[type="email"]::placeholder {
    color: #a8a39a;
}

/* ---------------------------------------------------------------------
   Contact page (Phase 7)
   --------------------------------------------------------------------- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
    align-items: start;
}

.contact-info-panel a:hover {
    color: var(--gold-dark);
}

/* ---------------------------------------------------------------------
   Hero entrance animation (Phase 8)
   Text and image both animate in once on load - never looping, never
   re-triggering on slide change, so it reads as a single editorial
   "reveal" rather than a distracting effect. Disabled entirely when
   the OS-level reduced-motion setting is on (see the global rule near
   the top of this file).
   --------------------------------------------------------------------- */
.hero-slide-content .container > * {
    opacity: 0;
    transform: translateY(18px);
    animation: heroFadeUp var(--ease-slow) forwards;
}

.hero-slide-content .eyebrow { animation-delay: 0.05s; }
.hero-slide-content h1 { animation-delay: 0.15s; }
.hero-slide-content p { animation-delay: 0.28s; }
.hero-slide-content .hero-slide-buttons { animation-delay: 0.4s; }

@keyframes heroFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.hero-slide-media {
    animation: heroImageScale 8s ease-out forwards;
}

@keyframes heroImageScale {
    from { transform: scale(1.06); }
    to { transform: scale(1); }
}

/* ---------------------------------------------------------------------
   Category card hover zoom (Phase 8)
   --------------------------------------------------------------------- */
.homepage-category-card img {
    transition: transform var(--ease-slow);
}

.homepage-category-card:hover img {
    transform: scale(1.04);
}

/* ---------------------------------------------------------------------
   Quick View trigger + modal (Phase 8, Part 9/32)
   --------------------------------------------------------------------- */
.product-card-quickview {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -44px;
    background-color: var(--white);
    color: var(--black);
    border: none;
    padding: 11px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--ease-normal), bottom var(--ease-normal);
    z-index: 3;
}

.product-card-media:hover .product-card-quickview,
.product-card-quickview:focus {
    opacity: 1;
    bottom: 12px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(17, 17, 17, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
}

.modal-panel {
    background-color: var(--white);
    border-radius: var(--radius-md);
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    animation: modalPop var(--ease-normal);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: var(--card);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.quickview-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.quickview-image {
    aspect-ratio: 4 / 5;
    background-color: var(--card);
    overflow: hidden;
}

.quickview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quickview-info {
    padding: 32px 28px;
}

.quickview-info h3 {
    margin-bottom: 6px;
}

.quickview-info .product-price {
    font-size: 1.6rem;
    margin: 12px 0;
}

/* ---------------------------------------------------------------------
   Toast notifications (Phase 8)
   Reuses the existing server-rendered .alert markup (see
   includes/header.php) but repositions it as a stacked, auto-dismissing
   corner toast instead of a full-width inline banner - no change to the
   PRG/flash() flow that produces the message itself.
   --------------------------------------------------------------------- */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
}

.toast {
    background-color: var(--white);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: 14px 18px;
    font-size: 0.88rem;
    transform: translateX(120%);
    animation: toastIn var(--ease-normal) forwards;
}

.toast.toast-success { border-left-color: #2f8f4e; }
.toast.toast-error { border-left-color: #c0392b; }
.toast.toast-info { border-left-color: var(--gold); }

.toast.toast-hide {
    animation: toastOut var(--ease-fast) forwards;
}

@keyframes toastIn {
    to { transform: translateX(0); }
}

@keyframes toastOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* ---------------------------------------------------------------------
   Scroll reveal (Phase 8) - toggled by IntersectionObserver in main.js.
   Elements are visible by default (progressive enhancement: JS failing
   to load must never hide content).
   --------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--ease-slow), transform var(--ease-slow);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Static content pages (About, FAQ, Privacy, Terms, Shipping - Phase 8)
   --------------------------------------------------------------------- */
.content-page h2 {
    margin-top: 36px;
}

.content-page p,
.content-page li {
    line-height: 1.8;
    color: var(--text);
}

.content-page ul,
.content-page ol {
    margin: 0 0 1em 1.4em;
    list-style: disc;
}

.content-page ol {
    list-style: decimal;
}

.faq-item {
    border-bottom: 1px solid var(--border-soft);
    padding: 20px 0;
}

.faq-item h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}
