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

:root {
    /* Brand Colors - Elegant Navy & Gold/Amber */
    --primary-color: #0F172A; /* Slate 900 */
    --primary-dark: #020617; /* Slate 950 */
    --accent-color: #D4AF37; /* Elegant Gold */
    --accent-hover: #F59E0B; /* Amber 500 */
    
    /* UI Colors */
    --secondary-color: #F8FAFC; /* Slate 50 */
    --header-bg: rgba(15, 23, 42, 0.95);
    --card-bg: #FFFFFF;
    
    /* Text */
    --text-color: #334155; /* Slate 700 */
    --text-light: #64748B; /* Slate 500 */
    --text-heading: #0F172A; /* Slate 900 */
    
    /* States & Borders */
    --border-color: #E2E8F0; /* Slate 200 */
    --focus-ring: rgba(212, 175, 55, 0.4); 
    --success-color: #10B981; /* Emerald 500 */
    --error-color: #EF4444; /* Red 500 */
    --button-danger-bg: #DC2626; /* Red 600 */
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global & Body --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    color: var(--text-heading);
    line-height: 1.3;
    margin-top: 0;
    font-weight: 700;
}

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

/* --- Header & Universal Navigation --- */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding-bottom: 16px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.logo:hover {
    color: #fff;
}

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

.main-nav a {
    text-decoration: none;
    color: #CBD5E1;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.main-nav a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.main-nav a.active {
    color: var(--primary-dark);
    background-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* --- Buttons --- */
button, .button-primary, .button-danger, .button-outline, .price-range-btn {
    font-family: 'Inter', sans-serif;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:active, .button-primary:active, .button-outline:active {
    transform: scale(0.97);
}

.button-primary {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    box-shadow: 0 4px 14px 0 rgba(212, 175, 55, 0.39);
}

.button-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.button-primary:disabled {
    background-color: #E2E8F0;
    color: #94A3B8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

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

.button-outline:hover:not(:disabled) {
    border-color: var(--primary-color);
    background-color: var(--secondary-color);
}

.button-danger {
    background-color: var(--error-color);
    color: white;
}

.button-danger:hover:not(:disabled) {
    background-color: var(--button-danger-bg);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
    transform: translateY(-2px);
}

/* --- Form Elements --- */
.form-section {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    border: 1px solid rgba(255,255,255,0.5);
}

.form-section h2 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
    font-size: 1.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    transition: var(--transition);
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

input:focus:not([type="checkbox"]):not([type="radio"]), select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Fix Checkbox/Radio Styling */
.radio-group, .checkbox-group {
    display: flex;
    gap: 25px;
    align-items: center;
}
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    padding: 0;
}
.form-group label {
    display: flex;
    align-items: center;
    font-weight: 400; /* Reset font weight for checkbox labels */
    cursor: pointer;
}

.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-message.visible { display: block; }
.form-message.success { color: #065F46; background-color: #D1FAE5; border: 1px solid #A7F3D0; }
.form-message.error { color: #991B1B; background-color: #FEE2E2; border: 1px solid #FECACA; }
.form-message.info { color: #1E3A8A; background-color: #DBEAFE; border: 1px solid #BFDBFE; }

/* --- Product Grid Layout --- */
.main-layout-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
    margin-bottom: 80px;
}

main#main-content {
    flex: 3;
    min-width: 0;
}

.controls-container {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

#openFilterBtn {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-heading);
    font-weight: 600;
}

#openFilterBtn:hover {
    background-color: #E2E8F0;
}

.product-grid-container {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.product-category-section .section-title {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: inline-block;
}

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

/* --- Product Card --- */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    opacity: 0;
    transition: var(--transition);
}

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

.product-card:hover::before {
    opacity: 1;
}

.product-card h3 {
    margin-top: 0;
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.product-description {
    color: var(--text-light);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 20px;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
}

.quantity-controls {
    display: flex;
    gap: 12px;
}

.quantity-controls select {
    flex: 1;
    background-color: var(--secondary-color);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
}

.quick-add-btn {
    flex-shrink: 0;
    width: 48px;
    padding: 0;
    border-radius: var(--border-radius-sm);
    font-size: 1.25rem;
    color: var(--primary-color);
    background-color: var(--accent-color);
    border: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.quick-add-btn:hover {
    background-color: var(--accent-hover);
    color: white;
}

/* --- Cart Sidebar --- */
#cart-sidebar {
    flex: 1;
    min-width: 340px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 32px;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

#cart-sidebar h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.cart-items-list {
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 24px;
}

/* Scrollbar styling */
.cart-items-list::-webkit-scrollbar { width: 6px; }
.cart-items-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.cart-items-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.cart-items-list::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.95rem;
}

.cart-item .item-name {
    font-weight: 500;
    color: var(--text-heading);
}

.cart-item .item-total {
    font-weight: 700;
    color: var(--primary-color);
}

.cart-summary {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-light);
}

.cart-summary .summary-row.total {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
    margin-bottom: 0;
}

#saveOrderBtn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

/* --- Filter Sidebar --- */
#filterSidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100%; width: 320px;
    background-color: var(--card-bg);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

body.sidebar-open #filterSidebar { transform: translateX(0); }

#sidebarOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

body.sidebar-open #sidebarOverlay { opacity: 1; visibility: visible; }

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-color);
}

