/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background: linear-gradient(135deg, #fdf6ec 0%, #faeedd 100%); background-attachment: fixed; color: #3a2e22; line-height: 1.6; }

/* Variables for Warm Bakery Theme — cream bg, gold accent, rich text */
:root {
    --primary: #c9a66b;              /* warm gold */
    --primary-dark: #a88548;         /* deep gold for hover */
    --secondary: #2a1e12;            /* rich coffee for headers */
    --accent: #fff8ee;               /* soft cream cards */
    --dark: #1a1108;                 /* deep brown for header bar */
    --light: #ffffff;                /* clean white cards */
    --light-text: #3a2e22;           /* rich brown body text */
    --muted-text: #6b5945;           /* muted brown for subtle text */
    --bg: #fdf6ec;                   /* cream background */
    --border: rgba(201, 166, 107, 0.25);
    --shadow: 0 6px 20px rgba(42, 30, 18, 0.08);
    --shadow-hover: 0 12px 32px rgba(42, 30, 18, 0.15);
}

/* Typography & Layout */
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { color: var(--secondary); letter-spacing: -0.3px; }
h1 { font-weight: 700; }
h2 { font-weight: 600; }

/* Section headings — elegant decorative style */
section.container h2,
.container > h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
    margin-bottom: 8px;
    font-size: 30px;
}
section.container h2.text-center,
.container > h2.text-center {
    display: block;
    text-align: center;
}
section.container h2::after,
.container > h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 3px;
    margin-top: 10px;
}
section.container h2.text-center::after,
.container > h2.text-center::after {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons — warm gold with soft shadow */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(201, 166, 107, 0.35);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201, 166, 107, 0.45); filter: brightness(1.05); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary-dark); box-shadow: none; }
.btn-outline:hover { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(201, 166, 107, 0.35); }

/* ============================================
   HEADER - DESKTOP VIEW (default, above 768px)
   ============================================ */
.header {
    background: linear-gradient(135deg, #1a1108 0%, #2a1e12 100%);
    padding: 14px 0;
    box-shadow: 0 2px 20px rgba(26, 17, 8, 0.15);
    position: sticky;
    top: 0;
    z-index: 1100;
    border-bottom: 2px solid var(--primary);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* DESKTOP: Hide mobile-only elements */
.mobile-icons.left { display: none !important; }
.close-btn { display: none !important; }
.mobile-only-link { display: none !important; }

/* DESKTOP: Show Login/Cart text links inside nav */
.desktop-auth { display: list-item; }
.desktop-cart { display: list-item; }

/* DESKTOP: Logo with BC Badge */
.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s;
}
.logo:hover { transform: scale(1.02); }
.logo-icon {
    position: relative;
    background: radial-gradient(circle at 30% 30%, #c9a66b 0%, #8a6a3a 100%);
    color: #1a1108;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -1px;
    box-shadow: 0 4px 12px rgba(201, 166, 107, 0.4), inset 0 -2px 4px rgba(0,0,0,0.15);
    border: 2px solid #d4b37a;
    font-family: 'Poppins', serif;
}
.logo-icon::before,
.logo-icon::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 6px;
    height: 10px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}
.logo-icon::before { left: 14px; transform: rotate(-15deg); }
.logo-icon::after { right: 14px; transform: rotate(15deg); }
.logo-text {
    display: inline;
    font-size: 22px;
    letter-spacing: -0.5px;
    color: #fff;
    font-weight: 700;
}
.logo-highlight {
    color: var(--primary);
    margin-left: 4px;
    font-style: italic;
    font-weight: 600;
}

/* DESKTOP: Nav Links inline in center */
.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}
.nav-links a {
    font-weight: 500;
    color: #ffffff;
    transition: color 0.3s, background 0.3s;
    font-size: 16px;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.nav-active {
    color: var(--primary);
    font-weight: 600;
}
.nav-links a.nav-logout { color: #dc3545; }
.nav-links a.nav-logout:hover { color: #ff6b7a; }

/* DESKTOP: Hide the icon-only user/cart (shown on mobile only) */
.mobile-icons.right { display: none !important; }

/* Badge for cart count */
.badge {
    position: absolute;
    top: -6px;
    right: -12px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 11px;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background:
        linear-gradient(135deg, rgba(26, 17, 8, 0.88) 0%, rgba(42, 30, 18, 0.82) 100%),
        radial-gradient(circle at 20% 30%, rgba(201, 166, 107, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 166, 107, 0.18) 0%, transparent 50%),
        #1a1108;
    padding: 90px 20px;
    text-align: center;
    border-bottom: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(201, 166, 107, 0.08) 0%, transparent 60%);
    animation: heroGlow 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}
.hero h1 { font-size: 52px; margin-bottom: 20px; color: var(--primary); font-weight: 700; letter-spacing: -1px; position: relative; }
.hero p { font-size: 19px; margin-bottom: 32px; max-width: 620px; margin-left: auto; margin-right: auto; color: #f5e6d0; position: relative; }
.hero .btn { font-size: 16px; padding: 14px 32px; position: relative; }

/* Category Cards (home page) */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 22px;
    background: linear-gradient(135deg, #fff8ee 0%, #faeedd 100%);
    border-radius: 18px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s, border-color 0.35s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.category-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(201, 166, 107, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}
.category-card:hover::after { opacity: 1; }
.category-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
    box-shadow: 0 6px 16px rgba(201, 166, 107, 0.35);
    transition: transform 0.35s;
}
.category-card:hover .category-icon { transform: scale(1.08) rotate(-5deg); }
.category-card h3 { font-size: 18px; color: var(--secondary); margin-bottom: 10px; font-weight: 600; }
.category-link {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}
.category-card:hover .category-link { gap: 10px; }
.category-link i { font-size: 11px; }

/* Grid Layouts */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; margin-top: 30px; }
.product-card {
    background: var(--light);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.product-card:hover::before { opacity: 1; }
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    background: var(--accent);
    transition: transform 0.4s;
}
.product-card:hover img { transform: scale(1.03); }
.product-card h3 { font-size: 17px; margin-bottom: 10px; color: var(--secondary); font-weight: 600; }
.product-card .price { color: var(--primary-dark); font-size: 22px; font-weight: 700; margin-bottom: 16px; }

/* Forms */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--secondary); font-size: 14px; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #fffdf9;
    color: var(--light-text);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.15);
}

