/* 
   Castelo do Queijo - Gravatá CSS Styling
   Theme: Warm, Appetite-stimulating, Premium, Mobile-First
*/

/* --- Design Tokens / Variables --- */
:root {
    --primary: hsl(352, 70%, 46%);        /* Deep Red #D32F2F equivalent */
    --primary-dark: hsl(352, 70%, 36%);   /* Darker Red */
    --secondary: hsl(43, 96%, 58%);       /* Rich Cheese Gold/Yellow #FBC02D */
    --secondary-dark: hsl(43, 96%, 45%);  /* Darker Gold */
    --secondary-light: hsl(43, 96%, 85%); /* Creamy yellow highlight */
    
    --bg-app: #fdfaf5;                    /* Organic off-white (Creamy) */
    --bg-card: #ffffff;
    --border-color: #f1ebd9;
    
    --text-dark: #1e1b15;                 /* Warm very dark charcoal */
    --text-medium: #5c5549;               /* Warm slate gray */
    --text-light: #9e9584;
    
    --green-open: #2e7d32;
    --green-open-light: #e8f5e9;
    
    --shadow-sm: 0 2px 8px rgba(30, 27, 21, 0.04);
    --shadow-md: 0 6px 20px rgba(30, 27, 21, 0.06);
    --shadow-lg: 0 12px 32px rgba(30, 27, 21, 0.1);
    --shadow-up: 0 -6px 24px rgba(30, 27, 21, 0.06);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: #12110e; /* Very dark canvas border for desktop */
}

body {
    background-color: var(--bg-app);
    max-width: 600px; /* Centered mobile container on desktop */
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.5); /* Shadow border on desktop */
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-dark);
    border-radius: var(--radius-full);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary-dark); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.display-none { display: none !important; }

/* --- App Header --- */
.app-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-wrapper-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--secondary);
    box-shadow: var(--shadow-sm);
    background-color: #ffffff;
}

.header-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status Indicator */
.store-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.store-status.open {
    background-color: var(--green-open-light);
    color: var(--green-open);
}

.store-status.closed {
    background-color: #ffebee;
    color: #c62828;
}

.store-status.closed .status-dot {
    background-color: #c62828;
    animation: none;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--green-open);
    display: inline-block;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* --- Hero Banner --- */
.hero-banner {
    padding: 56px 20px 28px 20px;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    display: flex;
    align-items: flex-end;
    min-height: 230px;
    position: relative;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
    color: var(--secondary);
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.hero-tagline {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.hero-info-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.info-tag {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --- Expandable Flyer Section --- */
.flyer-drawer-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.flyer-drawer-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background-color: rgba(211, 47, 47, 0.03);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.flyer-drawer-toggle:hover {
    background-color: rgba(211, 47, 47, 0.06);
}

.flyer-drawer-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    background-color: #ffffff;
}

.flyer-drawer-section.open .flyer-drawer-content {
    max-height: 720px; /* High enough to contain the flyer drawer content */
    opacity: 1;
    border-top: 1px solid var(--border-color);
    padding: 16px;
}

.drawer-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.drawer-tab {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.78rem;
    font-weight: 700;
    background-color: var(--bg-app);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.drawer-tab.active {
    background-color: var(--secondary);
    color: var(--text-dark);
    border-color: var(--secondary-dark);
}

.drawer-image-frame {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background-color: #12110e;
    box-shadow: var(--shadow-md);
    aspect-ratio: 1 / 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.drawer-flyer-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.open-zoom-flyer-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.open-zoom-flyer-btn:hover {
    background-color: #000000;
    transform: translateX(-50%) scale(1.03);
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    transition: var(--transition);
}

.btn-primary:hover, .btn-primary:active {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.4);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-dark);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-secondary:hover, .btn-secondary:active {
    background-color: var(--secondary-dark);
}

.btn-text-action {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background-color: rgba(211, 47, 47, 0.05);
    transition: var(--transition);
}

.btn-text-action:hover, .btn-text-action:active {
    background-color: rgba(211, 47, 47, 0.1);
}

/* --- Search & Sticky Filters --- */
.search-bar-container {
    padding: 16px;
    background-color: var(--bg-app);
}

.search-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
}

.search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.search-icon {
    color: var(--text-light);
    margin-right: 10px;
    font-size: 0.95rem;
}

#product-search {
    flex: 1;
    color: var(--text-dark);
    font-weight: 500;
}

#product-search::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.clear-search-btn {
    color: var(--text-light);
    padding: 4px;
}

/* Sticky Categories Navigation */
.categories-nav {
    position: sticky;
    top: 73px; /* Offset for Header height (48px logo + margins + paddings = 73px) */
    z-index: 990;
    background-color: rgba(253, 250, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.categories-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    padding: 0 16px;
    gap: 8px;
    scrollbar-width: none; /* Hide default scrollbar Firefox */
}

.categories-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Hide default scrollbar Chrome/Safari */
}

