/* PIZZA DUDE - Premium HTML5 Redesign
   Theme: Italian Heritage (Tricolore)
   v2.6.0 - Scrolling Basket Update
*/

/* --- 1. THE RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- 2. BRAND VARIABLES --- */
:root {
    --ita-green: #008C45;       /* Italian Flag Green */
    --ita-white: #fcfaf7;       /* Off-white/Dough */
    --ita-red: #CD212A;         /* Italian Flag Red */
    --brand-dark: #1a1a1a;      /* Deep Charcoal */
    --text-main: #333333;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- 3. BASE STYLES --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center { text-align: center; }

h1, h2, h3 {
    color: var(--brand-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gold-divider {
    width: 60px;
    height: 4px;
    background: var(--ita-green);
    margin: 0 auto;
}

/* --- 4. NAVIGATION --- */
.main-nav {
    background: var(--brand-dark); 
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.logo-main { color: white; } 
.logo-sub { color: var(--ita-red); }

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li { margin-left: 2rem; }

.nav-links a {
    text-decoration: none;
    color: white; 
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--ita-green); }

.btn-nav {
    background: var(--ita-green);
    color: white !important;
    padding: 8px 20px;
    border-radius: 4px;
}

/* --- 5. HERO SECTION --- */
.hero {
    height: 80vh;
    background: linear-gradient(to right, rgba(0, 140, 69, 0.7), rgba(205, 33, 42, 0.7)),
                url('../assets/images/hero-pizza.jpg');
    background-color: var(--brand-dark);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-tagline {
    color: white;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 3px;
    display: inline-block;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--ita-white);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.cta-primary {
    display: inline-block;
    background: var(--ita-red);
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 1rem;
    transition: var(--transition);
    border-radius: 2px;
}

.cta-secondary {
    display: inline-block;
    border: 2px solid white;
    color: white;
    padding: 13px 33px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: var(--transition);
    background: rgba(255,255,255,0.1);
}

/* --- 6. MENU GRID --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px 60px;
    margin-top: 3rem;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.dots {
    flex-grow: 1;
    border-bottom: 2px dotted #ddd;
    margin: 0 10px;
    position: relative;
    top: -4px;
}

.menu-card:nth-child(odd) .dots { border-color: var(--ita-green); opacity: 0.4; }
.menu-card:nth-child(even) .dots { border-color: var(--ita-red); opacity: 0.4; }

.price {
    font-weight: 700;
    color: var(--brand-dark);
}

.menu-card p {
    font-size: 0.95rem;
    color: #666;
}

/* --- 7. FOOTER & MISC --- */
footer {
    background: var(--brand-dark) !important;
    color: white !important;
    border-top: none !important;
}

footer a { color: white; text-decoration: none; transition: var(--transition); }
footer a:hover { color: var(--ita-green); }

/* --- 8. RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-flex { flex-direction: column; gap: 15px; }
    .nav-links li { margin: 0 10px; }
    .hero { height: 60vh; }
    .menu-grid { grid-template-columns: 1fr; }
    #shopping-basket {
        width: 90%;
        right: 5%;
        bottom: 10px;
        max-height: 50vh;
    }
}

.logo-url {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--ita-green);
    font-weight: bold;
    margin-top: 2px;
    display: block;
}

.menu-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ita-green);
    flex-shrink: 0;
}

.menu-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* --- 9. SHOPPING BASKET (SCROLLING FIX) --- */
#shopping-basket {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: white;
    border: 3px solid var(--ita-green);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    
    /* THE FIX: Force vertical layout and cap the height */
    display: flex !important; 
    flex-direction: column;
    max-height: 450px; 
    overflow: hidden; /* Keeps everything inside the rounded corners */
}

#basket-content {
    overflow-y: auto; 
    flex: 1; /* Grows to fill space, but respects the parent's max-height */
    padding: 15px; /* Moved padding here so items don't touch the border */
}

/* Slick Custom Scrollbar */
#basket-content::-webkit-scrollbar { width: 5px; }
#basket-content::-webkit-scrollbar-thumb {
    background: var(--ita-green);
    border-radius: 10px;
}

#basket-total {
    border-top: 1px solid #eee;
    padding: 10px 15px 0 15px; /* Added side padding to match content */
    font-weight: bold;
    font-size: 1.1rem;
    text-align: right;
    color: var(--brand-dark);
}

.basket-footer {
    padding: 0 15px 15px 15px; /* Bottom-heavy padding for the footer area */
    flex-shrink: 0; /* Ensures the buttons never get squashed */
}

