@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,500&display=swap');

:root {
    --primary: #d4af37; /* Royal Gold */
    --primary-light: #f3e5ab;
    --primary-rgb: 212, 175, 55;
    
    --accent: #ff4f81; /* Sweet Raspberry Pink */
    --accent-rgb: 255, 79, 129;
    
    --bg-color: #0c0e12; /* Rich Velvet Black */
    --surface-color: rgba(22, 26, 34, 0.85); /* Glass surface */
    --surface-overlay: rgba(30, 36, 47, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-color: #f5f6f8;
    --text-muted: #9fa6b2;
    --text-on-accent: #ffffff;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Light Theme Class Override variables */
.light-theme {
    --bg-color: #f3f5f8;
    --surface-color: rgba(255, 255, 255, 0.75);
    --surface-overlay: rgba(255, 255, 255, 0.98);
    --border-color: rgba(0, 0, 0, 0.12);
    --text-color: #1a1e26;
    --text-muted: #5e6675;
}

/* Light Theme inputs and selects */
.light-theme .form-input,
.light-theme .form-textarea,
.light-theme .filter-select,
.light-theme select.form-input,
.light-theme .modal-content input,
.light-theme .modal-content select,
.light-theme .modal-content textarea,
.light-theme input,
.light-theme select,
.light-theme textarea {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a1e26 !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}

.light-theme .glass {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.6);
}

.light-theme .divider {
    color: #5e6675;
}
.light-theme .divider::before,
.light-theme .divider::after {
    background: rgba(0, 0, 0, 0.15) !important;
}

.light-theme .option-badge {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1e26;
    border-color: rgba(0, 0, 0, 0.1);
}
.light-theme .option-badge:hover {
    background: var(--primary);
    color: #ffffff;
}
.light-theme .option-badge.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}


/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

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

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Glassmorphism Classes */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #e63956 100%);
    color: var(--text-on-accent);
    box-shadow: 0 4px 15px rgba(255, 79, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 79, 129, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #000;
    font-weight: 700;
}

.btn-icon {
    padding: 12px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    padding: 80px 0 40px;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 54px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Catalog section */
.catalog-section {
    padding: 40px 0 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 32px;
}

.filter-bar {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    outline: none;
    cursor: pointer;
    color: var(--text-color);
}

.filter-select option, select option {
    background-color: #161a22; /* Matches --surface-color base */
    color: var(--text-color);
}

.cakes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.cake-card {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.cake-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 79, 129, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.cake-img-container {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: #14171f;
}

.cake-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cake-card:hover .cake-img {
    transform: scale(1.08);
}

.cake-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(12, 14, 18, 0.85);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.cake-info {
    padding: 20px;
}

.cake-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.cake-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cake-price .currency {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--border-radius-lg);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface-overlay);
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.01);
    position: relative;
    flex-shrink: 0;
    width: 100%;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Customizer Form & Visual Cake Preview */
.customizer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* Interactive SVG Cake Visualizer */
.cake-preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 0;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    padding: 24px;
}

.svg-cake-canvas {
    width: 100%;
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

.cake-options-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-select, .form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

/* Customizer Option Badges */
.option-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-badge {
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.02);
}

.option-badge:hover {
    background: rgba(255,255,255,0.1);
}

.option-badge.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.color-dot-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.color-dot.active {
    border-color: white;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.checkout-summary {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-total {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
}

/* User Auth Modal CSS */
.auth-container {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 10px 0;
}

.auth-title {
    font-family: var(--font-serif);
    font-size: 26px;
    margin-bottom: 12px;
}

.auth-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 14px;
}

.google-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: .25em;
}

.divider:not(:empty)::after {
    margin-left: .25em;
}

/* Admin Dashboard Portal */
.admin-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.admin-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding: 24px;
    border-radius: var(--border-radius-md);
}

.admin-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.upload-drag-zone {
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: var(--border-radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(212, 175, 55, 0.02);
}

.upload-drag-zone:hover, .upload-drag-zone.dragover {
    border-color: var(--accent);
    background: rgba(255, 79, 129, 0.05);
}

.upload-drag-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* Table Style */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(255,255,255,0.03);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.01);
}

