/* ============================================
   BONADWAN STOREFRONT — Matching Shopify Design
   Dark nav, white bg, minimalist luxury
   ============================================ */

:root {
    --primary: #1a1a1a;
    --primary-light: #333;
    --accent: #c8a96e;
    --accent-light: #e8d5b0;
    --bg: #ffffff;
    --bg-light: #f8f8f8;
    --text: #333333;
    --text-light: #777777;
    --border: #e5e5e5;
    --white: #ffffff;
    --danger: #dc3545;
    --success: #28a745;
    --max-width: 1200px;
    --header-height: 120px;
    --radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* Announcement Bar */
.announcement-bar {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Header */
.site-header {
    background: var(--primary);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-start, .header-end {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 120px;
}
.header-end { justify-content: flex-end; }

.header-lang {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: all 0.2s;
}
.header-lang:hover { color: #fff; border-color: #fff; }

.header-center { text-align: center; }
.site-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.header-cart {
    position: relative;
    color: var(--white);
    display: flex;
    align-items: center;
}
.cart-count {
    position: absolute;
    top: -8px;
    inset-inline-end: -10px;
    background: var(--accent);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.main-nav {
    background: var(--primary);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 24px;
}
.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link.active { border-bottom: 2px solid var(--accent); }

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    transition: 0.2s;
}
.mobile-menu {
    display: none;
    background: var(--primary);
    padding: 0 24px 16px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    color: rgba(255,255,255,0.8);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 15px;
}
.mobile-menu a:hover { color: #fff; }

/* Main Content */
.site-main {
    min-height: 60vh;
}

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

/* Hero Section */
.hero-section {
    background: var(--bg-light);
    text-align: center;
    padding: 60px 24px;
}
.hero-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.hero-section p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Section Titles */
.section-title {
    text-align: center;
    padding: 48px 0 24px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 0 0 48px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.3s;
    border: 1px solid var(--border);
}
.product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-light);
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-card-image img {
    transform: scale(1.05);
}
.product-card-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--border);
}

.sold-out-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 2px;
    text-transform: uppercase;
}

.product-card-body {
    padding: 16px;
    text-align: center;
}
.product-card-vendor {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.product-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
}
.product-card-title a { color: inherit; }
.product-card-title a:hover { color: var(--accent); }

.product-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.product-card-price .compare-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-weight: 400;
    font-size: 13px;
    margin-inline-start: 6px;
}

.btn-add-cart, .btn-choose {
    display: inline-block;
    padding: 10px 28px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-add-cart {
    background: var(--primary);
    color: var(--white);
}
.btn-add-cart:hover { background: var(--primary-light); }
.btn-choose {
    background: transparent;
    color: var(--primary);
}
.btn-choose:hover { background: var(--primary); color: var(--white); }
.btn-sold-out {
    display: inline-block;
    padding: 10px 28px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-light);
    color: var(--text-light);
    border: 1px solid var(--border);
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Section */
.category-section {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

/* Single Product Page */
.product-detail {
    padding: 48px 0;
}
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 140px;
}
.product-gallery-main {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 12px;
}
.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}
.product-gallery-thumbs .thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
}
.product-gallery-thumbs .thumb.active { border-color: var(--primary); }
.product-gallery-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}
.product-info .product-vendor {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.product-info .product-price {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}
.product-info .product-description {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 24px;
}
.product-info .product-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.product-info .product-meta span {
    display: block;
    margin-bottom: 4px;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
}
.qty-selector button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-light);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-selector input {
    width: 60px;
    height: 40px;
    border: 1px solid var(--border);
    border-inline: none;
    text-align: center;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
}

.product-add-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s;
}
.product-add-btn:hover { background: var(--primary-light); }
.product-add-btn:disabled {
    background: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.stock-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 2px;
    margin-bottom: 16px;
}
.stock-badge.in-stock { background: #d4edda; color: #155724; }
.stock-badge.out-of-stock { background: #f8d7da; color: #721c24; }

/* Page Header */
.page-hero {
    background: var(--bg-light);
    text-align: center;
    padding: 40px 24px;
    border-bottom: 1px solid var(--border);
}
.page-hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 48px 0 0;
    margin-top: 48px;
}
.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.footer-col h3 {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-col p {
    font-size: 13px;
    line-height: 1.8;
}
.footer-col a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}
.social-link:hover { color: var(--white); }

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .main-nav { display: none; }
    .header-lang { display: none; }
    .site-logo h1 { font-size: 22px; }
    .hero-section { padding: 40px 24px; }
    .hero-section h2 { font-size: 26px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card-body { padding: 12px; }
    .product-card-title { font-size: 13px; }
    .product-card-price { font-size: 14px; }
    .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
    .product-gallery { position: static; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .section-title { font-size: 20px; padding: 32px 0 16px; }
    .btn-add-cart, .btn-choose, .btn-sold-out { padding: 8px 16px; font-size: 11px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-card-price { font-size: 13px; margin-bottom: 8px; }
    .product-info h1 { font-size: 22px; }
}
