/* =============================================================
   BakeWish - Public Stylesheet
   Premium bakery design: warm, elegant, modern
   ============================================================= */

/* ─── Variables ──────────────────────────────────────────── */
:root {
    --primary: #3e2723;
    --primary-light: #5d4037;
    --accent: #8d6e63;
    --cream: #faf6f1;
    --ivory: #fff8f0;
    --rose: #d4a5a5;
    --rose-light: #f0e0e0;
    --gold: #b8860b;
    --text: #3e2723;
    --text-light: #795548;
    --text-muted: #a1887f;
    --border: #e8ddd5;
    --white: #ffffff;
    --success: #4caf50;
    --danger: #e53935;
    --shadow: 0 2px 12px rgba(62, 39, 35, 0.08);
    --shadow-lg: 0 8px 30px rgba(62, 39, 35, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary);
}

h1 { font-size: clamp(28px, 5vw, 42px); }
h2 { font-size: clamp(22px, 3.5vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
    display: flex;
    align-items: center;
    height: 70px;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav .nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary);
    background: var(--cream);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    transition: all var(--transition);
    position: relative;
}

.header-btn:hover { background: var(--cream); }

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-btn { color: #25d366; }
.whatsapp-btn:hover { background: #e8f5e9; }

.mobile-menu-toggle { display: none; }

/* ─── Search Bar ─────────────────────────────────────────── */
.search-bar {
    background: var(--ivory);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    display: none;
}

.search-bar.active { display: block; }

.search-form {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--white);
    outline: none;
}

.search-input:focus { border-color: var(--accent); }

.search-submit, .search-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.search-submit { background: var(--primary); color: #fff; }
.search-close { background: var(--white); color: var(--text); border: 1px solid var(--border); }

/* ─── Mobile Nav ─────────────────────────────────────────── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.mobile-nav-overlay.active { opacity: 1; visibility: visible; }

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--white);
    transform: translateX(100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
}

.mobile-nav-overlay.active .mobile-nav { transform: translateX(0); }

.mobile-nav-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
}

.mobile-nav-links {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.mobile-nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: background var(--transition);
}

.mobile-nav-links a:hover { background: var(--cream); }

.mobile-whatsapp {
    color: #25d366 !important;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

/* ─── Hero Section ───────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #3e2723 0%, #5d4037 50%, #8d6e63 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
    border-radius: 50%;
}

.hero h1 {
    color: #fff;
    margin-bottom: 12px;
    font-size: clamp(32px, 6vw, 52px);
}

.hero .tagline {
    font-size: clamp(16px, 2.5vw, 20px);
    opacity: 0.9;
    margin-bottom: 32px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

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

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-accent {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
}

.btn-accent:hover { background: #c49595; }

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

.btn-outline:hover { background: var(--cream); }

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.btn-whatsapp:hover { background: #1da851; }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }

/* ─── Sections ───────────────────────────────────────────── */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--text-light); font-size: 16px; }

.section-header .line {
    width: 60px;
    height: 3px;
    background: var(--rose);
    margin: 12px auto 0;
    border-radius: 2px;
}

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

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid var(--border);
}

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

.product-card-image {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--cream);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.product-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-new { background: var(--success); color: #fff; }

.product-card-body {
    padding: 16px;
}

.product-card-category {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.product-card-title a:hover { color: var(--accent); }

.product-card-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}

.price-label { font-size: 12px; color: var(--text-muted); }
.price-value { font-size: 18px; font-weight: 700; color: var(--primary); }
.price-from { font-size: 12px; color: var(--text-muted); }

.product-card-actions {
    display: flex;
    gap: 8px;
}

.product-card-actions .btn { flex: 1; justify-content: center; padding: 10px 16px; }

/* ─── Category Grid ──────────────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-decoration: none;
}

.category-card:hover {
    border-color: var(--rose);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.category-card-icon {
    width: 56px;
    height: 56px;
    background: var(--rose-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: var(--primary);
}

.category-card-name {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

/* ─── Feature Cards ──────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.feature-card-icon {
    width: 64px;
    height: 64px;
    background: var(--rose-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--primary);
}

.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-light); }

/* ─── Steps ──────────────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-card h3 { font-size: 16px; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-light); }

/* ─── CTA Section ────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, #3e2723, #5d4037);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ─── Product Detail ─────────────────────────────────────── */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.product-gallery {
    position: sticky;
    top: 90px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
}

.product-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-thumbnails img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition);
}

.product-thumbnails img:hover,
.product-thumbnails img.active { border-color: var(--primary); }

