:root {
    --tomato-red: #D32F2F;
    --warm-cream: #FFF8E1;
    --charcoal: #212121;
    --dough: #F4E4BC;
    --accent: #FFC107;
    --text-dark: #1a1a1a;
    --text-light: #757575;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--warm-cream);
    color: var(--text-dark);
    padding-bottom: 70px; /* Space for bottom nav */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Fluid Typography */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
p, a, input, textarea { font-size: clamp(1rem, 2.5vw, 1.1rem); }

/* Header */
.header {
    background: var(--charcoal);
    color: var(--warm-cream);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo {
    font-family: 'Lobster', cursive;
    color: var(--tomato-red);
}
.cart-toggle {
    background: none;
    border: none;
    color: var(--warm-cream);
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
}
.cart-count {
    background: var(--tomato-red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* Hero */
.hero {
    height: 40vh;
    min-height: 250px;
    background: url('https://images.unsplash.com/photo-1513104890138-7c749659a591?w=1200&q=80') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}
.hero-content h2 { color: var(--warm-cream); margin-bottom: 0.5rem; }
.btn-primary {
    display: inline-block;
    background: var(--tomato-red);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-top: 1rem;
}
.btn-primary:hover { background: #b71c1c; transform: translateY(-2px); }

/* Menu */
.main-content { padding: 2rem 1rem; }
.menu-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}
.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--charcoal);
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.3s;
}
.filter-btn.active { background: var(--charcoal); color: var(--warm-cream); }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pizza-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.pizza-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.pizza-img-container {
    height: 200px;
    overflow: hidden;
}
.pizza-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
/* Unique rotating effect on hover */
.pizza-card:hover .pizza-img-container img {
    transform: scale(1.1) rotate(5deg); 
}
.pizza-info { padding: 1rem; }
.pizza-name { font-size: 1.2rem; font-weight: 600; color: var(--charcoal); display: flex; justify-content: space-between;}
.pizza-desc { font-size: 0.9rem; color: var(--text-light); margin: 0.5rem 0; min-height: 40px; }
.pizza-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.pizza-price { font-size: 1.4rem; font-weight: 800; color: var(--tomato-red); }
.add-btn {
    background: var(--charcoal);
    color: var(--warm-cream);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}
.add-btn:hover { background: var(--tomato-red); }

.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: white;
}
.tag.veg { background: #4CAF50; }
.tag.non-veg { background: #F44336; }
.tag.bestseller { background: var(--accent); color: var(--charcoal); right: 10px; left: auto; }

/* Bottom Navigation (Mobile First) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    flex: 1;
}
.nav-item.active { color: var(--tomato-red); }
.nav-item .icon { font-size: 1.4rem; }

/* Desktop Adaptation */
@media (min-width: 768px) {
    body { padding-bottom: 0; }
    .bottom-nav { display: none; }
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Cart Drawer */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1001;
}
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--warm-cream);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.cart-drawer.active { transform: translateX(0); }
.cart-header {
    padding: 1.5rem;
    background: var(--charcoal);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-cart { background: none; border: none; color: white; font-size: 2rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}
.cart-footer { padding: 1.5rem; background: white; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.cart-total { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; text-align: right; }
.checkout-btn { width: 100%; }

/* Contact Form */
.contact-section { padding: 3rem 1rem; }
.section-title { text-align: center; margin-bottom: 2rem; }
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form input, .contact-form textarea {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--tomato-red);
}
#formMsg { text-align: center; font-weight: 600; margin-top: 1rem; }
