:root {
    /* Shared values */
    --border-radius: 12px;
    --spacing-xx: 0.5rem;
    --spacing-xs: 0.75rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-sm: 8px;
}

/* Default theme is dark if none is specified */
body:not([data-theme]),
body[data-theme="dark"] {
    --bg-color: #0F0F0F;
    --card-bg: #1A1A1A;
    --text-primary: #F2F2F2;
    --text-secondary: #A0A0A0;
    --brand-primary: #F5B301;
    --brand-hover: #D99E01;
    --brand-accent: #F97316;
    --text-primary-button: #FFFFFF;
    --brand-primary-button: #000000;
    --success: #2ECC71;
    --error: #E74C3C;
    --border-color: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.85);
    --input-bg: #252525;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

p {
    color: var(--text-primary);
}

textarea,
input::placeholder {
    color: #9e9e9e;
    font-style: italic;
}

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

.flex {
    display: flex;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--text-primary-button);
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Header */
#main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
    padding: 0.2rem 0;
}

.footer {
    padding: var(--spacing-md) 0;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-lg);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-info a {
    color: var(--brand-primary);
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--brand-primary);
}

.copyright {
    font-size: 0.8rem;
    color: #666;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--brand-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-right: 10px;
}

.whatsapp-btn {
    color: #25D366;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: #128C7E;
}

.cart-trigger {
    position: relative;
    color: var(--text-primary-button);
    height: 34px;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background-color: var(--brand-accent);
    color: white;
    font-size: 0.9rem;
    padding: 2px 9px;
    border-radius: 50%;
    font-weight: bold;
}

@keyframes cart-bounce-anim {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.35);
    }

    50% {
        transform: scale(0.9) rotate(-15deg);
    }

    70% {
        transform: scale(1.1) rotate(15deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.cart-bounce {
    animation: cart-bounce-anim 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.error-shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border: 1px solid var(--error) !important;
    border-radius: var(--radius-sm);
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Rebote del contador */
.count-bounce {
    animation: countPop 0.4s ease;
}

@keyframes countPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}


/* Hero */
#hero {
    height: 80vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Simulate burger background with gradient for now, can replace with img */
    background: radial-gradient(circle at center, #2a2a2a 0%, #0F0F0F 100%);
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Placeholder for actual image */
    background-image: url('alajo_background2.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    /*    filter: blur(1px);*/
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

.hero-content p {
    color: #fff;
    margin: 20px auto;
}

/* Menu Grid */
#menu {
    padding: var(--spacing-lg) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--brand-primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #EEEEEE;
    display: flex;
    flex-direction: row;
    position: relative;
    /* Horizontal Layout */
    min-height: 150px;
    max-width: 380px;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color);
}

.product-img {
    width: 120px;
    height: 160px;
    /* Fixed width for image */
    object-fit: cover;
    background-color: #222;
    flex-shrink: 0;
}

.product-info {
    padding: var(--spacing-xs);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.product-desc-clamped {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-overflow: ellipsis;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.9rem;
    color: var(--brand-primary);
    font-weight: 500;
}

.price-tachado {
    text-decoration: line-through;
    font-size: 0.90rem;
    color: #666;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.add-btn {
    padding: 6px 12px;
    background-color: var(--brand-primary);
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.add-btn:active {
    background: var(--brand-primary);
    color: black;
    transform: scale(0.97);
}


/* Option Sidebar (Matches Cart Sidebar) */
#options-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 301;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#options-sidebar.active {
    right: 0;
}

.options-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.product-details-header {
    padding: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.opt-sidebar-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--brand-primary);
}

.opt-sidebar-desc {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    background: var(--bg-color);
}


/* Checkout Sidebar (Matches Cart Sidebar) */
#checkout-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 301;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#checkout-sidebar.active {
    right: 0;
}

.checkout-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.0rem;
}

.checkout-step h2 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
}

/* Cart Sidebar */
#cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 300;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#cart-sidebar.active {
    right: 0;
}

.overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay-bg.active {
    opacity: 1;
    pointer-events: all;
}