.order-badge {
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending { background: rgba(212, 175, 55, 0.15); color: var(--primary); }
.badge-preparing { background: rgba(0, 150, 255, 0.15); color: #0096ff; }
.badge-ready { background: rgba(0, 220, 100, 0.15); color: #00dc64; }
.badge-delivered { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
.badge-cancelled { background: rgba(255, 0, 0, 0.1); color: #ff3b30; }

/* PWA Add to Home Screen Banner */
.pwa-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    width: 90%;
    max-width: 450px;
    z-index: 999;
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    box-shadow: var(--shadow-lg);
    background: rgba(22, 26, 34, 0.95);
    opacity: 0;
    pointer-events: none;
}

.pwa-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-icon {
    font-size: 28px;
}

.pwa-text h4 {
    font-size: 14px;
    font-weight: 600;
}

.mobile-only {
    display: none !important;
}

.catalog-preview-img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* Mobile responsive menu & details */
@media (max-width: 1024px) {
    .pwa-banner {
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) translateY(150px);
        width: 85%;
        max-width: 380px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
        background: rgba(18, 22, 28, 0.98);
        border: 1px solid var(--border-color);
        padding: 24px;
        border-radius: var(--border-radius-md);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    .pwa-banner.show {
        transform: translate(-50%, -50%) translateY(0);
    }
    .pwa-banner-content {
        flex-direction: column;
        gap: 8px;
    }
    .mobile-only {
        display: block !important;
    }
    .desktop-only {
        display: none !important;
    }
    .admin-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 10001;
        overflow-y: auto;
        background: var(--bg-color) !important;
        padding: 24px;
        border-radius: 0;
        border: none;
    }
    .admin-sidebar.active {
        display: block !important;
    }

    .customizer-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .share-widget {
        flex-direction: column;
        align-items: stretch !important;
        text-align: center;
    }

    .share-widget-inputs {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    .share-widget-inputs input {
        width: 100% !important;
    }

    .hero-title {
        font-size: 38px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .modal-content {
        padding: 20px;
        max-height: 95vh;
    }

    /* Convert tables to cards on mobile screens */
    .admin-table-container {
        border: none;
        overflow-x: visible;
    }
    
    .admin-table {
        display: block;
        width: 100%;
        border: none;
    }
    
    .admin-table thead {
        display: none; /* Hide table headers on mobile */
    }
    
    .admin-table tbody {
        display: block;
        width: 100%;
    }
    
    .admin-table tr {
        display: block;
        width: 100%;
        background: var(--surface-overlay);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
        padding: 16px;
        margin-bottom: 20px;
        box-shadow: var(--shadow-md);
        transition: transform 0.2s ease;
    }

    .admin-table tr:hover {
        transform: translateY(-2px);
    }
    
    .admin-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 12px 0;
        border-bottom: 1px dashed var(--border-color);
        font-size: 13px;
        width: 100%;
        gap: 6px;
    }

    .admin-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .admin-table td:first-child {
        padding-top: 0;
    }
    
    /* Prepend custom cell label from data-label attribute */
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--primary-light);
        text-align: left;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.8px;
    }

    /* Prevent overflow on preview images and inputs */
    .catalog-preview-img {
        width: 100% !important;
        height: auto !important;
        max-height: 350px !important;
        border-radius: 8px;
        object-fit: cover;
        border: 1px solid var(--border-color);
    }

    .admin-table td select,
    .admin-table td .btn,
    .admin-table td div {
        text-align: left;
        max-width: 100%;
        width: 100%;
    }

    .admin-table td .btn {
        margin-top: 0 !important;
        width: auto;
    }

    /* Bottom Navigation for Mobile PWA (Installable experience) */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 64px;
        background: rgba(12, 14, 18, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 100;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 11px;
        color: var(--text-muted);
        cursor: pointer;
        padding: 6px;
    }

    .mobile-nav-item.active {
        color: var(--accent);
    }

    .mobile-nav-icon {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .desktop-only {
        display: none !important;
    }

    body {
        padding-bottom: 74px; /* Space for bottom nav */
    }

    .logo-text {
        font-size: 16px !important;
    }

    .filter-bar {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-select {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
    }

    @media (max-width: 480px) {
        .logo-text {
            display: none !important;
        }
    }
}

@media (min-width: 1025px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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

/* Cake customizer live typing effect */
.cake-text-overlay {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    fill: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    text-anchor: middle;
    pointer-events: none;
}

/* Toast Notifications Container */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10005;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: 90%;
}

/* Toast Card */
.toast-card {
    background: rgba(22, 26, 34, 0.95);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    pointer-events: auto;
    animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: all 0.3s ease;
}

.toast-card.success {
    border-left: 4px solid var(--accent);
}

.toast-card.error {
    border-left: 4px solid #ff3b30;
}

.toast-card.info {
    border-left: 4px solid #0096ff;
}

.toast-icon {
    font-size: 18px;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    font-weight: bold;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-main);
}

@keyframes toast-in {
    from {
        transform: translateY(-20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-20px) scale(0.9);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    #toast-container {
        top: 12px;
        right: 50%;
        transform: translateX(50%);
        align-items: center;
    }
}

/* ==========================================
   Full-Screen Customizer Modal Enhancements
   ========================================== */

/* Desktop view (width > 1024px) */
@media (min-width: 1025px) {
    #customizer-modal {
        padding: 0;
    }
    #customizer-modal .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    #customizer-modal .modal-body {
        max-height: calc(100vh - 80px); /* header height is roughly 80px */
    }
}

/* Mobile & Tablet view (width <= 1024px) */
@media (max-width: 1024px) {
    #customizer-modal {
        padding: 0;
    }
    #customizer-modal .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        padding: 0 !important;
        display: block; /* Disable flex-direction: column so it scrolls naturally */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #customizer-modal .modal-header {
        padding: 20px 70px 20px 20px; /* Space on the right for fixed close button */
        border-bottom: 1px solid var(--border-color);
        background: var(--surface-overlay);
    }
    #customizer-modal .close-btn {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 1100;
        background: rgba(12, 14, 18, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    #customizer-modal .modal-body {
        padding: 0 0 80px 0 !important; /* No side padding to let image be edge-to-edge, bottom padding for mobile navigation space */
        overflow-y: visible; /* Scroll is handled by modal-content */
    }
    #customizer-modal .customizer-layout {
        gap: 0; /* Align image and option box properly */
        margin-top: 0;
    }
    /* Let the preview box go edge-to-edge on mobile */
    #customizer-modal .cake-preview-box {
        position: relative;
        top: auto;
        width: 100%;
        padding: 0 0 20px 0;
        border: none;
        background: transparent;
        border-radius: 0;
    }
    /* Preview box label padding */
    #customizer-modal .cake-preview-box h4 {
        padding: 20px 20px 10px 20px;
        margin: 0;
    }
    /* Full-width cake image container */
    #customizer-modal .cake-preview-img-container {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        margin-bottom: 15px !important;
    }
    /* Padding for horizontal gallery and options inside visualizer */
    #customizer-modal #customizer-gallery-thumbnails {
        padding: 0 20px 5px 20px;
    }
    #customizer-modal .cake-preview-box > div:last-of-type {
        padding: 0 20px;
    }
    /* Options Box padding on mobile */
    #customizer-modal .cake-options-box {
        padding: 20px 20px 40px 20px;
    }
}

