/* ==========================================================
   IFFA BAZZAR — Design tokens
   Palette: wine #7A2048, gold #E8B84B, ivory #FDF6EE,
            ink #1F1B24, rose #C2185B, emerald #2E5339
   Type: "Cormorant Garamond" display, "Jost" body, "Jost" caps utility
   Signature: scalloped jaali divider motif (echoes suit trims)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Jost:wght@400;500;600&display=swap');

:root {
    --wine: #7A2048;
    --wine-dark: #5A1736;
    --gold: #E8B84B;
    --gold-dark: #C99A2E;
    --ivory: #FDF6EE;
    --ivory-deep: #F5EBDD;
    --ink: #1F1B24;
    --rose: #C2185B;
    --emerald: #2E5339;
    --white: #ffffff;
    --border: #E8DCC8;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', Arial, sans-serif;

    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 18px;

    --shadow-card: 0 2px 14px rgba(31, 27, 36, 0.07);
    --shadow-hover: 0 10px 28px rgba(122, 32, 72, 0.16);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--wine);
    margin: 0;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 12.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-dark);
    font-weight: 600;
}

/* ---------- Scalloped jaali divider — signature element ---------- */
.scallop-divider {
    width: 100%;
    height: 18px;
    background-repeat: repeat-x;
    background-size: 28px 18px;
    background-image: radial-gradient(circle at 14px 0, transparent 12px, var(--gold) 13px, var(--gold) 13.5px, transparent 14px);
    opacity: 0.55;
}
.scallop-divider.flip { transform: rotate(180deg); }

/* ---------- Top utility bar ---------- */
.topbar {
    background: var(--wine);
    color: var(--ivory);
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}
.topbar-track {
    display: inline-flex;
    animation: scrollTrack 28s linear infinite;
    padding: 8px 0;
}
.topbar-track span {
    padding: 0 28px;
    border-right: 1px solid rgba(253, 246, 238, 0.25);
    letter-spacing: 0.02em;
}
@keyframes scrollTrack {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .topbar-track { animation: none; flex-wrap: wrap; }
}

/* ---------- Header ---------- */
.site-header {
    background: var(--ivory);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 24px;
}
.logo img { height: 52px; }
.main-nav {
    display: flex;
    gap: 32px;
    font-size: 15px;
    font-weight: 500;
}
.main-nav a {
    position: relative;
    padding-bottom: 4px;
}
.main-nav a:hover { color: var(--wine); }
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 22px;
}
.header-actions a { position: relative; color: var(--ink); }
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--rose);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-toggle { display: none; font-size: 26px; background: none; border: none; color: var(--wine); }