.cart-header {
    padding: var(--spacing-sm);
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.cart-header button:hover {
    color: var(--brand-primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.item-info .price {
    font-size: 0.85rem;
    color: var(--brand-primary);
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    background: #333;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-qty {
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.cart-footer {
    padding: var(--spacing-sm);
    border-top: 1px solid #333;
    background: var(--card-bg);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Category Navigation */
.category-nav {
    display: flex;
    overflow-x: auto;
    padding: 1rem 0;
    gap: 1rem;
    position: sticky;
    top: 70px;
    /* Adjust based on header height */
    z-index: 90;
    background: var(--bg-color);
    margin-bottom: 2rem;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 8px 16px;
    background: #222;
    color: #fff;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid #333;
    font-size: 0.9rem;
}

.cat-btn.active {
    background: var(--brand-primary);
    color: var(--text-primary-button);
    font-weight: bold;
}

/* Category Sections */
.category-section {
    margin-bottom: 4rem;
    scroll-margin-top: 140px;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--brand-primary);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Options Modal specific */
#options-modal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#options-form {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

.option-group {
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #333;
    padding-bottom: 1rem;
}

.option-group h4 {
    /*    margin-bottom: 0.8rem; xxx*/
    color: var(--brand-primary);
    display: flex;
    justify-content: space-between;
}

.option-group .obs {
    margin-bottom: 0.6rem;
    font-size: .75rem;
    line-height: 1.25rem;
    color: var(--text-secondary);
}

.option-obligatorio {
    font-size: 0.6rem;
    color: var(--text-primary-button);
    padding: 3px 6px;
    background-color: var(--brand-primary);
    border-radius: 10px;
    font-weight: 600;
}

.option-opcional {
    font-size: 0.6rem;
    color: var(--text-primary);
    padding: 3px 6px;
    background-color: var(--input-bg);
    border-radius: 10px;
    font-weight: 300;
}

.option-limits {
    font-size: 0.8rem;
    color: #888;
    font-weight: normal;
}

.option-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

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

.option-item label {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Custom Radio (Circular Checkbox) */
/* .option-item.radio-mode removed - using standard .option-item now */

.custom-radio-container {
    display: block;
    position: relative;
    padding-left: 28px;
    /* Adjusted since no text label usually */
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    color: var(--text-primary);
    min-height: 22px;
    /* Ensure height matches the mark */
    margin-bottom: 0;
}

/* Hide default radio */
.custom-radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Mark */
.radio-mark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: transparent;
    border: 2px solid #555;
    border-radius: 50%;
    transition: var(--transition);
}

.custom-radio-container:hover input~.radio-mark {
    border-color: #888;
}

/* Checked State */
.custom-radio-container input:checked~.radio-mark {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Inner Dot (white checkmark or dot) */
.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-radio-container input:checked~.radio-mark:after {
    display: block;
}

/* Style the dot inside */
.custom-radio-container .radio-mark:after {
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: black;
}

#options-sidebar .cart-footer {
    padding-top: 1rem;
    border-top: 1px solid #333;
    justify-content: space-between;
    align-items: center;
}

.modal-footer {
    padding-top: 1rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.modal-price {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Sticky Add Button in Modal (Mobile) */
.add-to-order-btn {
    background: var(--brand-primary);
    color: black;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
}

/* Cart Extras Display */
.cart-item-extras {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    padding-left: 0.5rem;
    border-left: 2px solid #333;
}

/* Option Counters */
.option-item.counter-mode {
    align-items: center;
}

.opt-info {
    flex: 1;
    font-size: 0.90rem;
}

.option-price {
    font-size: 0.90rem;
    color: var(--text-secondary);
}

.opt-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn-sm {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    background-color: var(--brand-primary-button);
    color: var(--text-primary-button);
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-qty-input {
    width: 30px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    padding: 0;
}

.opt-qty-input:focus {
    outline: none;
}

/* Bottom Sheet (Map) */
.bottom-sheet-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 400;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align to bottom for mobile */
    visibility: hidden;
    pointer-events: none;
}

.sheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s;
}

.bottom-sheet-container.active {
    visibility: visible;
    pointer-events: all;
}

.bottom-sheet-container.active .sheet-overlay {
    opacity: 1;
}

.sheet-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 600px;
    /* Desktop max width */
    height: 85vh;
    /* Tall sheet */
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 401;
    border: 1px solid #333;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.bottom-sheet-container.active .sheet-content {
    transform: translateY(0);
}

.sheet-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.sheet-header button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.map-wrapper {
    flex: 1;
    position: relative;
    background: #222;
}

#google-map {
    width: 100%;
    height: 100%;
}

.coverage-msg {
    color: var(--error);
}

#map-search {
    top: 20px;
    left: 50%;
    width: 100%;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.sheet-form {
    padding: 1.0rem;
    background: var(--card-bg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}


/* ===== FORMULARIOS ===== */
.timer {
    text-align: center;
    margin: 20px 0;
}

.timer span {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    font-family: monospace;
}

.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 25px 0;
}

.code-inputs input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
}

#user-info-section .form-group {
    margin-bottom: 40px;

}

.form-group {
    margin-bottom: 15px;
    background-color: var(--bg-color);
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background-color: var(--card-bg);
    color: var(--text-primary);

}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--text-secondary);
}