.sidebar-header h3 { margin: 0; font-size: 1.5rem; }

#closeFilterBtn {
    background: white;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-size: 1.5rem;
}
#closeFilterBtn:hover {
    background: var(--error-color);
    color: white;
}

.sidebar-content { padding: 24px; overflow-y: auto; }

.price-range-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.price-range-btn {
    padding: 8px;
    font-size: 0.85rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: var(--border-radius-sm);
}

.price-range-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.custom-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px); /* rough header offset */
}

.admin-sidebar {
    width: 250px;
    background: var(--header-bg);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 1.5rem;
    color: #CBD5E1;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.menu-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.admin-section {
    animation: fadeIn 0.3s ease;
}

/* Modals & Tables (Admin) */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%; max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#productModal .modal-content, #orderDetailModal .modal-content, #editUserModal .modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: var(--secondary-color);
}

.full-modal-header {
    padding: 20px 5%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.full-modal-header h2 { margin: 0; }

.full-modal-header .close-button {
    position: static;
    font-size: 32px;
}

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

.full-modal-footer {
    padding: 20px 5%;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.close-button {
    position: absolute; top: 20px; right: 24px;
    font-size: 28px; line-height: 1; cursor: pointer;
    color: var(--text-light); transition: var(--transition);
}
.close-button:hover { color: var(--error-color); transform: rotate(90deg); }

.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    position: relative;
}

.admin-sidebar {
    width: 250px;
    min-width: 250px;
    flex-shrink: 0;
    background: var(--header-bg);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.admin-table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
    -webkit-overflow-scrolling: touch;
}

.admin-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-table th { background: var(--secondary-color); font-weight: 600; color: var(--text-heading); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; padding: 16px; border-bottom: 2px solid var(--border-color); text-align: left; }
.admin-table td { padding: 16px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.admin-table tr:hover { background-color: var(--secondary-color); }
.admin-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-table .button-outline, .admin-table .button-danger, .admin-table .button-primary { padding: 6px 12px; font-size: 0.8rem; margin: 0; }

/* Admin Mobile Responsiveness */
@media (max-width: 768px) {
    .hide-on-mobile { display: none !important; }
    .admin-table { min-width: 100%; } /* Allow tables to fit screen if columns are hidden */
    
    #adminMobileToggle { 
        display: block !important; 
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    #adminMobileClose { display: block !important; }
    
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }

    #admin-content {
        padding: 60px 15px 40px 15px !important; /* Make room for the toggle button */
        width: 100%;
        overflow-x: hidden;
    }
}

/* Auth Pages */
.auth-form-container { 
    max-width: 480px; 
    margin: 60px auto;
    padding: 48px;
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}
.auth-form-container h2 { text-align: center; font-size: 2rem; margin-bottom: 12px; }
.auth-form-container p { text-align: center; color: var(--text-light); margin-bottom: 32px; }
.auth-form-container button { width: 100%; padding: 14px; font-size: 1.1rem; }
.auth-switch-link { text-align: center; margin-top: 32px; font-size: 0.95rem; }
.auth-switch-link a { color: var(--primary-color); text-decoration: none; font-weight: 600; }
.auth-switch-link a:hover { text-decoration: underline; color: var(--accent-hover); }

