/* style.css - UPDATED DESIGN WITH BLACK & GOLD THEME */
:root { 
    --gold: #d4af37;
    --gold-dark: #b8941f;
    --gold-light: #f4e4a6;
    --black: #0a0a0a;
    --black-dark: #000000;
    --black-medium: #111111;
    --black-light: #1a1a1a;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #aaaaaa;
    --white: #f5f5f5;
    --red: #ff6b6b;
    --success: #27ae60;
    --error-red: #ff4444;
}

* { 
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    height: 100vh; 
    background: var(--black); 
    color: var(--white);
    overflow: hidden; 
}

/* --- LAYOUT --- */
.main-container { 
    display: flex; 
    height: 100vh; 
    width: 100%; 
    background: var(--black);
}

.menu-panel { 
    width: 65%; 
    display: flex; 
    flex-direction: column; 
    border-right: 3px solid var(--gold);
    background: linear-gradient(145deg, var(--black-medium), var(--black));
    height: 100vh;
    overflow: hidden;
}

.cart-panel { 
    width: 35%; 
    display: flex; 
    flex-direction: column; 
    background: var(--black-medium);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 10;
    border-left: 3px solid var(--gold);
    height: 100vh;
    overflow: hidden;
}

/* --- TOP BAR --- */
.top-bar { 
    padding: 20px 25px; 
    background: var(--black-dark); 
    color: var(--gold);
    display: flex; 
    align-items: center; 

    gap: 20px;
    border-bottom: 3px solid var(--gold);
    flex-shrink: 0;
}

.brand { 
    font-weight: bold; 
    font-size: 28px; 
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    letter-spacing: 1px;
}

#search-input { 
    width: 100%; 
    padding: 16px 20px; 
    border: 2px solid var(--gray-dark); 
    border-radius: 10px; 
    font-size: 18px; 
    outline: none;
    background: var(--black-light);
    color: var(--white);
    transition: all 0.3s ease;
}

#search-input:focus { 
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

/* --- CATEGORIES --- */
.categories { 
    padding: 20px 25px; 
    overflow-x: auto; 
    white-space: nowrap; 
    background: var(--black-medium); 
    border-bottom: 2px solid var(--gray-dark);
    display: flex;
    gap: 15px;
    min-height: 90px;
    align-items: center;
    flex-shrink: 0;
}

