* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

:root {
    --primary-color: #f8e1c7;
    --secondary-color: #7b3f00;
    --accent-color: #e67e22;
    --light-color: #fff9f0;
    --dark-color: #3c2a1e;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    transition: opacity 0.5s ease-in-out;
}

.page-transition {
    opacity: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone {
    font-weight: bold;
    color: var(--secondary-color);
    white-space: nowrap;
}

.logo {
    text-align: center;
    flex-grow: 1;
}

.logo h1 {
    color: var(--secondary-color);
    font-size: 24px;
    margin: 0;
    padding-right: 50px;
    font-family: 'Brittany Signature', sans-serif;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 20px;
}

nav ul li:first-child {
    margin-left: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent-color);
}

.cart-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
}



/* Главный блок */
.hero {
    position: relative;
    height: 80vh;
    background: url('./img/banner-2.png') no-repeat center center/cover;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #d35400;
    transform: translateY(-3px);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
    font-size: 2rem;
}

.products {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 220px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-description-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* чтобы клики шли сквозь */
}
.product-image:hover .product-description-overlay {
    opacity: 1;
}
.product-description-overlay.show {
    display: flex;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
    flex-grow: 1;
}

.product-price {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.quantity-btn:hover {
    background-color: #e9cfad;
}

.quantity-input {
    width: 45px;
    text-align: center;
    margin: 0 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    font-weight: bold;
}

.add-to-cart {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #d35400;
}

/* Корзина */
.cart-section {
    padding: 60px 0;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.cart-item-info {
    flex-grow: 1;
    padding-right: 30px;
    display: flex;
    align-items: center;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--secondary-color);
}

.cart-item-total {
    font-weight: bold;
    color: var(--secondary-color);
    padding-right: 70px;
}

.remove-item {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ff3b30;
    font-size: 1.2rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.remove-item:hover {
    background-color: rgba(255, 59, 48, 0.1);
}

.cart-total {
    text-align: right;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.checkout-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
    font-size: 1.1rem;
}

.checkout-btn:hover {
    background: #128C7E;
}

.empty-cart-message {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-style: italic;
}

/* Футер */
footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Социальные кнопки */
.social-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-buttons a {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.social-buttons a img {
    width: 40px;
    height: 40px;
}

.social-buttons a:hover {
    transform: scale(1.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-left, .header-right, .logo {
        width: auto;
    }
    
    .header-content {
        flex-wrap: wrap;
    }

    .header-left {
        order: 1;
        justify-content: flex-start;
    }

    .logo {
        order: 2;
        width: 50%;
        text-align: center;
    }

    .header-right {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .menu-toggle {
        display: block;
        margin-right: 15px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-info {
        padding-right: 0;
        margin-bottom: 10px;
    }
    
    .remove-item {
        position: static;
        transform: none;
        margin-top: 10px;
        align-self: flex-end;
    }
}