:root {
    --green: #284E3D;
    --brown: #4B4037;
    --paper: #EDEDED;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

body {
    background-color: var(--green);
    color: var(--paper);
    font-family: 'Montserrat Alternates', sans-serif;
    line-height: 1.6;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== ЛОГОТИП СВЕРХУ СПРАВА ===== */
.logo-corner {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
}

.logo-small {
    width: 130px;
    height: auto;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.logo-small:hover { opacity: 1; }

/* ===== HERO С КАРУСЕЛЬЮ ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    width: 100%;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(40, 78, 61, 0.6) 0%,
        rgba(40, 78, 61, 0.75) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 750px;
    width: 90%;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: 200px !important;
    max-width: 50vw !important;
    height: auto !important;
    margin: 0 auto 25px auto !important;
    display: block;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: 3px;
    margin-bottom: 15px;
    color: var(--paper);
    text-align: center;
    word-wrap: break-word;
}

.hero-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 2px;
    opacity: 0.85;
    margin-bottom: 10px;
    text-align: center;
    color: var(--paper);
}

.divider {
    width: 60px;
    height: 2px;
    background-color: var(--brown);
    margin: 20px auto;
}

.btn {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 45px;
    background-color: var(--brown);
    color: var(--paper);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    border-radius: 8px;
}

.btn:hover {
    background-color: var(--paper);
    color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.hero-dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(237, 237, 237, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.hero-dot:hover {
    background: rgba(237, 237, 237, 0.7);
}

.hero-dot.active {
    background: var(--paper);
    border-color: var(--brown);
    transform: scale(1.2);
}

/* ===== СЕКЦИИ ===== */
.section {
    padding: 100px 20px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 2px;
    word-wrap: break-word;
}

/* ===== КАРТОЧКИ ТОВАРОВ (ИСПРАВЛЕНО) ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
    width: 100%;
}

.card-image {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 380px;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--brown);
    transition: all 0.5s ease;
    width: 100%;
    max-width: 100%;
}

.card-image:nth-child(1) { background-image: url('images/green1.png'); }
.card-image:nth-child(2) { background-image: url('images/oolong1.png'); }
.card-image:nth-child(3) { background-image: url('images/puer1.png'); }

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(40, 78, 61, 0.7) 0%,
        rgba(40, 78, 61, 0.85) 100%
    );
    z-index: 1;
    transition: all 0.4s ease;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 40px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
}

.card-image h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 2px;
    color: var(--paper);
    text-transform: uppercase;
    word-wrap: break-word;
}

.card-image p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--paper);
    opacity: 0.9;
    font-weight: 300;
}

.card-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--paper);
    cursor: pointer;
}

.card-image:hover .card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(75, 64, 55, 0.6) 0%,
        rgba(40, 78, 61, 0.9) 100%
    );
}

/* ===== КОНТАКТЫ (ИСПРАВЛЕНО) ===== */
.contacts-section {
    background-color: rgba(75, 64, 55, 0.1);
    border-top: 1px solid var(--brown);
    border-bottom: 1px solid var(--brown);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    width: 100%;
}

.contacts-info {
    padding: 20px 0;
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.contact-item {
    margin-bottom: 30px;
    width: 100%;
}

.contact-item .label {
    display: block;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brown);
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-item p {
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 600;
    color: var(--paper);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Если хочешь коричневый заголовок вместо зеленого */
.section-title {
    color: #4B4037 !important; 
}
.phone-link {
    color: var(--paper);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    transition: color 0.3s;
    border-bottom: 1px dashed var(--brown);
    word-wrap: break-word;
}

.phone-link:hover {
    color: var(--brown);
    border-bottom-color: var(--paper);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--brown);
    color: var(--paper);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: var(--brown);
    color: var(--green);
}

.contacts-map {
    width: 100%;
    max-width: 100%;
    height: 300px;
    border: 2px solid var(--brown);
    filter: grayscale(100%) invert(10%) contrast(1.1);
    transition: filter 0.3s;
    overflow: hidden;
}

.contacts-map:hover {
    filter: grayscale(0%) invert(0%);
}

.contacts-map iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

/* ===== ФУТЕР ===== */
.footer {
    text-align: center;
    padding: 60px 20px 40px;
    width: 100%;
}

.footer p {
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* ===== АНИМАЦИИ ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, var(--green) 0%, #1a3a2f 100%);
    border: 2px solid var(--brown);
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    animation: slideUpScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-back {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(75, 64, 55, 0.9);
    color: var(--paper);
    border: 1px solid rgba(237, 237, 237, 0.2);
    padding: 12px 24px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 10;
    border-radius: 10px;
    transition: all 0.3s;
}

.modal-back:hover {
    background: var(--paper);
    color: var(--green);
    transform: translateY(-2px);
}

.carousel {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: var(--brown);
    border-radius: 18px 18px 0 0;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(237, 237, 237, 0.15);
    color: var(--paper);
    border: 1px solid rgba(237, 237, 237, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(237, 237, 237, 0.9);
    color: var(--green);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(237, 237, 237, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.dot.active {
    background: var(--paper);
    border-color: var(--brown);
    transform: scale(1.3);
}

.modal-info {
    padding: 40px 35px;
    text-align: center;
}

.modal-info h2 {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: var(--paper);
    text-transform: uppercase;
}

.modal-info p {
    font-size: 1.1rem;
    line-height: 1.9;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 30px;
    color: var(--paper);
}

.modal-price {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--brown) 0%, #5a4a3a 100%);
    color: var(--paper);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 12px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================ */

/* Планшеты */
@media (max-width: 768px) {
    .logo-corner { top: 20px; right: 20px; }
    .logo-small { width: 100px; }
    
    .hero-logo { width: 160px !important; }
    .hero-title { font-size: 1.6rem; letter-spacing: 2px; }
    .hero-subtitle { font-size: 0.85rem; }
    .btn { padding: 12px 35px; font-size: 0.8rem; }
    .hero-dots { bottom: 50px; }
    
    .section { padding: 60px 15px; }
    .section-title { font-size: 1.5rem; }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-image { min-height: 320px; }
    .card-content { padding: 25px 20px; }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .contacts-info { order: 1; }
    .contacts-map { 
        order: 2; 
        height: 250px;
        width: 100%;
    }
    
    .carousel { height: 300px; }
    .carousel-btn { width: 40px; height: 40px; font-size: 1.2rem; }
    .carousel-btn.prev { left: 15px; }
    .carousel-btn.next { right: 15px; }
    
    .modal-content { width: 95%; border-radius: 15px; }
    .modal-info { padding: 30px 20px; }
    .modal-info h2 { font-size: 1.6rem; }
    .modal-info p { font-size: 0.95rem; }
    .modal-price { font-size: 1.1rem; padding: 12px 30px; }
    .modal-back { top: 15px; left: 15px; padding: 10px 18px; font-size: 0.8rem; }
}

/* Большие телефоны */
@media (max-width: 480px) {
    .hero { min-height: 85vh; }
    
    .logo-corner { top: 15px; right: 15px; }
    .logo-small { width: 85px; }
    
    .hero-logo { 
        width: 140px !important; 
        margin-bottom: 20px !important; 
    }
    
    .hero-title { 
        font-size: 1.3rem; 
        letter-spacing: 1.5px; 
        margin-bottom: 10px; 
    }
    
    .hero-subtitle { 
        font-size: 0.75rem; 
        letter-spacing: 1px; 
    }
    
    .divider { width: 50px; margin: 15px auto; }
    
    .btn { 
        padding: 10px 28px; 
        font-size: 0.75rem; 
        margin-top: 20px; 
    }
    
    .hero-dots { 
        bottom: 40px; 
        gap: 10px; 
    }
    
    .hero-dot { width: 10px; height: 10px; }
    
    .section { padding: 50px 12px; }
    .section-title { 
        font-size: 1.3rem; 
        margin-bottom: 30px;
        letter-spacing: 1px;
    }
    
    .content-grid { gap: 15px; }
    .card-image { min-height: 280px; }
    .card-content { padding: 20px 15px; }
    .card-image h3 { font-size: 1.2rem; }
    .card-image p { font-size: 0.85rem; }
    
    .contact-item .label { font-size: 0.95rem; }
    .contact-item p { font-size: 1rem; }
    .phone-link { font-size: 1.1rem; }
    
    .social-links { 
        flex-direction: column; 
        gap: 10px; 
    }
    
    .social-btn { 
        text-align: center; 
        padding: 12px 20px; 
    }
    
    .contacts-map { height: 220px; }
}

/* Маленькие телефоны */
@media (max-width: 360px) {
    .hero-logo { 
        width: 120px !important; 
    }
    
    .hero-title { 
        font-size: 1.1rem; 
        letter-spacing: 1px; 
    }
    
    .hero-subtitle { 
        font-size: 0.7rem; 
    }
    
    .btn { 
        padding: 8px 22px; 
        font-size: 0.7rem; 
    }
    
    .hero-dots { bottom: 35px; }
    
    .section { padding: 40px 10px; }
    .section-title { 
        font-size: 1.1rem; 
        letter-spacing: 0.5px;
    }
    
    .card-image { min-height: 260px; }
    .card-content { padding: 15px 12px; }
    .card-image h3 { font-size: 1.1rem; }
    .card-image p { font-size: 0.8rem; }
    
    .contact-item .label { font-size: 0.85rem; }
    .contact-item p { font-size: 0.9rem; }
    .phone-link { font-size: 1rem; }
    
    .contacts-map { height: 200px; }
    
    .modal-info h2 { font-size: 1.3rem; }
    .modal-info p { font-size: 0.85rem; }
    .modal-price { font-size: 1rem; padding: 10px 25px; }
}
/* Стили для картинки внутри карточки */
.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Чтобы картинка заполняла весь блок */
    z-index: 0; /* Ставим назад */
}

/* Поднимаем текст и затемнение поверх картинки */
.card-overlay, .card-content {
    position: relative;
    z-index: 1;
}
/* Очень маленькие экраны */
@media (max-width: 320px) {
    .hero-logo { width: 100px !important; }
    .hero-title { font-size: 1rem; }
    .hero-subtitle { font-size: 0.65rem; }
    .btn { padding: 7px 18px; font-size: 0.65rem; }
    
    .section { padding: 30px 8px; }
    .section-title { font-size: 1rem; }
    
    .card-image { min-height: 240px; }
    .card-image h3 { font-size: 1rem; }
}
* {
    font-family: 'Montserrat Alternates', sans-serif !important;
}
/* Убираем зеленую полосу и делаем текст видимым */
.card {
    border: none !important;
    border-top: none !important;
    position: relative;
    overflow: hidden;
}

/* Убираем зеленый overlay */
.card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%) !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Текст поверх фото */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px;
    color: white;
    z-index: 2;
    text-align: center;
}

.card-content h3 {
    color: white !important;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.card-content p {
    color: white !important;
    font-size: 14px;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Картинка на фоне */
.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