.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 76px;
    text-align: center;
    transition: var(--transition);
    flex-shrink: 0;
    gap: 4px;
}

.tab-icon {
    font-size: 1rem;
    color: var(--text-medium);
    transition: var(--transition);
}

.tab-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-medium);
    white-space: nowrap;
}

.category-tab.active {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

.category-tab.active .tab-icon, 
.category-tab.active .tab-label {
    color: #ffffff;
}

/* --- Catalog & Grid Layout --- */
.catalog {
    padding: 16px;
    flex: 1;
}

.category-section {
    margin-bottom: 28px;
    display: block; /* Stacked vertically for scrolling through all products */
}

.category-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.category-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.category-header-row .category-title {
    margin-bottom: 0;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first, single column lists for easy clicking */
    gap: 12px;
}

/* Product Card - Modern food app style */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 14px;
    display: flex;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.product-card:active {
    transform: scale(0.98);
}

.product-img-wrapper {
    width: 105px;
    height: 105px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background-color: var(--bg-app);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-top {
    margin-bottom: 4px;
}

.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--secondary);
    color: var(--text-dark);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-bottom-right-radius: var(--radius-sm);
    text-transform: uppercase;
    z-index: 2;
}

.product-name {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.25;
}

.product-desc {
    font-size: 0.78rem;
    color: var(--text-medium);
    line-height: 1.35;
    display: block;
}

/* Product Tag Badges */
.product-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.prod-tag-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(46, 125, 50, 0.08);
}

.prod-tag-badge i {
    font-size: 0.75rem;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 8px;
}

.price-container {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.product-price {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- Premium layout for Mais Pedidos section (One card per line, vertical scroll) --- */
#grid-mais-pedidos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 0;
}

.product-card.popular-card {
    flex-direction: row;
    width: 100%;
    padding: 14px;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(251, 192, 45, 0.08), var(--shadow-sm);
    border: 1.5px solid var(--secondary);
    background: linear-gradient(135deg, #ffffff 0%, #fffdf9 100%);
}

.product-card.popular-card:hover {
    border-color: var(--secondary-dark);
    box-shadow: 0 12px 32px rgba(251, 192, 45, 0.14), var(--shadow-md);
    transform: translateY(-4px);
}

.product-card.popular-card .product-img-wrapper {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
}

.product-card.popular-card .product-details {
    gap: 4px;
}

.product-card.popular-card .product-tags-row {
    margin-top: 4px;
}

.product-card.popular-card .product-name {
    font-size: 1.05rem;
}

.product-card.popular-card .product-badge {
    background: linear-gradient(90deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    animation: badgePulse 2s infinite ease-in-out;
    border-bottom-right-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: 0.7rem;
}

@keyframes badgePulse {
    0% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
    100% { opacity: 0.9; transform: scale(1); }
}

/* Placeholder style for empty categories */
.empty-category-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
    background-color: var(--bg-card);
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-medium);
    gap: 8px;
    margin: 8px 0;
    box-shadow: var(--shadow-sm);
}

.empty-category-placeholder i {
    font-size: 1.8rem;
    color: var(--secondary-dark);
}

.empty-category-placeholder p {
    font-size: 0.82rem;
    font-weight: 500;
    max-width: 280px;
    line-height: 1.4;
}

/* Action Controls (Add/Quantity) */
.product-actions {
    position: relative;
}

.btn-add-to-cart {
    background-color: var(--secondary-light);
    color: var(--primary);
    border: 1px solid var(--secondary);
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
}

.btn-add-to-cart:hover {
    background-color: var(--secondary);
    color: var(--text-dark);
    transform: scale(1.1);
}

/* Quantity Selector Widget */
.qty-selector {
    display: flex;
    align-items: center;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 2px;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.qty-btn.minus {
    color: var(--text-medium);
    background-color: #ffffff;
}

.qty-btn.plus {
    color: #ffffff;
    background-color: var(--primary);
}

.qty-val {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 14px;
    text-align: center;
}

/* Empty Search Results State */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-light);
}

.empty-state h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-medium);
    max-width: 250px;
    line-height: 1.4;
}

/* --- Floating Cart Bar --- */
.floating-cart-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    padding: 12px 16px 20px 16px; /* Extra bottom padding for phone safe zones */
    background: linear-gradient(to top, rgba(253, 250, 245, 1) 80%, rgba(253, 250, 245, 0) 100%);
    z-index: 1000;
    transition: transform 0.30s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-bar-container {
    background-color: var(--primary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.4);
    animation: bounceUp 0.3s ease-out;
}

@keyframes bounceUp {
    0% { transform: translateY(100px); }
    70% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon-badge {
    position: relative;
    background: rgba(255,255,255,0.15);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
}

.cart-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--secondary);
    color: var(--text-dark);
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.cart-text-values {
    display: flex;
    flex-direction: column;
}