.content-container { padding: 40px; background: white; border-radius: var(--border-radius); box-shadow: var(--shadow-sm); margin-top: 40px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1024px) {
    .main-layout-container { flex-direction: column; }
    #cart-sidebar { width: 100%; max-width: 450px; min-width: auto; position: static; margin: 40px auto 0 auto; box-sizing: border-box; }
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .header-top { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
        padding: 15px 20px; 
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.4rem; /* slightly smaller logo to fit btn */
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none; /* hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 4px;
    }

    .main-nav.show-mobile-nav {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 4px;
    }

    #cart-sidebar {
        padding: 20px;
        margin-top: 20px;
    }

    .search-category-wrapper {
        flex-direction: column;
        gap: 8px !important;
    }

    #searchBar {
        border-radius: var(--border-radius-sm) !important;
        border-right: 1px solid var(--border-color) !important;
    }

    #categoryFilter {
        border-radius: var(--border-radius-sm) !important;
        padding: 10px 15px !important;
        width: 100%;
    }

    #openFilterBtn {
        justify-content: center;
        width: 100%;
        padding: 12px !important;
    }

    .desktop-filter-text { display: inline; } /* Keep text visible, just stack it */

    .product-grid-inner { grid-template-columns: 1fr; }
    .controls-container { flex-direction: column; align-items: stretch; }
    .auth-form-container { margin: 20px; padding: 32px 24px; }
}

/* Built By Footer Styles */
.built-by-container {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.05);
    width: 100%;
    margin: 3rem 0;
}

.built-by-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
}

.built-by-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 24px;
    width: 100%;
    max-width: 300px;
    background-color: #1a2c3b;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

.built-by-link::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 9999px;
    padding: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, #fef08a, #d4af37, transparent);
    background-size: 200% auto;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientMove 2s linear infinite;
}

@keyframes gradientMove {
    to { background-position: 200% center; }
}

.built-by-link:hover {
    background-color: #233545;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
    border-color: transparent;
}

.built-by-link:hover::before {
    opacity: 1;
}

.built-by-link:active {
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.built-by-link .bb-label {
    position: relative;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #64748b;
    font-weight: bold;
    z-index: 1;
    transition: color 0.3s;
}

.built-by-link:hover .bb-label {
    color: #d4af37;
}

.built-by-link .bb-divider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 12px;
    z-index: 1;
}

.built-by-link .bb-name {
    font-family: serif;
    font-weight: bold;
    color: #cbd5e1;
    font-size: 1rem;
    transition: color 0.3s;
}

.built-by-link:hover .bb-name {
    color: #ffffff;
}

.built-by-link .bb-icon {
    height: 12px;
    width: 12px;
    color: #d4af37;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.built-by-link:hover .bb-icon {
    opacity: 1;
    transform: translate(2px, -2px) scale(1.1);
}

/* Click animation via script */
.built-by-link.clicked {
    animation: bbPulse 0.6s ease-out forwards;
}

@keyframes bbPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); transform: scale(0.95); }
    50% { box-shadow: 0 0 0 20px rgba(212, 175, 55, 0); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); transform: scale(1); }
}

/* Cart Item Mobile Fixes */
@media (max-width: 480px) {
    .cart-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
        padding: 15px 0;
    }
    .cart-item > .item-name {
        width: 100%;
        margin-bottom: 4px;
        font-size: 1.05rem;
        line-height: 1.4;
    }
    .cart-item > div {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .cart-quantity-selector {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 1rem;
    }
    
    #cartActionsDynamic {
        flex-direction: column;
        gap: 15px;
    }
    
    #updateCartBtnDynamic, #checkoutBtnDynamic {
        border-radius: var(--border-radius) !important;
        width: 100%;
    }
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    color: var(--text-heading);
    padding: 16px 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-left: 5px solid var(--accent-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-success { border-color: var(--success-color); }
.toast.toast-error { border-color: var(--error-color); }
.toast.toast-info { border-color: var(--primary-color); }
.toast.toast-saving { border-color: var(--accent-hover); }

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
