/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Amiri', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5px;
}

/* Header */
header {
    background: linear-gradient(135deg, #006400, #004d00);
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: 3px;
    padding-bottom: 3px;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #D4AF37;
    text-decoration: none;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: #D4AF37;
}
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #006400;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.mobile-nav.active {
    display: flex;
}
.mobile-nav li {
    margin: 0.5rem 0;
}
.mobile-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: color 0.3s;
}
.mobile-nav a:hover {
    color: #D4AF37;
}

/* Hero Section */
.hero {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="geom" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="%23D4AF37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23geom)"/></svg>') no-repeat center/cover;
    background-color: #006400;
    color: white;
    text-align: center;
    padding: 150px 0 100px;
    margin-top: 55px;
    margin-bottom: 5px; /* Большой отступ снизу */
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .hero {
        padding: 55px 0 50px;
        margin-top: 5px;
    }
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    .hero p {
        font-size: 1rem;
        max-width: 90%;
    }
}

/* Sections для категорий */
.sections {
    padding: 0px 0;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}
.modal-content {
    position: relative;
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}
#modalImage {
    width: 100%;
    height: auto;
    border-radius: 10px;
}
.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: #D4AF37;
}
.nav-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.nav-arrows button {
    pointer-events: all;
    background: rgba(212, 175, 55, 0.5);
    color: white;
    border: none;
    font-size: 14px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}
.nav-arrows button:hover {
    background: #D4AF37;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    .thumbnails {
        gap: 0.3rem;
    }
    .thumb {
        width: 50px;
        height: 35px;
    }
}

/* Анимация hamburger */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Стили для соцсетей в мобильном меню */
.social-row {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    list-style: none;
}
.social-row a {
    font-size: 1.8rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: transform 0.3s, color 0.3s;
    text-decoration: none;
    color: white;
}
.social-row a:hover {
    transform: scale(1.2);
    color: #D4AF37 !important;
}

/* Стили для product-detail */
.product-detail {
    padding: 80px 0;
}
.back-btn {
    display: inline-block;
    color: #006400;
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: bold;
}
.back-btn:hover {
    color: #004d00;
}
.detail-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}
.gallery-section {
    flex: 1;
}
.main-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}
.info-section {
    flex: 1;
}
.features-list {
    list-style: none;
    margin: 1.5rem 0;
    padding-left: 0;
}
.features-list li {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    color: #333;
}
#buyNowBtn {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}
@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
    }
    .main-detail-image {
        height: 250px;
    }
}

/* Footer */
footer {
    background: #006400;
    color: white;
    text-align: center;
    padding: 2rem 0;
}
footer a {
    color: #D4AF37;
    text-decoration: none;
}

/* Модалка формы заказа */
#orderModal {
    display: none;
    position: fixed;
    z-index: 2004;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}
.order-form-content {
    background: white;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}
#orderForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#orderForm label {
    font-weight: bold;
    color: #006400;
    text-align: left;
}
#orderForm input, #orderForm select {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.submit-btn {
    background: #006400;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}
.submit-btn:hover {
    background: #004d00;
}
#orderTitle {
    color: #006400;
    text-align: center;
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .order-form-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
        top: 0;
        transform: none;
        margin-top: 5%;
    }
    #orderForm {
        gap: 0.8rem;
    }
    #orderForm input, #orderForm select {
        padding: 0.7rem;
    }
}

/* Стили для формы контактов */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#contactForm label {
    font-weight: bold;
    color: #006400;
    text-align: left;
    margin-bottom: 0.5rem;
}
#contactForm input, #contactForm textarea, #contactForm select {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Amiri', serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}
#contactForm input:focus, #contactForm textarea:focus, #contactForm select:focus {
    border-color: #006400;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 100, 0, 0.3);
}
#contactForm textarea {
    resize: vertical;
    min-height: 100px;
}
#contactForm button[type="submit"] {
    background: #006400;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}
