/* ============================================
   FRUTERÍA CALICANTO - MAIN STYLESHEET
   Sistema de diseño responsive y centrado
   ============================================ */

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #1d1d1f;
    background-color: #f5f5f7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Colors */
    --green-primary: #7CB342;
    --green-secondary: #8BC34A;
    --green-light: #C5E1A5;
    --green-dark: #558B2F;
    --black: #1d1d1f;
    --gray-900: #1d1d1f;
    --gray-700: #424245;
    --gray-500: #86868b;
    --gray-300: #d2d2d7;
    --gray-100: #f5f5f7;
    --white: #ffffff;
    --red-ios: #ff3b30;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Layout */
    --max-width: 1200px;
    --content-padding: 16px;

    /* Legacy aliases */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --light-gray: #f5f5f7;
}

/* Responsive content padding */
@media (min-width: 640px) {
    :root {
        --content-padding: 24px;
    }
}

@media (min-width: 1024px) {
    :root {
        --content-padding: 32px;
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

@media (min-width: 640px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

p {
    color: var(--gray-500);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--gray-300);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-sm) 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .header-logo {
        width: 48px;
        height: 48px;
    }
}

.header-text {
    text-align: left;
}

.header-text h1 {
    font-size: 1.125rem;
    margin: 0;
}

.header-text p {
    font-size: 0.75rem;
    margin: 0;
    color: var(--gray-500);
}

@media (min-width: 640px) {
    .header-text h1 {
        font-size: 1.25rem;
    }
    .header-text p {
        font-size: 0.8rem;
    }
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    background: var(--white);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--gray-100);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.nav-menu li {
    flex-shrink: 0;
}

.nav-menu a {
    display: block;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    background: var(--gray-100);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: var(--green-primary);
    color: var(--white);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    background: var(--gray-100);
    min-height: calc(100vh - 200px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    width: 100%;
    background: var(--black);
}

.hero-image {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   COMBOS SECTION
   ============================================ */
.combos-section {
    padding: var(--space-xl) var(--content-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.combos-section h2 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.combos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 640px) {
    .combos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
}

@media (min-width: 900px) {
    .combos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.combo-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.combo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.combo-featured {
    border: 2px solid var(--green-primary);
}

.combo-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: var(--green-primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.combo-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--gray-100);
}

.combo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.combo-card:hover .combo-image img {
    transform: scale(1.05);
}

.combo-info {
    padding: var(--space-md);
}

@media (min-width: 640px) {
    .combo-info {
        padding: var(--space-lg);
    }
}

.combo-info h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.combo-items {
    list-style: none;
    margin-bottom: var(--space-md);
}

.combo-items li {
    padding: 6px 0;
    color: var(--gray-500);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.combo-items li:last-child {
    border-bottom: none;
}

.combo-items li::before {
    content: '✓';
    color: var(--green-primary);
    font-weight: 600;
    flex-shrink: 0;
}

.combo-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.combo-price .price-usd {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green-dark);
}

.combo-price .price-ves {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products-section {
    padding: var(--space-lg) var(--content-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.products-section h2 {
    margin-bottom: var(--space-md);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-lg);
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image.product-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

@media (min-width: 640px) {
    .product-image.product-emoji {
        font-size: 3rem;
    }
}

.product-card h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

@media (min-width: 640px) {
    .product-card h3 {
        font-size: 1rem;
    }
}

.product-card p {
    font-size: 0.75rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
    color: var(--gray-500);
}

@media (min-width: 640px) {
    .product-card p {
        font-size: 0.8rem;
    }
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-usd {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--green-dark);
}

.price-ves {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

@media (min-width: 640px) {
    .product-price {
        gap: 6px;
    }

    .price-usd {
        font-size: 1.25rem;
    }

    .price-ves {
        font-size: 0.9rem;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.add-to-cart-btn {
    width: 100%;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.add-to-cart-btn:hover {
    background: var(--green-dark);
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

.add-to-cart-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--white);
    border-top: 1px solid var(--gray-300);
    padding: var(--space-xl) var(--content-padding);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.contact-info p {
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
}

.exchange-rate-info {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    text-align: center;
}

.exchange-rate-info .rate-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 4px 0;
}

.exchange-rate-info .rate-update {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

.footer-note {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-100);
}

.footer-note p {
    font-size: 0.8rem;
    margin: 0;
}

/* ============================================
   HEADER ACTIONS (left side - auth + admin)
   ============================================ */
.header-actions {
    position: fixed;
    top: var(--space-sm);
    left: var(--space-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (min-width: 640px) {
    .header-actions {
        top: var(--space-md);
        left: var(--space-lg);
        gap: 8px;
    }
}

/* ============================================
   SHOPPING CART
   ============================================ */
.cart-container {
    position: fixed;
    top: var(--space-sm);
    right: var(--space-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (min-width: 640px) {
    .cart-container {
        top: var(--space-md);
        right: var(--space-lg);
        gap: 8px;
    }
}

/* Admin link button */
.admin-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-600, #4b5563);
    color: var(--white);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.admin-link-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    background: var(--gray-700, #374151);
    color: var(--white);
}

.admin-link-btn:active {
    transform: scale(0.95);
}

.admin-text {
    font-family: inherit;
}

/* Customer auth button */
.customer-auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-600, #4b5563);
    border: 2px solid var(--gray-300, #d1d5db);
    padding: 8px 14px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.customer-auth-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.customer-auth-btn:active {
    transform: scale(0.95);
}

.customer-auth-btn.authenticated {
    background: var(--green-primary);
    color: var(--white);
    border-color: var(--green-primary);
}

.auth-text {
    font-family: inherit;
}

/* Mobile: compact icon-only buttons */
@media (max-width: 768px) {
    .admin-text,
    .auth-text {
        display: none;
    }
    .admin-link-btn,
    .customer-auth-btn {
        padding: 0;
        width: 36px;
        height: 36px;
        justify-content: center;
        font-size: 0.9rem;
    }
    .header-actions {
        gap: 5px;
    }
    .cart-container {
        gap: 5px;
    }
    .cart-toggle-btn {
        width: 42px;
        height: 42px;
    }
}

.cart-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.cart-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.cart-toggle-btn:active {
    transform: scale(0.95);
}

.cart-toggle-btn .cart-text {
    display: none;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red-ios);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: calc(100% + var(--space-xs));
    right: 0;
    width: 320px;
    max-width: calc(100vw - var(--space-lg));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.2s ease;
}

.cart-container.cart-open .cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cart-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 1rem;
}

.cart-clear-btn {
    background: none;
    border: none;
    color: var(--red-ios);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.cart-clear-btn:hover {
    background: rgba(255, 59, 48, 0.1);
}

.cart-items-list {
    max-height: 280px;
    overflow-y: auto;
    padding: var(--space-xs);
}

.cart-empty-message {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
}

.cart-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.cart-empty-message p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.cart-empty-hint {
    font-size: 0.8rem !important;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item-emoji {
    font-size: 1.5rem;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-900);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.cart-item-fillings {
    font-size: 0.7rem;
    color: var(--primary);
    display: block;
    margin-top: 2px;
    line-height: 1.3;
    font-style: italic;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 4px;
    flex-shrink: 0;
}

.cart-item-quantity-fixed {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 4px 12px;
    flex-shrink: 0;
}

.cart-item-combo {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border-left: 3px solid var(--primary);
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--green-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cart-qty-btn:hover {
    background: var(--gray-100);
}

.cart-qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.cart-item-subtotal {
    display: none;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: rgba(255, 59, 48, 0.1);
    color: var(--red-ios);
}

/* Cart Footer */
.cart-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--gray-100);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.cart-total-label {
    font-weight: 500;
    color: var(--gray-700);
}

.cart-total-amount {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--green-dark);
}

.cart-checkout-btn {
    width: 100%;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all 0.2s ease;
}

.cart-checkout-btn:hover {
    background: var(--green-dark);
}

.cart-checkout-btn:active {
    transform: scale(0.98);
}

.cart-checkout-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

/* Cart scrollbar */
.cart-items-list::-webkit-scrollbar {
    width: 4px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: transparent;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--green-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   CHECKOUT MODAL
   ============================================ */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.checkout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.checkout-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.checkout-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--gray-300);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.checkout-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.checkout-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.checkout-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.checkout-modal-body {
    padding: 24px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: -4px;
    font-style: italic;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkout-summary {
    background: var(--gray-100);
    padding: 20px;
    border-radius: 12px;
    margin-top: 8px;
}

.checkout-summary h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border-radius: 8px;
}

.checkout-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.checkout-item-emoji {
    font-size: 1.5rem;
}

.checkout-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkout-item-name {
    font-weight: 500;
    color: var(--gray-900);
}

.checkout-item-fillings {
    font-size: 0.8rem;
    color: var(--primary);
    font-style: italic;
    margin-top: 2px;
}

.checkout-item-quantity {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.checkout-item-price {
    font-weight: 600;
    color: var(--green-primary);
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px solid var(--gray-300);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-900);
}

.checkout-total-amount {
    color: var(--green-primary);
}

.checkout-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.checkout-submit-btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.checkout-submit-btn:active {
    transform: translateY(0);
}

/* Location GPS Button */
.location-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.4);
}

.location-btn:active {
    transform: translateY(0);
}

.location-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    opacity: 0.6;
}

.location-icon {
    font-size: 1.2rem;
}

.location-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.location-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.location-status.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.checkout-success-message {
    animation: slideIn 0.3s ease !important;
}

.checkout-success-message .success-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkout-success-message .success-icon {
    font-size: 2rem;
}

.checkout-success-message .success-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.checkout-success-message .success-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive checkout modal */
@media (max-width: 768px) {
    .checkout-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .checkout-modal-header {
        padding: 20px;
    }

    .checkout-modal-header h2 {
        font-size: 1.3rem;
    }

    .checkout-modal-body {
        padding: 20px;
    }

    .checkout-summary {
        padding: 16px;
    }
}

/* ============================================
   COMBO FILLINGS MODAL
   ============================================ */
.combo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.combo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.combo-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    z-index: 2;
    margin: auto;
}

.combo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--gray-300);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.combo-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.combo-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.combo-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.combo-modal-body {
    padding: 24px;
}

.combo-info-banner {
    background: var(--green-light);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
}

.combo-info-banner p {
    margin: 0;
    font-weight: 600;
    color: var(--gray-900);
}

.combo-instruction {
    margin-top: 8px !important;
    font-size: 0.9rem;
    font-weight: 400 !important;
    color: var(--gray-700);
}

.fillings-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filling-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.filling-option:hover {
    border-color: var(--green-primary);
    background: var(--gray-100);
}

.filling-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.filling-emoji {
    font-size: 1.8rem;
}

.filling-details {
    display: flex;
    flex-direction: column;
}

.filling-name {
    font-weight: 600;
    color: var(--gray-900);
}

.filling-price {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.filling-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filling-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--green-primary);
    background: var(--white);
    color: var(--green-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filling-qty-btn:hover {
    background: var(--green-primary);
    color: var(--white);
}

.filling-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.filling-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: var(--gray-900);
}

.combo-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
}

.combo-cancel-btn {
    flex: 1;
    padding: 14px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.combo-cancel-btn:hover {
    background: var(--gray-300);
}

.combo-confirm-btn {
    flex: 2;
    padding: 14px;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.combo-confirm-btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.combo-confirm-btn:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
}

/* Responsive combo modal */
@media (max-width: 768px) {
    .combo-modal {
        padding: 10px;
    }

    .combo-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .combo-modal-header {
        padding: 16px;
    }

    .combo-modal-header h2 {
        font-size: 1.2rem;
    }

    .combo-modal-body {
        padding: 16px;
    }

    .filling-option {
        padding: 12px;
    }

    .filling-emoji {
        font-size: 1.5rem;
    }

    .combo-modal-footer {
        flex-direction: column;
    }

    .combo-cancel-btn,
    .combo-confirm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .combo-modal {
        padding: 5px;
    }

    .combo-modal-content {
        max-height: 98vh;
        border-radius: 8px;
    }

    .combo-modal-header {
        padding: 12px;
    }

    .combo-modal-header h2 {
        font-size: 1.1rem;
    }

    .combo-modal-body {
        padding: 12px;
    }

    .filling-name {
        font-size: 0.9rem;
    }

    .filling-desc {
        font-size: 0.75rem;
    }
}

/* ============================================
   STORE STATUS BANNER (HEADER)
   ============================================ */
.store-status-banner {
    padding: 6px 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    animation: slideDown 0.5s ease;
}

.store-status-banner.open {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.store-status-banner.warning {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
}

.store-status-banner.closed {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.status-icon {
    font-size: 1.2rem;
}

.status-text {
    font-weight: 600;
}

.status-time {
    font-weight: 400;
    opacity: 0.9;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .store-status-banner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px 12px;
        font-size: 0.75rem;
    }

    .status-icon {
        font-size: 0.9rem;
    }

    .status-time {
        font-size: 0.7rem;
    }
}

/* ============================================
   SCHEDULE BANNER & INDICATORS
   ============================================ */
.schedule-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    animation: slideDown 0.5s ease;
}

.schedule-banner.schedule-warning {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.schedule-banner.schedule-closed {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.schedule-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.schedule-icon {
    font-size: 1.5rem;
}

.schedule-text {
    font-weight: 500;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.schedule-time {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Product cards when schedule is unavailable */
.product-card.schedule-unavailable,
.combo-card.schedule-unavailable {
    position: relative;
}

.product-card.schedule-unavailable .product-image,
.product-card.schedule-unavailable .product-emoji,
.combo-card.schedule-unavailable .combo-image {
    opacity: 0.5;
    filter: grayscale(80%);
}

.product-card.schedule-unavailable::before,
.combo-card.schedule-unavailable::before {
    content: '⏰ No disponible ahora';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(244, 67, 54, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.product-card.schedule-unavailable h3,
.combo-card.schedule-unavailable h3 {
    opacity: 0.6;
}

/* Keep prices visible even when unavailable */
.product-card.schedule-unavailable .product-price,
.combo-card.schedule-unavailable .combo-price {
    opacity: 1;
    z-index: 5;
    position: relative;
}

.product-card.schedule-unavailable .add-to-cart-btn,
.combo-card.schedule-unavailable .add-to-cart-btn {
    background: var(--gray-400);
    cursor: not-allowed;
}

.product-card.schedule-unavailable .add-to-cart-btn:hover,
.combo-card.schedule-unavailable .add-to-cart-btn:hover {
    background: var(--gray-400);
    transform: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive schedule banner */
@media (max-width: 768px) {
    .schedule-banner {
        padding: 12px 16px;
    }

    .schedule-banner-content {
        gap: 8px;
    }

    .schedule-icon {
        font-size: 1.3rem;
    }

    .schedule-text {
        font-size: 0.9rem;
        min-width: 150px;
    }

    .schedule-time {
        font-size: 0.8rem;
        width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header, nav, footer, .cart-container, .header-actions {
        display: none;
    }
    main {
        background: white;
    }
    .product-card, .combo-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   LOADING OVERLAY (for tenant bootstrap)
   ============================================ */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--gray-300);
    border-top-color: var(--green-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 16px;
    color: var(--gray-700);
}

/* ============================================
   ERROR BANNER (for tenant loading errors)
   ============================================ */
#error-message {
    display: none;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.error-content h3 {
    color: #856404;
    margin-bottom: 10px;
}

.error-content p {
    color: #856404;
    margin-bottom: 15px;
}

.error-content button {
    background: var(--green-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.error-content button:hover {
    background: var(--green-dark);
}

/* ============================================
   CUSTOMER AUTH MODAL & PROFILE MENU
   ============================================ */

.auth-modal-content {
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gray-200, #e5e7eb);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-500, #6b7280);
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--green-primary);
    border-bottom-color: var(--green-primary);
}

.auth-tab:hover {
    color: var(--green-dark);
}

.auth-form .form-group {
    margin-bottom: 12px;
}

.auth-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Profile dropdown menu */
.customer-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px;
    min-width: 200px;
    z-index: 1001;
    animation: fadeIn 0.15s ease;
}

.profile-menu-header {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    margin-bottom: 10px;
}

.profile-menu-header strong {
    font-size: 0.95rem;
    color: var(--gray-800, #1f2937);
}

.profile-menu-header span {
    font-size: 0.8rem;
    color: var(--gray-500, #6b7280);
}

.customer-logout-btn {
    width: 100%;
    padding: 8px;
    background: none;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.customer-logout-btn:hover {
    background: #ef4444;
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
