* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Arial', sans-serif;
    color: #fff;
    min-height: 100vh;
    background: url('../img/bg-wood.jpg') center/cover fixed no-repeat, #3a2416;
}

/* ===== Header ===== */
header {
    background: linear-gradient(135deg, rgba(45,134,89,.95), rgba(76,168,118,.95));
    padding: 14px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88em;
    font-weight: 600;
    transition: all .25s;
    white-space: nowrap;
}
.back-btn:hover { background: rgba(255,255,255,.25); }

.header-title {
    font-size: .95em;
    opacity: .9;
    font-weight: 600;
}

.cart-toggle-btn {
    margin-left: auto;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,107,53,.4);
    font-size: .9em;
    transition: opacity .2s;
}
.cart-toggle-btn:hover { opacity: .9; }
.cart-toggle-btn .badge {
    background: #fff;
    color: #ff6b35;
    border-radius: 50%;
    padding: 1px 8px;
    font-size: .82em;
    font-weight: 700;
}

/* ===== Main ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 120px;
}

/* ===== Category pills ===== */
#category-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 24px 0 12px;
    scrollbar-width: thin;
}
#category-nav:empty { display: none; }

.cat-pill {
    padding: 9px 18px;
    border-radius: 25px;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 2px solid rgba(255,255,255,.2);
    cursor: pointer;
    font-weight: 600;
    font-size: .82em;
    white-space: nowrap;
    letter-spacing: .06em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    transition: all .2s;
}
.cat-pill.active,
.cat-pill:hover {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: rgba(255,255,255,.5);
    box-shadow: 0 4px 15px rgba(255,107,53,.4);
}

/* ===== Menu section headers ===== */
#menu h2 {
    color: #fff;
    border-bottom: 3px solid #ff6b35;
    padding-bottom: 10px;
    margin: 32px 0 18px;
    font-size: 1.4em;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,.5);
    text-transform: uppercase;
}

/* ===== Dish grid ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.dish-card {
    background: rgba(255,255,255,.96);
    color: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    transition: all .3s ease;
}
.dish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,.4);
}

.dish-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #e0e0e0;
}

.dish-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dish-name {
    font-size: 1em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.dish-description {
    font-size: .82em;
    color: #555;
    line-height: 1.4;
    flex: 1;
    margin-bottom: 12px;
}

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

.dish-price {
    font-weight: 700;
    color: #2d8659;
    font-size: 1.15em;
}

.add-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: .82em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255,107,53,.4);
    transition: opacity .2s;
}
.add-btn:hover { opacity: .88; }
.add-btn:active { transform: scale(.97); }

/* ===== Loading spinner (initial) ===== */
.spinner {
    border: 5px solid rgba(255,255,255,.2);
    border-top: 5px solid #ff6b35;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #fff; text-align: center; font-size: 1em; opacity: .85; }

/* ===== Cart drawer ===== */
#cart {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 360px;
    background: rgba(255,255,255,.99);
    color: #1a1a1a;
    box-shadow: -8px 0 40px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow: hidden;
}
#cart.open { transform: translateX(0); }

.cart-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #2d8659, #4ca876);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.05em;
    flex-shrink: 0;
}
.cart-close-btn {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.cart-close-btn:hover { background: rgba(255,255,255,.35); }

#cart-items {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 10px 18px;
}

#cart-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(45,134,89,.1);
    font-size: .88em;
}
#cart-items li:last-child { border-bottom: none; }

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 10px;
    font-size: 1em;
}

.cart-item-info { flex: 1; margin-right: 10px; }
.cart-item-name { font-weight: 700; color: #1a1a1a; margin-bottom: 3px; }
.cart-item-price { color: #666; font-size: .9em; }

.btn-quantity {
    background: #4ca876;
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-quantity:hover { background: #2d8659; }

.remove-btn {
    background: #f5f5f5;
    color: #d32f2f;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    margin-left: 6px;
    transition: background .2s;
}
.remove-btn:hover { background: #fde0e0; }

.cart-total-row {
    padding: 12px 18px;
    background: rgba(45,134,89,.06);
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #2d8659;
    font-size: 1.05em;
    flex-shrink: 0;
}

.clear-cart-btn {
    background: none;
    border: none;
    color: #999;
    font-size: .8em;
    cursor: pointer;
    padding: 4px 18px 10px;
    display: block;
    transition: color .2s;
}
.clear-cart-btn:hover { color: #d32f2f; }

/* ===== Order form (inside cart drawer) ===== */
.order-form-wrap {
    padding: 14px 18px 18px;
    border-top: 1px solid rgba(45,134,89,.15);
    flex-shrink: 0;
}

.tg-info-block {
    font-size: .8em;
    color: #555;
    background: rgba(45,134,89,.07);
    border-left: 3px solid #4ca876;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    line-height: 1.5;
}

#order-form .form-group { margin-bottom: 10px; }

#order-form label {
    display: block;
    color: #2d8659;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: .85em;
}

#order-form input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(45,134,89,.25);
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    font-size: .95em;
    transition: border-color .2s;
}
#order-form input:focus {
    outline: none;
    border-color: #4ca876;
}
#order-form small { color: #999; font-size: .78em; margin-top: 3px; display: block; }

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: .04em;
    margin-top: 8px;
    transition: opacity .2s;
}
.submit-btn:hover { opacity: .9; }
.submit-btn:disabled { background: #ccc; cursor: not-allowed; opacity: 1; }

/* ===== Cart overlay backdrop ===== */
#cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 199;
    display: none;
}
#cart-backdrop.visible { display: block; }

/* ===== Loading overlay ===== */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* ===== Notifications ===== */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #fff;
    color: #1a1a1a;
    padding: 14px 20px;
    border-radius: 12px;
    border-left: 4px solid #4ca876;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
    z-index: 10000;
    font-size: .92em;
    animation: slideInRight .3s ease-out;
    max-width: 300px;
}
.notification.error { border-left-color: #d32f2f; }

@keyframes slideInRight {
    from { transform: translateX(340px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(340px); opacity: 0; }
}

/* ===== Success modal ===== */
.notification-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.notification-modal-content {
    background: #fff;
    color: #1a1a1a;
    padding: 36px 32px;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    animation: scaleIn .3s ease-out;
}
@keyframes scaleIn {
    from { transform: scale(.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Contact buttons (used in success modal) */
.contact-button {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all .25s;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.contact-button:hover { transform: translateY(-2px); }
.contact-button.whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.contact-button.telegram { background: linear-gradient(135deg, #0088cc, #0066aa); }
.contact-button.phone { background: linear-gradient(135deg, #e74c3c, #c0392b); }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    header { padding: 12px 16px; }
    main { padding: 0 12px 100px; }
    .menu-grid { grid-template-columns: 1fr; }
    #cart { width: 100%; }
    .header-title { display: none; }
}

/* ===== Total display in drawer ===== */
#total { display: none; }