.product-info h1 { margin-bottom: 8px; }

.product-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--rose-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.product-price-block {
    margin-bottom: 20px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* ─── Options ────────────────────────────────────────────── */
.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.option-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
    appearance: auto;
    outline: none;
}

.option-select:focus { border-color: var(--accent); }

.option-radio {
    display: flex;
    gap: 12px;
}

.option-radio label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 400;
    font-size: 14px;
}

.option-radio label:has(input:checked) {
    border-color: var(--primary);
    background: var(--cream);
}

.option-radio input { accent-color: var(--primary); }

.quantity-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.quantity-label { font-size: 14px; font-weight: 600; }

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--cream);
    font-size: 18px;
    color: var(--text);
    transition: background var(--transition);
}

.quantity-control button:hover { background: var(--border); }

.quantity-control input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    outline: none;
}

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

.product-actions .btn { flex: 1; justify-content: center; }

/* ─── Cart ───────────────────────────────────────────────── */
.cart-section { padding: 40px 0; }

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty i { font-size: 64px; color: var(--border); margin-bottom: 16px; }
.cart-empty h2 { margin-bottom: 8px; }
.cart-empty p { color: var(--text-light); margin-bottom: 24px; }

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cart-item-details { flex: 1; }
.cart-item-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cart-item-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-message { font-size: 13px; color: var(--accent); font-style: italic; margin-bottom: 8px; }

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-price { font-size: 16px; font-weight: 700; color: var(--primary); margin-left: auto; }

.cart-summary {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: 90px;
}

.cart-summary h3 { margin-bottom: 16px; }

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
}

.cart-summary-row.total {
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
}

/* ─── Checkout ───────────────────────────────────────────── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    padding: 40px 0;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group label .required { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition);
}

.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #e8f5e9; color: #1b5e20; }
.alert-danger { background: #fef2f2; color: #991b1b; }

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    transform: translateX(120%);
    transition: transform 0.3s;
    box-shadow: var(--shadow-lg);
    max-width: 350px;
}

.toast.show { transform: translateX(0); }
.toast-success { background: #2e7d32; }
.toast-error { background: #c62828; }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination { margin-top: 32px; }
.pagination-list { display: flex; gap: 6px; justify-content: center; }

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: all var(--transition);
    background: var(--white);
}

.pagination-link:hover { border-color: var(--accent); }
.pagination-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    transition: all var(--transition);
}

.footer-social a:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.4); }

.footer-links h3,
.footer-contact h3 {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; opacity: 0.7; transition: opacity var(--transition); }
.footer-links a:hover { opacity: 1; }

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-contact i { margin-top: 3px; opacity: 0.6; width: 16px; }
.footer-contact a { opacity: 0.8; }
.footer-contact a:hover { opacity: 1; }

.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    opacity: 0.6;
}

.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { opacity: 1; }

/* ─── WhatsApp Float ─────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 50;
    transition: transform var(--transition);
}

.whatsapp-float:hover { transform: scale(1.1); }

/* ─── Empty States ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i { font-size: 56px; color: var(--border); margin-bottom: 16px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--text-light); margin-bottom: 24px; }

/* ─── Loading ────────────────────────────────────────────── */
.btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Payment Options ────────────────────────────────────── */
.payment-methods { display: flex; flex-direction: column; gap: 12px; }

.payment-option {
    display: block;
    cursor: pointer;
}

.payment-option input[type="radio"] { display: none; }

.payment-option-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.payment-option input:checked + .payment-option-content {
    border-color: var(--primary);
    background: var(--cream);
}

.payment-option-icon {
    width: 48px;
    height: 48px;
    background: var(--ivory);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.payment-option-content strong {
    display: block;
    font-size: 14px;
}

.payment-option-content span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Order Success ──────────────────────────────────────── */
.order-success-section { padding: 40px 0; }

.order-success-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 40px;
    text-align: center;
}

.order-success-icon { font-size: 72px; color: var(--success); margin-bottom: 16px; }
.order-success-card h1 { font-family: 'Playfair Display', serif; margin-bottom: 8px; }
.order-success-subtitle { color: var(--text-muted); margin-bottom: 24px; }

.order-success-number {
    display: inline-block;
    background: var(--cream);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 24px;
}