/* ==========================================
   ACADEMY & CLASS STYLING
   ========================================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.course-card {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.course-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #14171f;
    border-bottom: 1px solid var(--border-color);
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-img {
    transform: scale(1.06);
}

.course-badge-duration {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(12, 14, 18, 0.85);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    text-transform: uppercase;
}

.course-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.course-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.course-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

/* ==========================================
   AI ASSISTANT CHATBOT STYLING
   ========================================== */
.chatbot-trigger-btn {
    position: fixed;
    bottom: 95px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #e63956 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(255, 79, 129, 0.4);
    cursor: pointer;
    z-index: 990;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-trigger-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 25px rgba(255, 79, 129, 0.5);
}

.chatbot-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 500px;
    border-radius: var(--border-radius-md);
    z-index: 995;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.chatbot-panel.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

@media (max-width: 480px) {
    .chatbot-panel {
        width: calc(100% - 32px);
        height: 80vh;
        bottom: 80px;
        right: 16px;
        left: 16px;
    }
}

.chatbot-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.5;
    animation: fadeInUp 0.25s ease forwards;
}

.msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent) 0%, #e63956 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(255, 79, 129, 0.15);
}

.msg-model {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 30px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    height: 38px !important;
    outline: none !important;
    color: var(--text-color) !important;
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #000;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.08);
}

/* typing bubble */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounceDots 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounceDots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   ICING TYPOGRAPHY & SCHEDULER STYLING
   ========================================== */
.font-cursive {
    font-family: 'Dancing Script', cursive, sans-serif !important;
}
.font-block {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
}
.font-serif {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-style: italic !important;
}

/* Option grids for typography controls */
.typo-color-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
}