/* Table */
.table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--light); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; color: var(--light-text); }
.table th { background: linear-gradient(135deg, #faf0dc 0%, var(--accent) 100%); font-weight: 600; color: var(--secondary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: rgba(201, 166, 107, 0.05); }

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1108 0%, #2a1e12 100%);
    color: #e8d9c0;
    padding: 50px 0 30px;
    text-align: center;
    margin-top: 70px;
    border-top: 3px solid var(--primary);
}
.footer h3 { color: var(--primary); font-size: 24px; letter-spacing: -0.5px; }
.footer p { margin-top: 16px; font-size: 14px; opacity: 0.85; color: #e8d9c0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(201, 166, 107, 0.2);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.footer-links a {
    color: #e8d9c0;
    font-size: 13px;
    transition: color 0.3s;
    padding: 4px 0;
}
.footer-links a:hover { color: var(--primary); }
.footer-links a i { margin-right: 6px; font-size: 11px; color: var(--primary); opacity: 0.7; }

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
.mt-2 { margin-top: 20px; }
.alert { padding: 15px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; border-left: 4px solid; }
.alert-success { background: #e7f7ec; color: #1e6a34; border-left-color: #28a745; }
.alert-error { background: #fde8ea; color: #8a1c26; border-left-color: #dc3545; }

/* ============================================
   POLICY PAGES (Return, Refund, Privacy, Disclaimer)
   ============================================ */
.policy-hero {
    background: linear-gradient(135deg, #1a1108 0%, #2a1e12 60%, #3d2a18 100%);
    padding: 70px 20px 60px;
    text-align: center;
    border-bottom: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}
.policy-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 100%, rgba(201, 166, 107, 0.18) 0%, transparent 60%);
    pointer-events: none;
}
.policy-hero-inner { position: relative; }
.policy-icon-badge {
    width: 76px; height: 76px;
    margin: 0 auto 22px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #1a1108;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(201, 166, 107, 0.4), inset 0 -3px 6px rgba(0,0,0,0.2);
}
.policy-hero h1 { color: var(--primary); font-size: 42px; margin-bottom: 12px; letter-spacing: -1px; }
.policy-subtitle { color: #e8d9c0; font-size: 17px; max-width: 600px; margin: 0 auto; }

.policy-wrapper { max-width: 900px; padding-top: 40px; padding-bottom: 40px; }
.policy-card {
    background: var(--light);
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.policy-intro {
    font-size: 17px;
    color: var(--muted-text);
    line-height: 1.7;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.policy-section { margin-bottom: 40px; }
.policy-section:last-child { margin-bottom: 0; }
.policy-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.policy-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(201, 166, 107, 0.35);
}
.policy-section h2 { font-size: 22px; color: var(--secondary); margin: 0; }
.policy-section p { color: var(--light-text); margin-bottom: 12px; line-height: 1.7; }
.policy-section p strong { color: var(--secondary); }

.policy-list { margin-top: 12px; padding-left: 0; }
.policy-list li {
    padding: 10px 0 10px 34px;
    position: relative;
    color: var(--light-text);
    line-height: 1.6;
}
.policy-list li i {
    position: absolute;
    left: 0; top: 12px;
    color: #28a745;
    font-size: 14px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 167, 69, 0.12);
    border-radius: 50%;
}
.policy-list li i[style*="#dc3545"] { background: rgba(220, 53, 69, 0.12); }
.policy-list li strong { color: var(--secondary); }

.policy-steps {
    list-style: none;
    padding: 0;
    margin-top: 16px;
    counter-reset: step;
}
.policy-steps li {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--accent);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    align-items: flex-start;
}
.policy-steps .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.policy-steps li > div { color: var(--light-text); line-height: 1.6; padding-top: 4px; }

.refund-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.refund-timeline-card {
    background: var(--accent);
    padding: 24px 20px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.refund-timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.refund-method-icon {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.refund-timeline-card h3 { font-size: 16px; color: var(--secondary); margin-bottom: 6px; }
.refund-timeline-card .refund-time {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 10px;
}
.refund-timeline-card p { font-size: 13px; color: var(--muted-text); line-height: 1.5; margin: 0; }

.policy-warning-box {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, #fff7e0 0%, #fff2cc 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #f0a020;
    margin-top: 10px;
}
.policy-warning-box > i {
    color: #d4860a;
    font-size: 28px;
    flex-shrink: 0;
    padding-top: 2px;
}
.policy-warning-box strong { color: #7a4e08; display: block; margin-bottom: 6px; font-size: 16px; }
.policy-warning-box p { color: #6b4410; margin: 0; font-size: 14px; line-height: 1.6; }

.policy-contact-card {
    display: flex;
    gap: 20px;
    align-items: center;
    background: linear-gradient(135deg, var(--accent) 0%, #f5e6c8 100%);
    padding: 28px;
    border-radius: 16px;
    margin-top: 40px;
    border: 1px solid var(--border);
}
.policy-contact-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(201, 166, 107, 0.4);
}
.policy-contact-card h3 { font-size: 19px; color: var(--secondary); margin-bottom: 4px; }
.policy-contact-card p { color: var(--muted-text); margin-bottom: 12px; font-size: 14px; }
.policy-contact-links { display: flex; gap: 10px; flex-wrap: wrap; }
.policy-contact-links .btn { padding: 9px 20px; font-size: 14px; }

.policy-updated {
    text-align: center;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted-text);
    font-size: 13px;
    font-style: italic;
}

@media (max-width: 768px) {
    .policy-hero { padding: 50px 15px 40px; }
    .policy-hero h1 { font-size: 30px; }
    .policy-subtitle { font-size: 15px; }
    .policy-icon-badge { width: 60px; height: 60px; font-size: 26px; }
    .policy-card { padding: 28px 22px; border-radius: 14px; }
    .policy-section h2 { font-size: 18px; }
    .policy-num { width: 38px; height: 38px; font-size: 13px; }
    .policy-contact-card { flex-direction: column; text-align: center; padding: 22px; }
    .policy-contact-links { justify-content: center; }
}

/* ============================================
   ANIMATIONS & DYNAMIC UX
   ============================================ */

/* Smooth scroll behavior */
html { scroll-behavior: smooth; }

/* Scroll reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Header scroll effect */
.header-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--light);
    border: none;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: #b88655;
    transform: translateY(-3px);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}
.toast-visible { transform: translateX(0); }
.toast-success { background: #28a745; }
.toast-error { background: #dc3545; }

/* Mobile menu overlay */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Image load animation */
.product-card img, .product-detail img {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.product-card img.img-loaded, .product-detail img.img-loaded {
    opacity: 1;
}

/* Button press effect */
.btn { transition: background 0.3s, transform 0.2s, box-shadow 0.2s; }
.btn:active { transform: translateY(0) scale(0.97); }

/* Card hover enhancement */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Footer link hover */
.footer a { transition: color 0.3s, transform 0.3s; display: inline-block; }
.footer a:hover { color: var(--primary); transform: translateY(-2px); }

/* ============================================
   PRODUCT CUSTOMIZATION
   ============================================ */
.customization-section {
    background: linear-gradient(135deg, #fff8ee 0%, #faeedd 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}
.customization-title {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.customization-title i {
    font-size: 16px;
}

/* Font Pill Selector */
.font-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.font-pill {
    padding: 8px 16px;
    border-radius: 25px;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--light-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.font-pill:hover {
    border-color: var(--primary);
    background: rgba(201, 166, 107, 0.08);
    transform: translateY(-1px);
}
.font-pill.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-dark);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(201, 166, 107, 0.4);
}
/* Apply font to each pill for preview */
.font-pill[data-font="Dancing Script"] { font-family: 'Dancing Script', cursive; font-size: 15px; }
.font-pill[data-font="Great Vibes"] { font-family: 'Great Vibes', cursive; font-size: 15px; }
.font-pill[data-font="Playfair Display"] { font-family: 'Playfair Display', serif; font-size: 13px; }
.font-pill[data-font="Pacifico"] { font-family: 'Pacifico', cursive; font-size: 13px; }
.font-pill[data-font="Lobster"] { font-family: 'Lobster', cursive; font-size: 14px; }
.font-pill[data-font="Poppins"] { font-family: 'Poppins', sans-serif; }

/* Live Preview Box */
.preview-box {
    background: #fffdf7;
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    margin-top: 15px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.preview-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
.preview-text {
    font-size: 28px;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    word-break: break-word;
    max-width: 100%;
    font-weight: 600;
}

/* Bulk Pricing Badge */
.bulk-pricing-badge {
    background: linear-gradient(135deg, #e7f7ec 0%, #d4f0dd 100%);
    border: 1px solid rgba(40, 167, 69, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 8px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1e6a34;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.bulk-pricing-badge i {
    color: #28a745;
    font-size: 16px;
}

/* Cart Customization Info */
.cart-custom-info {
    font-size: 12px;
    color: var(--primary-dark);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}
.cart-custom-info i { font-size: 11px; }
.cart-bulk-badge {
    font-size: 11px;
    color: #1e6a34;
    margin-top: 2px;
    font-weight: 500;
}
.cart-bulk-badge i { font-size: 10px; }

/* Products Filter Bar */
.products-filter-bar {
    background: var(--light);
    padding: 22px;
    border-radius: 14px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid var(--border);
}
.products-search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 400px;
}
.products-category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.products-category-pills .btn {
    white-space: nowrap;
    font-size: 14px;
    padding: 8px 18px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--light);
    color: var(--light-text);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    text-decoration: none;
    border: 1px solid var(--border);
}

/* Quantity +/- buttons */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.qty-btn {
    background: #fffdf7;
    border: none;
    color: var(--secondary);
    width: 34px;
    height: 34px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-display {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--secondary);
    background: #fff;
    height: 34px;
    line-height: 34px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

/* Cart Layout */
.cart-wrapper { background: var(--light); padding: 26px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.cart-mobile { display: none; }
.cart-summary { display: flex; justify-content: flex-end; align-items: center; margin-top: 30px; padding-top: 22px; border-top: 2px dashed var(--border); }
.cart-summary-inner { text-align: right; }
.cart-total-label { margin-bottom: 15px; color: var(--muted-text); font-weight: 500; }
.cart-total-amount { font-size: 34px; color: var(--primary-dark); font-weight: 700; letter-spacing: -1px; }
.cart-actions { display: flex; gap: 15px; justify-content: flex-end; }
.cart-btn-whatsapp { background: linear-gradient(135deg, #25D366 0%, #1ea855 100%); font-size: 16px; padding: 12px 25px; box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35); }
.cart-btn-whatsapp:hover { box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45); }
.cart-btn-checkout { font-size: 16px; padding: 12px 25px; }
.cart-discount-badge { background: linear-gradient(135deg, #e7f7ec 0%, #d4f0dd 100%); border: 1px solid rgba(40, 167, 69, 0.25); padding: 14px 20px; border-radius: 12px; margin-bottom: 15px; color: #1e6a34; font-weight: 500; }
.cart-upsell-badge { background: linear-gradient(135deg, #fff8ee 0%, #faeedd 100%); border: 1px solid var(--border); padding: 12px 20px; border-radius: 12px; margin-bottom: 15px; font-size: 14px; color: var(--muted-text); }

/* Cart Card (mobile) */
.cart-card { background: #fffdf7; border-radius: 12px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); }
.cart-card-top { display: flex; align-items: center; gap: 12px; }
.cart-card-img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.cart-card-info { flex: 1; min-width: 0; }
.cart-card-name { font-size: 15px; font-weight: 600; color: var(--secondary); margin: 0 0 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-card-price { font-size: 14px; color: var(--primary-dark); font-weight: 600; }
.cart-card-remove { background: #dc3545; border: none; color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; transition: background 0.2s; }
.cart-card-remove:hover { background: #c82333; }
.cart-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.cart-card-subtotal { font-size: 17px; font-weight: 700; color: var(--primary-dark); }

.page-link:hover { background: var(--primary); color: #fff; transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 6px 14px rgba(201, 166, 107, 0.35); }
.page-link.active { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; font-weight: 700; border-color: var(--primary-dark); }
.page-dots { color: var(--muted-text); font-size: 14px; padding: 0 4px; }

/* Star Rating Input */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 5px;
}
.star-rating input { display: none; }
.star-rating label {
    cursor: pointer;
    font-size: 24px;
    color: #ddd;
    transition: color 0.2s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f39c12;
}

/* ============================================
   TABLET VIEW (769px to 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container { padding: 0 30px; }

    /* Navbar adjustments */
    .nav-links { gap: 15px; }
    .nav-links a { font-size: 14px; }
    .logo { font-size: 20px; }

    /* Hero adjustments */
    .hero { padding: 60px 20px; }
    .hero h1 { font-size: 38px; }
    .hero p { font-size: 16px; }

    /* Product grid: 2 columns on tablet */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    /* Product detail: stack on smaller tablets */
    .product-detail-grid { grid-template-columns: 1fr 1fr; gap: 25px; }

    /* Forms and checkout: keep 2-col but tighter */
    .checkout-grid { gap: 20px; }

    /* Cart table: slightly smaller text */
    .table th, .table td { padding: 10px 12px; font-size: 14px; }

    /* About page */
    .about-content { padding: 30px; }
}

/* ============================================
   MOBILE VIEW (0px to 768px)
   ============================================ */
@media (max-width: 768px) {

    /* MOBILE: Show hamburger + search icons on left */
    .mobile-icons.left {
        display: flex !important;
        font-size: 22px;
        color: var(--light-text);
        gap: 15px;
        align-items: center;
        cursor: pointer;
    }

    /* MOBILE: Show user + cart icons on right */
    .mobile-icons.right {
        display: flex !important;
        font-size: 20px;
        color: var(--light-text);
        gap: 20px;
        align-items: center;
    }
    .mobile-icons.right a { color: var(--light-text); transition: color 0.3s; }
    .mobile-icons.right a:hover { color: var(--primary); }

    /* MOBILE: Center the logo */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 20px;
    }
    .logo-text { display: none; }

    /* MOBILE: Hide the text Login/Cart links (we use icons instead) */
    .desktop-auth { display: none !important; }
    .desktop-cart { display: none !important; }

    /* MOBILE: Transform nav into sliding sidebar */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, #1a1108 0%, #2a1e12 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 70px 25px;
        box-shadow: 2px 0 20px rgba(0,0,0,0.35);
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        gap: 5px;
        overflow-y: auto;
        border-right: 2px solid var(--primary);
    }
    .nav-links.active {
        left: 0;
    }
    .nav-links a {
        font-size: 17px;
        width: 100%;
        display: block;
        padding: 12px 15px;
        border-radius: 8px;
        color: #ffffff;
        border-bottom: none;
        transition: background 0.2s, color 0.2s;
    }
    .nav-links a:hover,
    .nav-links a:active {
        background: rgba(212, 163, 115, 0.15);
        color: var(--primary);
    }
    .nav-links a.nav-active {
        background: rgba(212, 163, 115, 0.2);
        color: var(--primary);
        font-weight: 600;
        border-left: 3px solid var(--primary);
    }
    .nav-links a.nav-logout { color: #dc3545; }
    .nav-links a.nav-logout:hover { background: rgba(220, 53, 69, 0.15); color: #ff6b7a; }

    /* MOBILE: Show sidebar-only links */
    .mobile-only-link { display: list-item !important; }

    /* MOBILE: Show close button inside sidebar */
    .close-btn {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 24px;
        cursor: pointer;
        color: #ffffff;
        width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        transition: background 0.2s, color 0.2s;
    }
    .close-btn:hover { color: var(--primary); background: rgba(212, 163, 115, 0.2); }

    /* Hero adjustments */
    .hero { padding: 40px 15px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }

    /* Cart mobile */
    .cart-heading { font-size: 22px; margin-bottom: 10px; }
    /* Cart: hide table, show cards */
    .cart-desktop { display: none !important; }
    .cart-mobile { display: block !important; }
    .cart-wrapper { padding: 15px; }
    .cart-summary { justify-content: center; }
    .cart-summary-inner { text-align: center; width: 100%; }
    .cart-total-amount { font-size: 26px; }
    .cart-actions { flex-direction: column; gap: 10px; }
    .cart-btn-whatsapp, .cart-btn-checkout { width: 100%; text-align: center; padding: 14px 20px; font-size: 16px; }
    .cart-discount-badge, .cart-upsell-badge { text-align: center; padding: 10px 14px; font-size: 13px; }

    /* Tables scroll horizontally (non-cart tables) */
    .table { display: block; overflow-x: auto; white-space: nowrap; }

    /* Product cards: 2 columns on larger phones, 1 on small */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-card { padding: 15px; }
    .product-card img { height: 150px; }
    .product-card h3 { font-size: 15px; }
    .product-card .price { font-size: 16px; }
    .product-card .btn { padding: 8px 15px; font-size: 13px; }

    /* Contact grid stack */
    .contact-grid { grid-template-columns: 1fr !important; }

    /* Product detail: stack vertically */
    .product-detail-grid { grid-template-columns: 1fr !important; }

    /* Products filter bar: stack vertically on mobile */
    .products-filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 15px;
    }
    .products-search-form {
        max-width: 100%;
        width: 100%;
    }
    .products-category-pills {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    .products-category-pills .btn {
        font-size: 13px;
        padding: 7px 14px;
        flex: 0 0 auto;
    }

    /* Customization section mobile */
    .customization-section {
        padding: 16px;
    }
    .customization-title {
        font-size: 16px;
    }
    .font-pills {
        gap: 6px;
    }
    .font-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    .preview-text {
        font-size: 22px;
    }
    .bulk-pricing-badge {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* Mobile Search Bar */
.mobile-search-bar {
    display: none;
    background: var(--dark);
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid rgba(212, 163, 115, 0.2);
}
.mobile-search-bar.active {
    max-height: 70px;
    padding: 12px 20px;
}
.mobile-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.mobile-search-form .form-control {
    flex: 1;
    padding: 10px 14px;
    border-radius: 25px;
    font-size: 14px;
}
.mobile-search-form .btn {
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 14px;
    flex-shrink: 0;
}
#search-icon {
    cursor: pointer;
    transition: color 0.3s;
}
#search-icon:hover,
#search-icon.active {
    color: var(--primary);
}

@media (max-width: 768px) {
    .mobile-search-bar {
        display: block;
    }
}

/* ============================================
   SMALL MOBILE VIEW (0px to 480px)
   ============================================ */
@media (max-width: 480px) {
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14px; }
    .hero { padding: 30px 10px; }

    .product-grid { grid-template-columns: 1fr; }
    .product-card img { height: 200px; }

    .btn { padding: 8px 16px; font-size: 14px; }

    /* Cart total section stack */
    .cart-bottom { flex-direction: column; align-items: stretch !important; gap: 15px; }
    .cart-bottom .cart-actions { justify-content: center; flex-wrap: wrap; }
}