.btn-checkout {
    background: var(--ita-red);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-checkout:hover { background: #a51a22; }

.basket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.9rem;
}
/* Styling the Quantity Controls */
.basket-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.qty-btn:hover {
    background: #008C45;
    color: white;
    border-color: #008C45;
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-number {
    font-weight: 900;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

/* Polishing the Clear Order Button */
.btn-clear {
    width: 100%;
    margin-top: 12px;
    background: transparent !important;
    border: 1px solid #eee !important;
    color: #888 !important;
    text-transform: uppercase;
    font-size: 0.7rem !important;
    letter-spacing: 1px;
    font-weight: bold;
    padding: 10px !important;
    transition: 0.3s;
}

.btn-clear:hover {
    background: #fdf2f2 !important;
    color: #CD212A !important;
    border-color: #f8d7da !important;
}
/* KEEP ALL YOUR EXISTING CSS HERE FIRST - DO NOT DELETE ANY OF IT */

/* --- APPEND THE BELOW TO THE VERY BOTTOM OF THE FILE --- */

.hero { padding: 30px 0 !important; min-height: auto !important; }
footer { padding: 30px 0 !important; background: #1a1a1a !important; color: white !important; border-top: none !important; }
.section-padding { padding: 40px 0; }
.nav-flex { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; padding: 10px 0; }
.nav-logo-left { justify-self: start; }
.nav-title-middle { justify-self: center; line-height: 1; text-align: center; color: #008C45; }
.menu-toggle { justify-self: end; display: none; cursor: pointer; flex-direction: column; gap: 5px; border: none; background: none; padding: 10px; z-index: 3000; }
.menu-toggle span { width: 25px; height: 3px; background: #ffffff; border-radius: 2px; transition: 0.3s; }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(26, 26, 26, 0.98); flex-direction: column; justify-content: center; align-items: center; gap: 30px; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 2500; list-style: none; margin: 0; padding: 0; }
    .nav-links.active { opacity: 1; visibility: visible; }
    .nav-links li a { color: white !important; font-size: 1.8rem; font-weight: 900; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); background: white; }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -7px); background: white; }
}

.modal { display: none; position: fixed; z-index: 4000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; padding: 15px; backdrop-filter: blur(5px); }
.modal-content { background: white; max-width: 500px; width: 100%; border-radius: 15px; overflow: hidden; position: relative; }
.close-modal-top { position: absolute; top: 15px; right: 15px; font-size: 35px; color: white; cursor: pointer; z-index: 4001; }
#modalImg { width:100%; height:250px; object-fit:cover; cursor: pointer; }

.menu-card { cursor: pointer; transition: 0.3s; display: flex; gap: 20px; align-items: flex-start; background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #eee; }
.menu-thumb { width: 85px; height: 85px; border-radius: 50%; object-fit: cover; border: 2px solid #008C45; flex-shrink: 0; }

#shopping-basket { display: none !important; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 768px) { .split-grid { grid-template-columns: 1fr; } }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.9rem; }
.hours-table td { padding: 6px 0; border-bottom: 1px solid #eee; }
.hours-table td:last-child { text-align: right; font-weight: bold; color: #444; }
.map-container { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.map-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white; }
.map-btn { background: #CD212A; color: white; padding: 8px 15px; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 0.8rem; display: inline-block; margin-top: 5px; }
.soretech-brand { color: #447cd4 !important; font-weight: 900; text-decoration: none; }
.social-icon { width: 40px; height: 40px; line-height: 40px; border-radius: 50%; background: #333; color: #ffffff; text-decoration: none; font-weight: 900; display: inline-block; transition: 0.3s; font-family: 'Arial Black', sans-serif; font-size: 1.2rem; border: 1px solid #444; }
.fb:hover { background: #1877F2; border-color: #1877F2; transform: translateY(-3px); }
.ig:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border-color: transparent; transform: translateY(-3px); }
.tw:hover { background: #000000; border-color: #555; transform: translateY(-3px); }



/* Fix for sticky header covering section titles */
#about, 
#menu, 
#opening-hours, 
#find-us, 
#events {
    scroll-margin-top: 70px;
}
/* --- ALLERGEN PAGE STYLES --- */
.allergen-body { font-family: sans-serif; line-height: 1.6; color: #333; background: #f8f9fa; margin: 0; padding: 20px 20px 100px 20px; }
.allergen-container { max-width: 900px; margin: 0 auto; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.allergen-h1 { border-left: 8px solid var(--ita-green); padding-left: 15px; color: var(--ita-green); text-transform: uppercase; }
.disclaimer-box { background: #fff5f5; border: 1px solid #feb2b2; padding: 20px; border-radius: 8px; margin-bottom: 30px; color: #c53030; font-weight: 500; }
.allergen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 20px 0 40px 0; }
.allergen-item { background: #eee; padding: 10px; border-radius: 5px; text-align: center; font-size: 0.9rem; font-weight: bold; }
.matrix-wrapper { overflow-x: auto; margin-top: 20px; }
.allergen-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.allergen-table th, .allergen-table td { border: 1px solid #eee; padding: 12px; text-align: center; }
.allergen-table th { background: var(--ita-green); color: white; text-transform: uppercase; font-size: 0.75rem; }
.dish-name { text-align: left; font-weight: bold; background: #fafafa; }
.contains { background: #fee2e2; color: #b91c1c; font-weight: bold; }
.back-nav { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ita-green); color: white; padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: bold; box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 1000; }
/* --- TERMS PAGE STYLES --- */
.terms-body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 0 auto; padding: 0 20px 100px 20px; background: #fdfdfd; }
.header-brand { text-align: center; padding: 40px 0; border-bottom: 4px solid var(--ita-green); margin-bottom: 40px; }
.header-brand h1 { margin: 0; color: var(--ita-green); text-transform: uppercase; letter-spacing: 2px; }
.header-brand span { color: var(--ita-red); }
.terms-section { margin-bottom: 40px; background: white; padding: 20px; border-radius: 8px; border: 1px solid #eee; }
.terms-h2 { font-size: 1.1rem; color: var(--ita-green); text-transform: uppercase; border-bottom: 1px solid #eee; padding-bottom: 10px; }