.cat-btn { 
    padding: 15px 25px; 
    border: 2px solid var(--gray-dark); 
    background: var(--black-light); 
    border-radius: 12px; 
    cursor: pointer; 
    font-weight: 700; 
    color: var(--gray-light); 
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.cat-btn:hover { 
    background: var(--gray-dark); 
    border-color: var(--gold-light);
    transform: translateY(-2px);
}

.cat-btn.active { 
    background: linear-gradient(145deg, var(--gold), var(--gold-dark)); 
    color: var(--black-dark); 
    border-color: var(--gold);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

/* --- MENU GRID --- */
.menu-grid { 
    flex: 1;
    padding: 25px; 
    overflow-y: auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px; 
    align-content: start; 
}

.menu-item { 
    background: linear-gradient(145deg, var(--black-light), var(--black-medium));
    border-radius: 15px; 
    padding: 25px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    position: relative; 
    border: 2px solid var(--gray-dark);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-item:hover { 
    border-color: var(--gold);
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.item-badge { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: var(--gold); 
    color: var(--black-dark); 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    font-size: 16px; 
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.4);
}

.item-name { 
    font-weight: bold; 
    margin-bottom: 10px; 
    padding-right: 50px; 
    color: var(--white);
    font-size: 18px;
    line-height: 1.3;
}

.item-desc { 
    font-size: 14px; 
    color: var(--gray-light); 
    margin-bottom: 15px; 
    line-height: 1.4; 
    height: 40px; 
    overflow: hidden; 
}

.size-btns { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.size-btns button { 
    flex-grow: 1; 
    padding: 8px 12px; 
    border: 1px solid var(--gray-dark); 
    background: var(--black-medium); 
    cursor: pointer; 
    font-size: 14px; 
    border-radius: 6px; 
    color: var(--white);
    transition: all 0.2s ease;
}

.size-btns button:hover { 
    background: var(--gray-dark); 
    border-color: var(--gold);
}

/* --- CART HEADER --- */
.cart-header { 
    padding: 20px 25px; 
    background: var(--black-dark); 
    color: var(--gold); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 3px solid var(--gold);
    min-height: 80px;
    flex-shrink: 0;
}

.cart-header h3 {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* --- ORDER TYPE SELECTOR --- */
.order-type-selector {
    display: flex;
    padding: 15px;
    background: var(--black-light);
    border-bottom: 1px solid var(--gray-dark);
    gap: 10px;
    flex-shrink: 0;
}

.order-type-btn {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--gray-dark);
    background: var(--black-medium);
    color: var(--gray-light);
    font-weight: bold;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-type-btn:hover {
    background: var(--gray-dark);
    border-color: var(--gold);
}

.order-type-btn.active {
    background: linear-gradient(145deg, var(--gold), var(--gold-dark));
    color: var(--black-dark);
    border-color: var(--gold);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

/* --- CART CONTENT AREA (Scrollable) --- */
.cart-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for Firefox */
    overflow: hidden;
}

/* --- CART SECTION --- */
.cart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    max-height: 300px;
    border-bottom: 1px solid var(--gray-dark);
    overflow: hidden;
}

.cart-section-title {
    padding: 15px;
    margin: 0;
    background: var(--black-light);
    color: var(--gold);
    font-size: 18px;
    border-bottom: 1px solid var(--gray-dark);
    flex-shrink: 0;
}

.cart-items { 
    flex: 1;
    overflow-y: auto; 
    padding: 15px; 
    min-height: 100px;
}

/* Cart empty message */
.cart-items > div:first-child:not(.cart-item) {
    text-align: center; 
    color: var(--gray-medium); 
    margin-top: 20px; 
    font-style: italic;
    font-size: 16px;
}

/* Individual cart item - CLEARER DESIGN */
.cart-item {
    background: var(--black-light);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: var(--gold);
    background: var(--gray-dark);
}

.cart-item-info {
    flex: 1;
    min-width: 0; /* Prevents overflow */
}

.cart-item-number {
    font-weight: bold;
    color: var(--gold);
    font-size: 15px;
}

.cart-item-name {
    font-weight: 600;
    color: var(--white);
    margin: 3px 0;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-size {
    color: var(--gray-light);
    font-size: 13px;
}

.cart-item-price {
    font-weight: bold;
    color: var(--gold);
    font-size: 16px;
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--error-red);
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.2s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

/* --- CUSTOMER SECTION --- */
.customer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    max-height: 300px;
    overflow: hidden;
}

.customer-section-title {
    padding: 15px;
    margin: 0;
    background: var(--black-light);
    color: var(--gold);
    font-size: 18px;
    border-bottom: 1px solid var(--gray-dark);
    flex-shrink: 0;
}

.customer-form { 
    flex: 1;
    overflow-y: auto;
    padding: 15px; 
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-form input, 
.customer-form select { 
    width: 100%; 
    padding: 14px 16px; 
    border: 2px solid var(--gray-dark); 
    border-radius: 10px; 
    background: var(--black-medium);
    color: var(--white);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 50px;
    cursor: pointer;
}

.customer-form input:focus, 
.customer-form select:focus { 
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.customer-form select option {
    background: var(--black-medium);
    color: var(--white);
    padding: 15px;
}

/* Hide delivery address section for pickup */
#delivery-address-section {
    display: block;
}

.pickup-mode #delivery-address-section {
    display: none;
}

.zip-error { 
    color: var(--error-red); 
    font-size: 14px; 
    display: none; 
    margin-top: 8px; 
    margin-bottom: 10px; 
    font-weight: bold;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--error-red);
}

/* --- TOTALS & CHECKOUT SECTION (FIXED AT BOTTOM) --- */
.totals-checkout-section {
    flex-shrink: 0;
    background: var(--black-dark);
    border-top: 3px solid var(--gold);
    margin-top: auto; /* Pushes to bottom */
}

.totals-area { 
    padding: 25px 20px; 
    background: var(--black-dark); 
    color: var(--white);
    border-top: 3px solid var(--gold);
    position: relative;
    z-index: 100;
}

.total-row { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 12px;
    font-size: 16px;
    padding: 8px 0;
}

.total-big { 
    font-size: 24px; 
    font-weight: bold; 
    margin-top: 10px; 
    border-top: 2px solid var(--gray-dark); 
    padding-top: 15px; 
    color: var(--gold);
}

.vat-info { 
    display: none; 
}

/* --- UPDATED CHECKOUT BUTTON - MORE VISIBLE AND PROMINENT --- */
.checkout-btn { 
    width: 100%; 
    padding: 22px 20px; 
    background: linear-gradient(145deg, var(--gold), var(--gold-dark), var(--gold)); 
    color: var(--black-dark) !important; 
    border: none; 
    font-size: 20px; 
    font-weight: bold; 
    border-radius: 12px; 
    cursor: pointer; 
    margin-top: 20px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    min-height: 70px;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    display: block;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1000;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.checkout-btn:hover:not(:disabled) { 
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.checkout-btn:hover:not(:disabled)::before {
    left: 100%;
}

.checkout-btn:active:not(:disabled) { 
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
}

.checkout-btn:disabled { 
    background: var(--gray-dark); 
    color: var(--gray-medium) !important; 
    cursor: not-allowed; 
    transform: none;
    box-shadow: none;
    text-shadow: none;
}

.checkout-btn:disabled::before {
    display: none;
}

/* Add a pulsing effect when enabled and cart has items */
@keyframes pulse-glow {
    0% { box-shadow: 0 8px 20px rgba(212, 175, 55, 0.5); }
    50% { box-shadow: 0 8px 25px rgba(212, 175, 55, 0.7); }
    100% { box-shadow: 0 8px 20px rgba(212, 175, 55, 0.5); }
}

.checkout-btn:not(:disabled) {
    animation: pulse-glow 2s infinite;
}

/* --- EXTRAS MODAL STYLES --- */
.extra-item {
    transition: all 0.3s ease;
}

.extra-item:hover {
    border-color: var(--gold) !important;
    background: var(--gray-dark) !important;
    transform: translateY(-2px);
}

.extra-item input[type="checkbox"] {
    accent-color: var(--gold);
}

.extra-item label:hover {
    color: var(--gold-light) !important;
}

/* Cart item extras styling */
.cart-item-extras {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PRINTING CSS (UPDATED FOR 80MM RECEIPT PRINTER) --- */
#receipt-container { 
    display: none; 
}

@media print {
    /* 80mm Thermal Printer Settings */
    html, body {
        width: 80mm !important;
        max-width: 80mm !important;
        min-width: 80mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
        font-size: 10pt !important;
        line-height: 1.2 !important;
    }
    
    /* Hide everything except receipt */
    body * {
        visibility: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #receipt-container,
    #receipt-container * {
        visibility: visible !important;
        font-family: 'Courier New', monospace !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    #receipt-container {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 80mm !important;
        max-width: 80mm !important;
        min-width: 80mm !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Customer Receipt Styling */
    .customer-receipt,
    .kitchen-receipt {
        width: 80mm !important;
        max-width: 80mm !important;
        min-width: 80mm !important;
        padding: 5px !important;
        margin: 0 auto !important;
        page-break-after: always !important;
        font-size: 10pt !important;
        line-height: 1.2 !important;
        border-bottom: 1px dashed #000 !important;
    }
    
    /* Kitchen Receipt */
    .kitchen-receipt {
        page-break-before: always !important;
        border-top: 2px solid #000 !important;
        margin-top: 10px !important;
    }

    /* Header Section */
    .header-section {
        text-align: center !important;
        border-bottom: 1px solid #000 !important;
        padding-bottom: 5px !important;
        margin-bottom: 5px !important;
    }
    
    .header-section h3 {
        font-size: 12pt !important;
        font-weight: bold !important;
        margin: 0 0 3px 0 !important;
        text-transform: uppercase !important;
    }
    
    .header-section p {
        margin: 2px 0 !important;
        font-size: 9pt !important;
    }

    /* Info Section */
    .info-section {
        border-bottom: 1px dashed #000 !important;
        padding: 5px 0 !important;
        margin: 5px 0 !important;
        font-size: 9pt !important;
    }
    
    .info-section div {
        margin: 2px 0 !important;
        font-weight: bold !important;
    }

    /* Items Section - CLEAR PRODUCT DISPLAY */
    .items-section {
        margin: 10px 0 !important;
    }
    
    .section-title {
        font-weight: bold !important;
        text-decoration: underline !important;
        margin: 5px 0 !important;
        font-size: 10pt !important;
    }
    
    .receipt-row {
        display: flex !important;
        justify-content: space-between !important;
        margin: 4px 0 !important;
        padding: 2px 0 !important;
        font-size: 10pt !important;
        border-bottom: 1px dotted #ccc !important;
    }
    
    .receipt-row:last-child {
        border-bottom: none !important;
    }
    
    .item-name-print {
        flex: 1 !important;
        font-weight: bold !important;
        max-width: 70% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .item-price-print {
        font-weight: bold !important;
        text-align: right !important;
        min-width: 30% !important;
    }

    /* Kitchen Item Display */
    .kitchen-item {
        font-weight: bold !important;
        margin: 5px 0 !important;
        padding: 3px 0 !important;
        border-bottom: 1px solid #000 !important;
        font-size: 11pt !important;
    }
    
    .kitchen-number {
        color: black !important;
        font-weight: bold !important;
    }

    /* Summary Section */
    .summary-section {
        border-top: 2px solid #000 !important;
        margin-top: 10px !important;
        padding-top: 10px !important;
    }
    
    .summary-total {
        font-size: 12pt !important;
        font-weight: bold !important;
        display: flex !important;
        justify-content: space-between !important;
        margin: 5px 0 !important;
    }

    /* Kitchen Instructions */
    .kitchen-instructions {
        margin-top: 10px !important;
        border-top: 1px dashed #000 !important;
        padding-top: 5px !important;
    }
    
    .instructions-area {
        border: 1px solid #000 !important;
        min-height: 30px !important;
        margin-top: 5px !important;
    }

    /* Print page break control */
    .page-break {
        page-break-before: always !important;
    }
    
    /* Hide unnecessary elements */
    .no-print {
        display: none !important;
    }
    
    /* Extras in print */
    .cart-item-extras {
        border-top: 1px dashed #ccc !important;
        margin-top: 3px !important;
        padding-top: 3px !important;
        font-size: 9pt !important;
    }
}

/* --- SCROLLBAR STYLING --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--black-medium);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1200px) {
    .menu-panel {
        width: 60%;
    }
    
    .cart-panel {
        width: 40%;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .menu-panel {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 3px solid var(--gold);
    }
    
    .cart-panel {
        width: 100%;
        height: 50vh;
        border-left: none;
        border-top: 3px solid var(--gold);
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .cat-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 50px;
    }
    
    .cart-section {
        max-height: 150px;
    }
    
    .customer-section {
        max-height: 150px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 15px;
        gap: 15px;
    }
    
    .brand {
        font-size: 22px;
    }
    
    #search-input {
        padding: 12px;
        font-size: 15px;
    }
    
    .categories {
        padding: 15px;
    }
    
    .cat-btn {
        padding: 10px 15px;
        font-size: 13px;
        min-height: 45px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 15px;
        gap: 10px;
    }
    
    .menu-item {
        padding: 15px;
        min-height: 130px;
    }
    
    .item-badge {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .item-name {
        font-size: 15px;
        padding-right: 40px;
    }
    
    .cart-header {
        padding: 15px;
        min-height: 70px;
    }
    
    .cart-header h3 {
        font-size: 20px;
    }
    
    .order-type-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .customer-form {
        padding: 12px;
        gap: 10px;
    }
    
    .customer-form input,
    .customer-form select {
        padding: 12px;
        font-size: 15px;
        padding-right: 45px;
        background-position: right 12px center;
    }
    
    .totals-area {
        padding: 15px;
    }
    
    .total-row {
        font-size: 15px;
    }
    
    .total-big {
        font-size: 20px;
        padding-top: 12px;
    }
    
    .checkout-btn {
        padding: 18px;
        font-size: 18px;
        min-height: 60px;
    }
    
    .cart-section {
        max-height: 120px;
    }
    
    .customer-section {
        max-height: 120px;
    }
}