.order-success-details {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.order-detail-row:last-child { border-bottom: none; }
.order-detail-row span { color: var(--text-muted); }
.order-detail-row.order-detail-total { font-size: 16px; border-bottom: none; padding-top: 12px; }
.order-detail-row.order-detail-total span { color: var(--text); }

.order-success-address {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 24px;
    padding: 16px 20px;
    background: var(--cream);
    border-radius: var(--radius-sm);
}

.order-success-address strong { display: block; margin-bottom: 8px; }
.order-success-address p { margin: 0; font-size: 14px; color: var(--text-light); }

.order-success-items {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 24px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.order-success-items h3 { font-size: 14px; margin-bottom: 12px; }

.order-success-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.order-success-item:last-child { border-bottom: none; }

.order-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ─── Order View ─────────────────────────────────────────── */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-primary { background: #efebe9; color: var(--primary); }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #fef2f2; color: #991b1b; }

/* ─── Layout Classes ──────────────────────────────────────── */
.products-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    align-items: start;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .product-gallery { position: static; }
    .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .whatsapp-btn { display: none; }

    .header-inner { height: 60px; }

    .hero { padding: 50px 0; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

    .cart-item { flex-direction: column; }
    .cart-item-image { width: 100%; height: 200px; }
    .cart-item-actions { flex-wrap: wrap; }

    .form-row { grid-template-columns: 1fr; }

    .products-layout { grid-template-columns: 1fr; }
    .products-layout aside { position: static !important; }
    .cart-layout { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-card-body { padding: 12px; }
    .product-card-title { font-size: 14px; }
    .product-card-actions { flex-direction: column; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-item-actions { flex-direction: column; align-items: flex-start; }
    .cart-item-price { margin-left: 0; margin-top: 4px; }
    .products-layout { grid-template-columns: 1fr; }
    .products-layout aside { position: static !important; }
    .pagination-link { min-width: 32px; height: 36px; padding: 0 8px; font-size: 13px; }
}

/* ─── Customer Lead Popup ─────────────────────────────────── */
.lead-popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    pointer-events: none;
}
.lead-popup-overlay.active { opacity: 1; visibility: visible; }
.lead-popup {
    background: var(--white); border-radius: var(--radius); padding: 36px 32px;
    max-width: 400px; width: 100%; position: relative; text-align: center;
    box-shadow: var(--shadow-lg); transform: translateY(20px); transition: transform 0.3s ease;
}
.lead-popup-overlay.active .lead-popup { transform: translateY(0); pointer-events: auto; }
.lead-popup-close {
    position: absolute; top: 12px; right: 16px; background: none; border: none;
    font-size: 24px; color: var(--text-muted); cursor: pointer; line-height: 1;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all 0.2s;
}
.lead-popup-close:hover { background: var(--cream); color: var(--text); }
.lead-popup-icon {
    width: 56px; height: 56px; margin: 0 auto 16px; background: var(--cream);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.lead-popup-icon i { font-size: 24px; color: var(--primary); }
.lead-popup-title {
    font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600;
    color: var(--primary); margin-bottom: 6px;
}
.lead-popup-subtitle {
    font-size: 13px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5;
}
.lead-popup-form { text-align: left; }
.lead-popup-field { margin-bottom: 16px; }
.lead-popup-field label {
    display: block; font-size: 13px; font-weight: 500; color: var(--text-light);
    margin-bottom: 6px;
}
.lead-popup-field .form-control {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; background: var(--white);
    outline: none; transition: border-color 0.2s;
}
.lead-popup-field .form-control:focus { border-color: var(--accent); }
.lead-popup-error {
    background: #fef2f2; color: var(--danger); font-size: 13px; padding: 8px 12px;
    border-radius: var(--radius-sm); margin-bottom: 16px; text-align: center;
}
.lead-popup-submit {
    width: 100%; padding: 12px; font-size: 15px; font-weight: 600; border: none;
    border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lead-popup-skip {
    width: 100%; padding: 10px; background: none; border: none;
    color: var(--text-muted); font-size: 13px; cursor: pointer;
    transition: color 0.2s; text-align: center;
}
.lead-popup-skip:hover { color: var(--text); }

@media (max-width: 480px) {
    .lead-popup { padding: 28px 20px; margin: 0 8px; }
    .lead-popup-title { font-size: 20px; }
}

/* ─── Cart Quantity Controls ──────────────────────────────── */
.quantity-control {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
}
.quantity-control button {
    width: 32px; height: 32px;
    border: none; background: var(--cream);
    cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.quantity-control button:hover { background: var(--border); }
.qty-display {
    width: 40px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
}
.cart-remove-btn {
    background: none; border: none; color: var(--danger);
    cursor: pointer; font-size: 13px; padding: 4px;
}
.cart-remove-btn:hover { opacity: 0.7; }