#contactForm button[type="submit"]:hover {
    background: #004d00;
}
@media (max-width: 768px) {
    #contactForm input, #contactForm textarea, #contactForm select {
        padding: 0.7rem;
        font-size: 1rem;
    }
    #contactForm button[type="submit"] {
        padding: 0.9rem;
    }
}

/* Модалка подтверждения */
#confirmModal {
    display: none;
    position: fixed;
    z-index: 2002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}
.confirm-content {
    background: white;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%) !important;
    box-sizing: border-box;
    text-align: center;
}
#confirmModal h2 {
    color: #006400;
    margin-bottom: 1rem;
}
#confirmModal p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}
.confirm-btn {
    background: #D4AF37;
    color: #006400;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}
.confirm-btn:hover {
    background: #b8942f;
}
@media (max-width: 768px) {
    .confirm-content {
        width: 90%;
        padding: 1.5rem;
        max-height: 85vh;
        top: 40%;
        transform: translateY(-40%) !important;
    }
}

/* Иконка корзины */
.cart-icon {
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    color: white;
}
#cartCount {
    background: #D4AF37;
    color: #006400;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    text-align: center;
}

/* Модалка корзины */
#cartModal {
    display: none;
    position: fixed;
    z-index: 2003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}
.cart-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}
.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}
.cart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cart-controls button {
    background: #006400;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
    cursor: pointer;
}
.remove-btn {
    background: #D4AF37;
    color: #006400;
}
.total {
    font-weight: bold;
    text-align: right;
    margin-top: 1rem;
    color: #006400;
}
.empty-cart {
    text-align: center;
    color: #666;
    padding: 2rem;
}
@media (max-width: 768px) {
    .cart-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Две кнопки в карточке/деталях */
.buttons-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}
.cart-btn {
    background: #D4AF37;
    color: #006400;
}
.order-btn {
    background: #006400;
    color: white;
}
.buttons-row button:hover {
    opacity: 0.8;
}
@media (max-width: 768px) {
    .buttons-row {
        flex-direction: column;
    }
}

/* Toast уведомления */
#toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #006400;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-family: 'Amiri', serif;
}

/* Модалка успеха контактов */
#contactSuccessModal .confirm-content h2 {
    color: #006400;
}
#contactSuccessModal .confirm-content p {
    color: #666;
}

/* Защита от Google Translate */
.notranslate {
}

/* Страны доставки в карточках и деталях */
.shipping-countries {
    font-size: 1rem;
    color: #666;
    margin: 0.5rem 0;
    font-family: 'Amiri', serif;
    text-align: center;
}
.info-section .shipping-countries {
    text-align: left;
    color: #006400;
}

/* Фильтры категорий */
.category-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.category-btn {
    background: #f8f9fa;
    color: #006400;
    border: 1px solid #006400;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Amiri', serif;
    font-size: 1rem;
    transition: background 0.3s;
}
.category-btn.active, .category-btn:hover {
    background: #006400;
    color: white;
}
@media (max-width: 768px) {
    .category-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Сетка карточек */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr; /* По умолчанию 1 колонка */
    gap: 10px;
    padding: 0px;
}
.section-card {
    width: 100%;
    max-width: 200px; /* Ограничивает максимальную ширину */
    padding: 0px;
    margin: 0px;
}
@media (min-width: 576px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 карточки в ряд */
    }
}
@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 карточки в ряд */
    }
}
@media (min-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 карточки в ряд */
    }
}
.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}
.section-card .gallery {
    width: 100%;
    max-width: 250px;
    margin: 0 auto 1rem;
}
.section-card .gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    display: block;
}

.section-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}
.section-card .price {
display: none
    font-size: 1rem;
    font-weight: bold;
    color: #D4AF37;
    margin: 0.0rem 0;
}
.section-card .country, .section-card .shipping-countries {
    font-size: 1rem;
    color: #666;
    margin: 0.5rem 0;
}
.section-card .buttons-row {
    display: none; /* Кнопки убраны, так как они теперь только в product-detail */
}
.section-card h3 a {
      text-decoration: none;
      color: inherit;
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0; /* Убери лишние отступы */
      padding: 0; /* Убери лишние внутренние отступы */
}
.section-card h3 {
    margin-bottom: 0,0rem; /* Отступ снизу названия */
}
.section-card h3 a:hover {
    color: #D4AF37;
}

