﻿:root {
    --cream: #fdf8ef;
    --red: #c42128;
    --red-dark: #a11b21;
    --green: #008c45;
    --green-dark: #006e36;
    --white: #ffffff;
    --dark: #222222;
    --gray: #5a5a5a;
    --shadow: 0 8px 28px rgba(34, 34, 34, 0.1);
    --radius: 14px;
    --font-serif: "Playfair Display", Georgia, serif;
    --font-sans: "Source Sans 3", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark);
    background: var(--cream);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    margin: 0 0 0.5em;
    line-height: 1.2;
}

.container {
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.6rem;
    border: none;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-red {
    background: var(--red);
    color: var(--white);
}

.btn-red:hover {
    background: var(--red-dark);
    box-shadow: 0 6px 20px rgba(196, 33, 40, 0.35);
}

.btn-green {
    background: var(--green);
    color: var(--white);
}

.btn-green:hover {
    background: var(--green-dark);
    box-shadow: 0 6px 20px rgba(0, 140, 69, 0.35);
}

.btn-block {
    width: 100%;
}

.btn-login {
    background: var(--green);
    color: var(--white);
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-login:hover {
    background: var(--green-dark);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.logo-text small {
    font-size: 0.72rem;
    color: var(--gray);
    font-weight: 500;
}

.main-nav ul {
    display: flex;
    gap: 1.75rem;
}

.main-nav a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--dark);
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--red);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--dark);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    position: relative;
}

.header-icon:hover {
    background: var(--cream);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
}

/* Hero */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
    max-width: 640px;
    color: var(--white);
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-lead {
    font-size: 1.1rem;
    margin: 0 0 1.75rem;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2.5rem;
}

.section-title-light {
    color: var(--white);
}

/* Menu */
.pizza-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.pizza-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.pizza-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(34, 34, 34, 0.14);
}

.pizza-card.hidden {
    display: none;
}

.pizza-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.pizza-body {
    padding: 1.25rem 1.25rem 1.5rem;
    text-align: center;
}

.pizza-body h3 {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.pizza-ingredients {
    font-size: 0.82rem;
    color: var(--gray);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.pizza-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

/* Promos */
.promos-section {
    background: var(--red);
    padding: 3.5rem 0 4rem;
}

.promo-slider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.promo-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.promo-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--white);
}

.promo-viewport {
    flex: 1;
    overflow: hidden;
}

.promo-track {
    display: flex;
    gap: 1.25rem;
    transition: transform 0.4s ease;
}

.promo-card {
    flex: 0 0 calc(33.333% - 0.85rem);
    min-width: calc(33.333% - 0.85rem);
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.promo-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.promo-banner {
    padding: 0.85rem 1rem;
    color: var(--white);
    text-align: center;
    font-size: 0.88rem;
    line-height: 1.35;
}

.promo-banner strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.promo-banner-red {
    background: var(--red-dark);
}

.promo-banner-green {
    background: var(--green);
}

.promo-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
}

.promo-dot.active {
    background: var(--white);
}

/* Delivery */
.search-bar {
    position: relative;
    max-width: 720px;
    margin: 0 auto 2.5rem;
}

.search-bar input {
    width: 100%;
    padding: 1rem 3.25rem 1rem 1.25rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-family: var(--font-sans);
    background: var(--white);
    box-shadow: var(--shadow);
    outline: none;
}

.search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(0, 140, 69, 0.25), var(--shadow);
}

.search-icon {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    pointer-events: none;
}

.delivery-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
}

.delivery-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}

.delivery-map img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.zones-legend {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.zones-legend h3 {
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.zones-legend > ul {
    margin-bottom: 1.75rem;
}

.zones-legend > ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.zone-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.zone-dot-red { background: var(--red); }
.zone-dot-green { background: var(--green); }
.zone-dot-blue { background: #3b82c4; }

.order-form h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.order-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.65rem;
    border: 1px solid #e5e0d8;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.order-form input:focus {
    outline: none;
    border-color: var(--green);
}

.order-cart-hint {
    font-size: 0.88rem;
    color: var(--gray);
    margin: 0.5rem 0 1rem;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 3rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-list li,
.footer-col p {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: background 0.2s;
}

.social-links a:hover {
    background: var(--red);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p {
    margin: 0;
}

/* Cart drawer */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-drawer.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(380px, 100%);
    height: 100%;
    background: var(--white);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.cart-drawer.open .cart-drawer-panel {
    transform: translateX(0);
}

.cart-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.cart-drawer-head h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
}

.cart-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--cream);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dark);
}

.cart-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cart-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.92rem;
    gap: 0.5rem;
}

.cart-list li.empty {
    justify-content: center;
    color: var(--gray);
    border: none;
}

.cart-drawer-total {
    font-size: 1rem;
    margin: 0 0 1rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 300;
    background: var(--dark);
    color: var(--white);
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-size: 0.92rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    transition: transform 0.35s ease;
    max-width: calc(100% - 2rem);
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .pizza-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promo-card {
        flex: 0 0 calc(50% - 0.65rem);
        min-width: calc(50% - 0.65rem);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem 1.25rem 1.5rem;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .menu-toggle {
        display: flex;
    }

    .btn-login {
        display: none;
    }

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

    .promo-card {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .promo-arrow {
        display: none;
    }

    .hero {
        min-height: 420px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 520px) {
    .pizza-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
        margin: 0 auto;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}