@media (max-width: 860px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--ivory-deep) 0%, var(--ivory) 60%);
    overflow: hidden;
    padding: 64px 0 0;
}
.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle, var(--wine) 2px, transparent 2.5px);
    background-size: 26px 26px;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    padding-bottom: 48px;
}
.hero-copy .eyebrow { display: block; margin-bottom: 14px; }
.hero-copy h1 {
    font-size: 52px;
    line-height: 1.12;
    margin-bottom: 18px;
}
.hero-copy p {
    font-size: 17px;
    color: #4a4350;
    max-width: 480px;
    margin-bottom: 28px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 40px;
}
.hero-stats div strong {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--wine);
}
.hero-stats div span { font-size: 13px; color: #6b6470; }

.hero-art {
    position: relative;
    display: flex;
    justify-content: center;
}
.hero-art .frame {
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    background: var(--white);
    padding: 10px;
}
.hero-art .frame img { border-radius: var(--radius-md); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--wine); color: var(--ivory); }
.btn-primary:hover { background: var(--wine-dark); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border-color: var(--wine); color: var(--wine); }
.btn-outline:hover { background: var(--wine); color: var(--ivory); }
.btn-gold { background: var(--gold); color: var(--wine-dark); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Trust strip ---------- */
.trust-strip {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 28px 0;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}
.trust-item .ic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ivory-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.trust-item strong { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.trust-item span.sub { color: #777; font-size: 12.5px; }

@media (max-width: 860px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section heading ---------- */
.section { padding: 64px 0; }
.section-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
}
.section-head .eyebrow { display: block; margin-bottom: 10px; }
.section-head h2 { font-size: 36px; margin-bottom: 10px; }
.section-head p { color: #6b6470; font-size: 15.5px; }

/* ---------- Category grid ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card img { width: 100%; aspect-ratio: 6/5; object-fit: cover; }
.category-card .label {
    padding: 16px 18px 20px;
}
.category-card .label h3 { font-size: 21px; margin-bottom: 4px; }
.category-card .label span { font-size: 13px; color: var(--gold-dark); font-weight: 600; }

@media (max-width: 860px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Product grid & cards ---------- */
.collection-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}
.collection-row-head h3 { font-size: 26px; }
.collection-row-head a { font-size: 14px; font-weight: 600; color: var(--wine); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-media {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--ivory-deep);
}
.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.product-media .back-img {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.product-card:hover .back-img { opacity: 1; }
.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--rose);
    color: white;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}
.badge.soldout { background: var(--ink); }
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 15px;
}
.product-info { padding: 14px 16px 18px; }
.product-info .brand { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; }
.product-info h4 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    color: var(--ink);
    margin: 4px 0 8px;
    line-height: 1.35;
    min-height: 40px;
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-weight: 600; color: var(--wine); font-size: 16px; }
.price-was { text-decoration: line-through; color: #999; font-size: 13px; }
.save-tag { font-size: 12px; color: var(--emerald); font-weight: 600; }
.size-pills { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.size-pills span {
    font-size: 11px;
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 4px;
    color: #777;
}

@media (max-width: 980px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-copy h1 { font-size: 36px; }
}

/* ---------- Why choose us ---------- */
.why-section { background: var(--wine); color: var(--ivory); }
.why-section .section-head h2 { color: var(--ivory); }
.why-section .section-head p { color: rgba(253,246,238,0.75); }
.why-section .eyebrow { color: var(--gold); }
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.why-card {
    background: rgba(253,246,238,0.06);
    border: 1px solid rgba(253,246,238,0.18);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
}
.why-card .ic { font-size: 26px; margin-bottom: 12px; }
.why-card h4 { color: var(--ivory); font-family: var(--font-body); font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.why-card p { font-size: 13px; color: rgba(253,246,238,0.7); }

@media (max-width: 860px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Newsletter ---------- */
.newsletter {
    background: var(--gold);
    text-align: center;
    padding: 56px 24px;
}
.newsletter h2 { font-size: 30px; margin-bottom: 8px; color: var(--wine-dark); }
.newsletter p { color: #5a3d10; margin-bottom: 22px; }
.newsletter-form {
    display: flex;
    max-width: 440px;
    margin: 0 auto;
    background: white;
    border-radius: 999px;
    padding: 5px;
    box-shadow: var(--shadow-card);
}
.newsletter-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 18px;
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
}
.newsletter small { display: block; margin-top: 14px; color: #5a3d10; font-size: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(253,246,238,0.8); padding: 56px 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding-bottom: 40px;
}
.footer-grid h4 { color: var(--gold); font-family: var(--font-body); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-grid p { font-size: 14px; line-height: 1.7; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-socials a {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(253,246,238,0.1);
    display: flex; align-items: center; justify-content: center;
}
.footer-contact-item { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14px; align-items: flex-start; }
.footer-bottom {
    border-top: 1px solid rgba(253,246,238,0.12);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(253,246,238,0.55);
}

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- WhatsApp floating button ---------- */
.wa-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 80;
    background: #25D366;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* ---------- Mobile drawer nav ---------- */
.mobile-drawer {
    position: fixed;
    inset: 0;
    background: rgba(31,27,36,0.5);
    z-index: 100;
    display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-panel {
    background: var(--ivory);
    width: 78%;
    max-width: 320px;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.mobile-drawer-panel a { font-size: 16px; font-weight: 500; padding: 6px 0; }
.mobile-drawer-close { align-self: flex-end; font-size: 24px; background: none; border: none; color: var(--wine); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: #777; padding: 18px 0; }
.breadcrumb a { color: var(--wine); }

/* ---------- Page header banner ---------- */
.page-banner {
    background: var(--ivory-deep);
    padding: 36px 0;
    text-align: center;
}
.page-banner h1 { font-size: 34px; }

/* ---------- Filters / sidebar ---------- */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}
.filter-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 18px;
}
.filter-box h4 { font-family: var(--font-body); font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.filter-option { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; color: #555; }

@media (max-width: 860px) {
    .shop-layout { grid-template-columns: 1fr; }
}

/* ---------- Product detail ---------- */
.pdp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.pdp-gallery { display: flex; gap: 12px; }
.pdp-thumbs { display: flex; flex-direction: column; gap: 10px; }
.pdp-thumbs img {
    width: 64px; height: 84px; object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
}
.pdp-thumbs img.active { border-color: var(--wine); }
.pdp-main-image {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ivory-deep);
}
.pdp-main-image img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.pdp-info h1 { font-size: 30px; margin-bottom: 10px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.pdp-price .now { font-size: 26px; font-weight: 600; color: var(--wine); }
.pdp-price .was { font-size: 16px; text-decoration: line-through; color: #999; }
.pdp-meta { font-size: 14px; color: #555; margin-bottom: 20px; }
.pdp-sizes { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 22px; }
.size-btn {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 14px;
    background: white;
}
.size-btn.selected { border-color: var(--wine); background: var(--wine); color: white; }
.size-btn:disabled { color: #bbb; text-decoration: line-through; cursor: not-allowed; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 999px; }
.qty-control button { background: none; border: none; width: 36px; height: 36px; font-size: 16px; }
.qty-control span { width: 30px; text-align: center; font-weight: 500; }
.pdp-actions { display: flex; gap: 12px; margin-bottom: 24px; }
.pdp-description { border-top: 1px solid var(--border); padding-top: 20px; font-size: 14.5px; color: #444; }

@media (max-width: 860px) {
    .pdp-grid { grid-template-columns: 1fr; }
    .pdp-gallery { flex-direction: column-reverse; }
    .pdp-thumbs { flex-direction: row; }
}

/* ---------- Cart page ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #777; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.cart-table td { padding: 16px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-item-info { display: flex; gap: 14px; align-items: center; }
.cart-item-info img { width: 64px; height: 86px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-summary {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
}
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14.5px; }
.cart-summary-row.total { font-weight: 600; font-size: 17px; color: var(--wine); border-top: 1px solid var(--border); padding-top: 14px; }
.remove-link { color: var(--rose); font-size: 13px; }

/* ---------- Forms (checkout / contact) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; color: #444; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14.5px;
    background: white;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: 2px solid var(--gold);
    border-color: var(--wine);
}
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-options label {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 14.5px;
}

@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
}
.alert-success { background: #e6f0e9; color: var(--emerald); border: 1px solid #bcd9c5; }
.alert-error { background: #fbe7ee; color: var(--rose); border: 1px solid #f3c2d5; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state .ic { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 22px; margin-bottom: 10px; }
.empty-state p { color: #777; margin-bottom: 22px; }

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