/* Галарея на странице деталей */
.product-gallery {
    margin-bottom: 1rem;
}
.thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.thumbnails .thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}
.thumbnails .thumb.active, .thumbnails .thumb:hover {
    border-color: #D4AF37;
}

/* Медиа-запросы для мобильных */
@media (max-width: 576px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 карточки в ряд на очень маленьких экранах */
        gap: 5px;
        padding: 0px;
    }
    .section-card .gallery img {
        height: 150px;
    }
    .section-card h3 a {
        font-size: 14px; /* Уменьши размер текста */
    }

}
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 3 карточки в ряд */
        gap: 5px;
        padding: 0px;
    }
    .section-card h3 a {
        font-size: 14px; /* Уменьши размер текста */
    }

    .section-card .gallery img {
        height: 180px;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero {
        margin-top: 50px;
        padding: 120px 0 80px;
    }
    .buttons-row {
        flex-direction: column;
    }
    .category-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    .search-container {
        max-width: 200px;
        margin: 0 0.5rem;
    }
    .search-bar {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Стили для поиска */
.search-container {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 1rem;
    position: relative; /* Для выравнивания, если нужно */
}

.search-wrapper {
    display: flex; /* Объединяем поле и кнопку в строку */
    width: 100%;
    border: 1px solid #D4AF37; /* Общая граница для блока */
    border-radius: 5px; /* Скругление всего блока */
    overflow: hidden; /* Убираем выступающие элементы */
}

.search-bar {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none; /* Убираем отдельную границу поля */
    border-radius: 0; /* Убираем скругление поля */
    font-family: 'Amiri', serif;
    font-size: 1rem;
    background-color: #f8f9fa;
    color: #333;
    outline: none; /* Убираем обводку при фокусе */
    transition: background-color 0.3s;
}
.search-bar:focus {
    background-color: #fff; /* Лёгкое изменение фона при фокусе */
}

.search-btn {
    background: #D4AF37; /* Цвет кнопки */
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0 5px 5px 0; /* Скругление только правого угла */
    transition: background 0.3s;
}
.search-btn:hover {
    background: #b38f2e;
}

@media (max-width: 768px) {
    .search-container {
        max-width: 200px;
        margin: 0 0.5rem;
    }
    .search-bar {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    .search-btn {
        padding: 0.4rem 0.8rem;
    }
}/* Рекомендации */
.recommendations {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}
.recommendations h4 {
    font-size: 1.2rem;
    color: #006400;
    margin-bottom: 1rem;
    font-family: 'Amiri', serif;
}
.recommendations-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}
.rec-card {
    min-width: 120px;
    background: white;
    border-radius: 5px;
    padding: 0.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.rec-gallery {
    width: 100%;
    height: 100px;
    margin-bottom: 0.5rem;
}
.rec-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}
.rec-card h5 {
    font-size: 1rem;
    margin: 0.2rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rec-card h5 a {
    text-decoration: none;
    color: #333;
}
.rec-card h5 a:hover {
    color: #D4AF37;
}
.rec-price {
    font-size: 1rem;
    color: #D4AF37;
}
.recommendations-grid p {
    font-size: 1rem;
    color: #666;
    padding: 0.5rem;
}
@media (max-width: 768px) {
    .recommendations {
        margin-top: 1.5rem;
        padding: 0.8rem;
    }
    .recommendations-grid {
        gap: 0.8rem;
        padding-bottom: 0.3rem;
    }
    .rec-card {
        min-width: 100px;
    }
    .rec-gallery {
        height: 80px;
    }
    .rec-card h5 {
        font-size: 0.9rem;
    }
    .rec-price {
        font-size: 0.9rem;
    }
}

/* Секция результатов */
.search-results {
    padding-top: 80px;
    min-height: 100vh;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#searchResults.cards-grid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 5px;
    padding: 0px;
}

.section-card {
    width: 100%;