.form-group small {
    /*    display: block;*/
    margin-top: 5px;
    color: var(--gray);
    font-size: smaller;
}

.radio-group label {
    display: block;
    padding: 8px 0;
    cursor: pointer;
}

.radio-group input {
    margin-right: 10px;
}


.phone-input {
    display: flex;
    gap: 10px;
}

.phone-input select {
    width: 200px;
    padding: 10px;
}

/* Form Utilities (Inputs & Buttons) */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}


.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: #333;
    color: white;
    border-radius: 8px;
}

.btn-sm:hover {
    background: #555;
}

.btn-outline {
    background: transparent;
    border: 1px dashed #444;
    color: #888;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(245, 179, 1, 0.05);
}

/* Address List Items */
.address-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.address-item:hover {
    border-color: #555;
    background: #1f1f1f;
}

.address-item.selected {
    border-color: var(--brand-primary);
    background: rgba(245, 179, 1, 0.1);
}

.address-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
}

.address-details strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.address-details span {
    display: block;
    color: #888;
    font-size: 0.8rem;
}

.delete-address-btn {
    background: transparent;
    color: #555;
    font-size: 1.2rem;
    padding: 0 8px;
}

.delete-address-btn:hover {
    color: var(--error);
}

.verified-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 20px;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message i {
    color: var(--success);
    font-size: 1.5rem;
}

/* Success Screen */
.screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.screen-overlay.hidden {
    display: none;
}

.check-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    border-top: 1px solid #222;
    margin-top: 2rem;
}

.footer-links {
    color: navy
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--brand-primary);
    animation: confetti-fall 3s linear forwards;
    z-index: 600;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}


/* Checkout Order Summary */
.order-summary-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #333;
}

.checkout-summary-list {
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid #222;
}

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

.summary-item .item-details {
    flex: 1;
}

.summary-item .item-qty {
    font-weight: bold;
    color: var(--brand-primary);
    margin-right: 8px;
}

.summary-item .item-extras {
    display: block;
    font-size: 0.75rem;
    color: #777;
    margin-top: 2px;
}

.summary-item .item-price {
    font-weight: 600;
}

.checkout-summary-footer {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #333;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.summary-line.total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
}

.summary-line.total span:last-child {
    color: var(--brand-primary);
}

/* Addresses Sidebar (Inherits from Sidebar logic) */
#addresses-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 310;
    /* Above checkout if needed */
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#addresses-sidebar.active {
    right: 0;
}

/* Selected Address Card in Checkout */
.selected-address-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.selected-address-card:hover {
    border-color: var(--brand-primary);
    background: var(--card-bg);
}