.cart-bar-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.cart-bar-total {
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 800;
}

.cart-bar-btn {
    background-color: #ffffff !important;
    color: var(--primary) !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* --- Modals / Bottom Sheets --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(18, 17, 14, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    transition: opacity 0.25s ease;
}

/* Modal centering wrapper for desktop */
@media (min-width: 600px) {
    .modal-backdrop {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 600px;
    }
}

.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 20px 16px 24px 16px;
    box-shadow: var(--shadow-up);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 90%;
}

.bottom-sheet.show {
    transform: translateY(0);
}

.close-sheet-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--bg-app);
    color: var(--text-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.close-sheet-btn-inline {
    background-color: var(--bg-app);
    color: var(--text-medium);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.sheet-header {
    margin-bottom: 20px;
    padding-right: 32px;
}

.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bottom-sheet h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.pizza-flavor-desc {
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-top: 4px;
}

/* Pizza Size selectors */
.size-options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0;
}

.size-option-card {
    cursor: pointer;
    display: block;
}

.size-option-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card-content {
    background-color: var(--bg-app);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.size-option-card input:checked + .option-card-content {
    border-color: var(--primary);
    background-color: rgba(211, 47, 47, 0.02);
}

.size-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.size-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.size-serves {
    font-size: 0.75rem;
    color: var(--text-medium);
}

.size-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.sheet-footer {
    margin-top: 20px;
}

/* Checkout Scrollable Sheet Area */
.checkout-sheet-scrollable {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 20px;
}

.divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

/* Cart Items Section inside Checkout Drawer */
.section-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-app);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    padding-right: 12px;
}

.cart-item-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
}

.cart-item-detail {
    font-size: 0.72rem;
    color: var(--text-medium);
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 2px;
}

/* Checkout Form styling */
.order-type-switch {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.switch-option {
    flex: 1;
    background-color: var(--bg-app);
    border: 2px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: var(--transition);
    color: var(--text-medium);
}

.switch-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-option.active {
    border-color: var(--primary);
    background-color: rgba(211, 47, 47, 0.02);
    color: var(--primary);
}

.switch-option i {
    font-size: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group-row {
    display: flex;
    gap: 12px;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
}

.form-group input, .form-group select, .form-group textarea {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    width: 100%;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background-color: #ffffff;
}

.payment-extra-info {
    background-color: var(--secondary-light);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--secondary);
    margin-bottom: 14px;
    animation: fadeIn 0.2s ease-out;
}

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

/* Totals Summary checkout sheet */
.totals-section {
    background-color: var(--bg-app);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border-color);
}

.totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.totals-row.highlight {
    font-size: 1.1rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    margin-bottom: 4px;
}

.totals-disclaimer {
    font-size: 0.68rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.checkout-submit-btn {
    font-size: 1rem !important;
    padding: 14px !important;
    background-color: #2e7d32 !important; /* WhatsApp Green */
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3) !important;
}

.checkout-submit-btn:hover, .checkout-submit-btn:active {
    background-color: #1b5e20 !important;
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4) !important;
}

/* --- Flyer Zoom Lightbox --- */
.flyer-container {
    width: 90%;
    max-width: 480px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.close-flyer-btn {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.flyer-zoom-wrapper {
    background-color: #000000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--secondary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoomable-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.flyer-instruction {
    color: #ffffff;
    font-size: 0.72rem;
    opacity: 0.8;
}

/* --- App Footer --- */
.app-footer {
    background-color: #1a1916;
    color: #ded9d0;
    padding: 40px 20px 24px 20px;
    margin-top: auto;
    border-top: 4px solid var(--secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--secondary);
    background-color: #ffffff;
    object-fit: cover;
}

.footer-title {
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 800;
}

.footer-tagline {
    font-size: 0.8rem;
    opacity: 0.75;
}

.footer-section-title {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-text {
    font-size: 0.84rem;
    opacity: 0.85;
    line-height: 1.5;
}

.highlight-warning {
    color: var(--secondary);
}

.footer-link {
    color: var(--secondary);
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    transition: var(--transition);
}

.footer-link:hover {
    color: #ffffff;
}

.footer-link-whatsapp {
    background-color: rgba(46, 125, 50, 0.25);
    color: #81c784;
    border: 1px solid #4caf50;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    transition: var(--transition);
}

.footer-link-whatsapp:hover {
    background-color: #2e7d32;
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    margin-top: 28px;
    text-align: center;
    font-size: 0.72rem;
    opacity: 0.5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.developer-credit {
    font-weight: 600;
}

/* --- Media Queries --- */

/* Hover effects for larger screens/tablets */
@media (min-width: 600px) {
    .product-card:hover {
        transform: translateY(-2px);
    }
}
