/* Загальні стилі */
:root {
    --primary-color: #e74c3c; /* Червоний */
    --secondary-color: #f39c12; /* Помаранчевий */
    --text-color: #333;
    --light-bg: #f8f8f8;
    --dark-bg: #2c3e50;
    --white: #fff;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    border: none;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.primary-btn:hover {
    background-color: #c0392b; /* Темніше червоний */
    color: var(--white);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--white);
}

.secondary-btn:hover {
    background-color: #e67e22; /* Темніше помаранчевий */
    color: var(--white);
}

.text-link {
    font-weight: 700;
}

/* Секції */
.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: var(--dark-bg);
}

h1 {
    font-size: 3.5rem;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-padding h2 {
    margin-bottom: 50px;
}


/* Header */
header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
    transition: color var(--transition-speed) ease;
}

.logo a:hover {
    color: var(--secondary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 700;
    color: var(--dark-bg);
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width var(--transition-speed) ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

#cart-count {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8em;
    vertical-align: super;
    margin-left: 5px;
}

.burger-menu {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark-bg);
}

/* Hero Section */
.hero-section {
    background: url('../img/hero-bg.jpg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    color: var(--white);
}

.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Page Hero (for other pages) */
.page-hero {
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 100px 0 80px;
    position: relative;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: 3.5rem;
    color: var(--white);
}

.page-hero p {
    font-size: 1.3rem;
    margin-top: 15px;
}

.menu-hero { background-image: url('../img/menu-bg.jpg'); }
.about-hero { background-image: url('../img/about-bg.jpg'); }
.cart-hero { background-image: url('../img/cart-bg.jpg'); }
.contact-hero { background-image: url('../img/contact-bg.jpg'); }


/* Dish Cards / Grids */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.dish-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    text-align: center;
    padding-bottom: 20px;
}

.dish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.dish-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.dish-card h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif; /* For better readability on cards */
}

.dish-card p {
    font-size: 0.95rem;
    color: #666;
    padding: 0 15px;
    margin-bottom: 15px;
}

.dish-card .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: block;
}

.dish-card .add-to-cart-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.view-all-btn {
    margin-top: 50px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* About Us Preview (index.html) */
.about-us-preview .about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
    text-align: left;
}

.about-us-preview .about-content img {
    min-width: 300px;
    width: 40%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-us-preview .about-content p {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Menu Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: var(--primary-color);
}

.category-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
    transition: border-color var(--transition-speed) ease;
}

.category-card:hover img {
    border-color: var(--secondary-color);
}

.category-card span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-bg);
    transition: color var(--transition-speed) ease;
}

.category-card:hover span {
    color: var(--primary-color);
}

/* About Page Specifics */
.our-story p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: left;
}

.our-values .values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.value-item .icon-large {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.value-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.value-item p {
    font-size: 0.95rem;
    color: #666;
}

.our-team .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    text-align: center;
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.team-member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    margin: 0 auto 20px;
}

.team-member h3 {
    font-size: 1.4rem;
    color: var(--dark-bg);
    margin-bottom: 5px;
}

.team-member p {
    color: var(--secondary-color);
    font-weight: 600;
}


/* Cart Page Specifics */
.cart-content .container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.cart-items-grid {
    flex: 2; /* Займає більшу частину простору */
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 200px; /* Для відображення повідомлення про порожній кошик */
}

.cart-item {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 15px;
    gap: 20px;
    transition: transform 0.2s ease;
}

.cart-item:hover {
    transform: translateY(-3px);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.cart-item-details .price {
    font-size: 1.1rem;
    color: #666;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-actions .quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.quantity-controls button {
    background-color: var(--light-bg);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.quantity-controls button:hover {
    background-color: #e0e0e0;
}

.quantity-controls span {
    padding: 0 10px;
    font-weight: 600;
}

.remove-item-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.remove-item-btn:hover {
    background-color: #c0392b;
}

.cart-summary {
    flex: 1; /* Займає меншу частину простору */
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 25px;
    min-width: 300px;
}

.cart-summary h2 {
    text-align: left;
    margin-bottom: 25px;
    font-size: 2rem;
    color: var(--dark-bg);
}

.cart-summary h2::after {
    left: 0;
    transform: translateX(0);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.summary-line span:first-child {
    color: #555;
}

.summary-line.total-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    border-top: 1px dashed #ddd;
    padding-top: 15px;
    margin-top: 20px;
}

#checkout-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1rem;
}

#checkout-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.clear-btn {
    width: 100%;
    margin-top: 10px;
    background-color: #95a5a6; /* Grey for clear */
}

.clear-btn:hover {
    background-color: #7f8c8d;
}

#empty-cart-message {
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    padding: 50px 0;
    width: 100%;
}

.hidden {
    display: none;
}


/* Contact Page Specifics */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.contact-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.contact-card .icon-large {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.contact-card p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.contact-card a {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

.contact-form-section {
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 60px;
}

.contact-form-section h2 {
    text-align: left;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--dark-bg);
}

.contact-form-section h2::after {
    left: 0;
    transform: translateX(0);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-bg);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    width: auto;
    margin-top: 10px;
}

.form-message {
    margin-top: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 600;
    display: none; /* За замовчуванням приховано */
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.map-section {
    margin-top: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.map-section h2 {
    text-align: left;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--dark-bg);
}

.map-section h2::after {
    left: 0;
    transform: translateX(0);
}

.map-section iframe {
    border-radius: var(--border-radius);
}


/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 50px 0 20px;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-family: 'Montserrat', sans-serif;
    text-align: left; /* Перевизначення для футера */
}
.footer-section h3::after { /* Приховати підкреслення в футері */
    content: none;
}

.footer-section p {
    line-height: 1.8;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--white);
    transition: color var(--transition-speed) ease;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.footer-section.contact i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 20px;
    color: #bbb;
}


/* Responsive Design */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

    .page-hero h1 {
        font-size: 3rem;
    }

    .about-us-preview .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-us-preview .about-content img {
        width: 80%;
        min-width: unset;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px; /* Adjusted to header height */
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
    }

    nav.active {
        display: flex;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    .burger-menu {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
    }
    .footer-section h3 {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-section {
        padding: 100px 0;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .page-hero h1 {
        font-size: 2.5rem;
    }

    .page-hero p {
        font-size: 1.1rem;
    }

    .dishes-grid, .categories-grid, .values-grid, .team-grid, .contact-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .cart-content .container {
        flex-direction: column;
        align-items: center;
    }
    .cart-items-grid, .cart-summary {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .dish-card h3 {
        font-size: 1.4rem;
    }
    .dish-card .price {
        font-size: 1.2rem;
    }
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    .cart-item img {
        margin-bottom: 10px;
    }
    .cart-item-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .quantity-controls {
        width: 100%;
        justify-content: center;
    }
    .remove-item-btn {
        width: 100%;
    }
}


/* Animation Examples */
/* Add to Cart button feedback */
.add-to-cart-btn.added {
    background-color: #28a745; /* Зелений */
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Form Message */
.form-message {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ефект збільшення зображення при наведенні */
.dish-card img {
    transition: transform 0.3s ease-in-out; /* Плавний перехід */
}

.dish-card img:hover {
    transform: scale(1.05); /* Збільшення зображення на 5% */
}

/* Додатково: якщо хочете трохи підняти картку при наведенні */
.dish-card {
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.dish-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Тінь */
    transform: translateY(-5px); /* Трохи підняти картку */
}