.address-icon {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.address-text {
    flex: 1;
}

.address-text h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.address-text p {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.2;
}

.btn-change {
    background: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: bold;
}

/* Address Items in Sidebar List */
.address-item {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.address-item:hover {
    border-color: var(--brand-primary);
    background-color: var(--bg-color)
}

.address-item.selected {
    border-color: var(--brand-primary);
    background: var(--bg-color);
}

.address-item.selected::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 10px;
    color: var(--brand-primary);
    font-weight: bold;
}

.addr-details h5 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.addr-details p {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.3;
}

.btn-delete-addr {
    width: 32px;
    height: 32px;
    background: #333;
    color: #ff4d4d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    z-index: 2;
}

.btn-delete-addr:hover {
    background: #ff4d4d;
    color: white;
}

/* Billing Sidebar */
#billing-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 320;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#billing-sidebar.active {
    right: 0;
}

.billing-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-opt-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.billing-opt-card:hover {
    border-color: #555;
    background-color: var(--bg-color);
}

.billing-opt-card input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.billing-opt-card .opt-content {
    display: flex;
    flex-direction: column;
}

.billing-opt-card .opt-content strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.billing-opt-card .opt-content span {
    font-size: 0.8rem;
    color: #888;
}

.billing-form-fields {
    border-top: 1px dashed #333;
    padding-top: 20px;
}

.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Payment Methods Horizontal Cards */
.payment-methods-grid {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.payment-card {
    flex: 1;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.payment-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 5px;
    transition: var(--transition);
    text-align: center;
}

.payment-card-content i {
    font-size: 1.2rem;
    color: #888;
    transition: var(--transition);
}

.payment-card-content span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    transition: var(--transition);
}

.payment-card:hover .payment-card-content {
    border-color: #555;
}

.payment-card input[type="radio"]:checked+.payment-card-content {
    border-color: var(--brand-primary);
    background: rgba(245, 179, 1, 0.05);
}

.payment-card input[type="radio"]:checked+.payment-card-content i,
.payment-card input[type="radio"]:checked+.payment-card-content span {
    color: var(--brand-primary);
}

.loading-msg,
.empty-msg {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}


/* Rewards System */
.rewards-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--brand-primary);
    color: #000;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(245, 179, 1, 0.4);
    z-index: 999;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
    max-width: 90%;
}

.rewards-banner:hover {
    transform: scale(1.05);
}

.rewards-banner.hidden {
    display: none;
}

.rewards-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rewards-icon {
    font-size: 1.5rem;
}

.rewards-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.rewards-text strong {
    font-size: 0.95rem;
}

.rewards-text small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.rewards-arrow {
    font-size: 1.2rem;
    font-weight: bold;
}

#rewards-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--bg-color);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
}

#rewards-sidebar.active {
    right: 0;
}

.rewards-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.rewards-points-summary {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--brand-primary);
}

.rewards-points-summary strong {
    color: var(--brand-primary);
    font-size: 1.2rem;
}

.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reward-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.reward-card.selected {
    border-color: var(--brand-primary);
    background: rgba(245, 179, 1, 0.1);
}

.reward-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.reward-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
}

.reward-info {
    flex: 1;
}

.reward-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.reward-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.reward-cost {
    display: inline-block;
    background: var(--brand-primary);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.reward-redeem-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    border-radius: 6px;
    cursor: pointer;
}

.reward-redeem-btn:hover {
    background: var(--brand-primary);
    color: #000;
}

/* Cart Reward Items */
.cart-item.reward-item {
    background: rgba(245, 179, 1, 0.1);
    border: 1px solid var(--brand-primary);
    padding: 10px;
    border-radius: 8px;
}

.cart-item.reward-item .price {
    color: var(--brand-primary);
    font-weight: bold;
}

.remove-reward {
    background: #E74C3C;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}


/* Mobile Optimizations */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 14px;
    }

    .btn-secondary {
        font-size: 0.75rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero-content p {
        color: #fff;
        max-width: 300px;
        margin: 20px auto;
    }

    #cart-sidebar,
    #checkout-sidebar,
    #options-sidebar {
        width: 100%;
        max-width: none;
    }

    .bottom-sheet-container {
        align-items: center;
        /* Center on desktop */
    }

    .sheet-content {
        height: 700px;
        max-height: 90vh;
        border-radius: 12px;
        transform: translateY(20px);
        opacity: 0;
    }


    .bottom-sheet-container.active .sheet-content {
        transform: translateY(0);
        opacity: 1;
    }
}