/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #2c2c2c;
    background-color: #fdfcf8;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

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

/* CSS Variables for Italian Theme Colors */
:root {
    --italian-red: #c41e3a;
    --forest-green: #355e3b;
    --golden-rod: #daa520;
    --warm-cream: #fdfcf8;
    --charcoal: #2c2c2c;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--gray-200);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
    min-height: 3.5rem;
}

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

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--italian-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.logo-text {
    display: none;
}

.logo-text h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.2;
}

.cart-button {
    position: relative;
    background: var(--italian-red);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
    font-size: 0.875rem;
    min-height: 2.5rem;
    flex-shrink: 0;
}

.cart-button:hover {
    background: #b01c32;
}

.cart-button:active {
    transform: scale(0.98);
}

.cart-text {
    display: none;
    white-space: nowrap;
}

.cart-count {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    background: var(--golden-rod);
    color: var(--charcoal);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.cart-count.hidden {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--italian-red), #b01c32);
    color: var(--white);
    padding: 2rem 0 3rem;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: center;
    width: 100%;
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero p {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--golden-rod);
    color: var(--charcoal);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    min-height: 3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #c7941f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.hours-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    opacity: 0.9;
    flex-wrap: wrap;
    justify-content: center;
}

/* Navigation Tabs */
.nav-tabs {
    background: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 3.5rem;
    z-index: 900;
    border-bottom: 1px solid var(--gray-200);
}

.tabs-container {
    display: flex;
    overflow-x: auto;
    padding: 0.75rem 0;
    gap: 0.375rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-button {
    white-space: nowrap;
    padding: 0.5rem 0.875rem;
    border: none;
    border-radius: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-100);
    color: var(--charcoal);
    font-size: 0.8125rem;
    min-height: 2.25rem;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.tab-button:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.tab-button.active {
    background: var(--italian-red);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(196, 30, 58, 0.3);
}

.tab-button:active {
    transform: scale(0.98);
}

/* Menu Section */
.menu-section {
    padding: 1.5rem 0;
    min-height: 50vh;
}

.category-section {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.25rem;
    color: var(--charcoal);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.menu-item {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.menu-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.menu-item img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
    display: block;
}

.menu-item-content {
    padding: 1rem;
}

.menu-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
    line-height: 1.3;
}

.menu-item p {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.price {
    color: var(--italian-red);
    font-weight: 700;
    font-size: 1.0625rem;
    flex-shrink: 0;
}

.order-now-btn {
    background: #25D366;
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    min-height: 2.25rem;
    flex: 1;
}

.order-now-btn:hover {
    background: #128C7E;
    transform: scale(1.02);
}

.order-now-btn:active {
    transform: scale(0.98);
}

.add-button {
    background: var(--golden-rod);
    color: var(--charcoal);
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    min-height: 2.25rem;
    flex: 1;
}

.add-button:hover {
    background: #c7941f;
    transform: scale(1.02);
}

.add-button:active {
    transform: scale(0.98);
}

/* About Section */
.about-section {
    background: linear-gradient(to right, var(--forest-green), #2a4e2e);
    color: var(--white);
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.story-content p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-item i {
    color: var(--golden-rod);
    width: 1.25rem;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
}

/* Location Section */
.location-section {
    background: var(--white);
    padding: 4rem 0;
}

.location-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--charcoal);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--warm-cream);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--charcoal);
}

.info-card h3 i {
    color: var(--italian-red);
    width: 1.25rem;
}

.info-card p {
    color: var(--charcoal);
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    color: var(--charcoal);
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.map-placeholder {
    height: 24rem;
    background: var(--gray-200);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-content {
    text-align: center;
    color: var(--gray-600);
}

.map-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.map-content p {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.map-content span {
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--italian-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.footer-section h3, .footer-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #d1d5db;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.social-links a {
    color: #d1d5db;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 0.75rem;
    max-width: 28rem;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--charcoal);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    color: var(--gray-600);
    padding: 2rem 0;
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-cart p {
    margin-bottom: 0.5rem;
}

.empty-cart span {
    font-size: 0.875rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    gap: 0.75rem;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--charcoal);
    font-size: 0.9375rem;
    line-height: 1.3;
}

.cart-item-info p {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.3;
}

.cart-item-price {
    color: var(--italian-red);
    font-weight: 700;
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.quantity-btn {
    background: var(--white);
    border: 1px solid var(--gray-300);
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background: var(--gray-100);
}

.quantity {
    width: 2rem;
    text-align: center;
    font-weight: 500;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
}

.remove-btn:hover {
    color: #dc2626;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-total span {
    font-size: 1.125rem;
    font-weight: 700;
}

.total-price {
    color: var(--italian-red);
}

.checkout-btn {
    width: 100%;
    background: #25D366;
    color: var(--white);
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.checkout-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.checkout-btn:active {
    transform: translateY(0);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 20rem;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast i {
    color: #10b981;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.toast-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--charcoal);
}

.toast-text p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

/* Responsive Design */

/* Small screens (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 1.5rem 0 2.5rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.875rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .menu-item img {
        height: 8rem;
    }
    
    .menu-item-content {
        padding: 0.75rem;
    }
    
    .category-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .menu-item-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .order-now-btn,
    .add-button {
        width: 100%;
        justify-content: center;
        font-size: 0.8125rem;
        padding: 0.625rem;
    }
    
    .modal-overlay {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.125rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .cart-item-info {
        width: 100%;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Medium screens (481px to 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
}

/* Tablet screens (641px to 768px) */
@media (min-width: 641px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-content {
        height: 4rem;
    }
    
    .logo-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .logo-text {
        display: block;
    }
    
    .cart-text {
        display: inline;
    }
    
    .cart-button {
        padding: 0.5rem 1rem;
    }
    
    .hero {
        padding: 2.5rem 0 4rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
        max-width: 42rem;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 1rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .category-title {
        font-size: 1.875rem;
    }
}

/* Large screens (769px to 1024px) */
@media (min-width: 769px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .location-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Extra large screens (1025px and up) */
@media (min-width: 1025px) {
    .container {
        padding: 0 2rem;
    }
    
    .header-content {
        height: 5rem;
    }
    
    .logo-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero p {
        font-size: 1.25rem;
        max-width: 48rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-title {
        font-size: 2.25rem;
    }
}

/* Ultra-wide screens (1281px and up) */
@media (min-width: 1281px) {
    .hero h1 {
        font-size: 4rem;
    }
}