/* === Блок "Товар дня" === */
body {
    background: #141414;
}

.day-offer {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

.day-offer-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.day-offer-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 20px;
}

.day-offer-category {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.day-offer-title {
    font-size: 2.0rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.day-offer-description {
    color: #b0b0b0;
    line-height: 1.7;
    margin-bottom: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 16px;
}

.day-offer-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 25px;
}

.buy-button {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
}

.buy-button:hover {
    transform: translateY(-3px);
}

.day-offer-href {
    text-decoration: none;
}

.day-offer-image {
    width: 100%;
/*    height: 350px;*/
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.day-offer-image:hover {
    border-color: #ffd700;
    transform: scale(1.02);
}

.day-offer-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 25px;
    transition: transform 0.3s ease;
}

.day-offer-image:hover img {
    transform: scale(1.05);
}

/* === Блок "Популярные товары" === */
.products-section {
    padding: 60px 5%;
    background: #fff;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    position: relative;
}

/* сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 0 auto;
}

/* карточка товара */
.product-card {
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* контейнер для изображения */
.product-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 4:3 aspect ratio */
/*    background: #1a1a1a;*/
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: #f5f3f1;
}

/* контент карточки */
.product-content {
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 15px;
}

.product-category {
    font-size: 12px;
    color: #000;
    text-transform: uppercase;
    padding: 0 5px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    color: #262626;
    padding: 0 5px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 0 5px;
}

.price-amount {
    font-size: 22px;
/*    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);*/
}

.cart-icon {
    width: 22px;
    height: 22px;
    fill: #ffd700;
    transition: transform 0.3s ease;
}

.product-card:hover .cart-icon {
    transform: scale(1.2);
}

/* адаптив */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .day-offer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .day-offer-image {
        height: 300px;
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 5%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .day-offer {
        margin: 40px 5%;
        padding: 30px;
        gap: 0;
    }

    .day-offer .day_robot {
        display: none;
    }

    .day-offer-image img {
        padding: 0;
    }
    
    .day-offer-title {
        font-size: 2rem;
    }
    
    .products-section {
        padding: 60px 5%;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .day-offer {
        margin: 30px 4%;
        padding: 25px;
    }
    
    .day-offer-title {
        font-size: 1.5rem;
    }
    
    .day-offer-image {
        height: 250px;
    }
    
    .buy-button {
        padding: 15px 25px;
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-content {
        padding: 20px;
    }
}

.contact-block {
    width: 100%;
    background: #fff;
    padding: 40px 0 0 0;
}

.contact-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.contact-map {
    flex: 1 1 55%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
}

.contact-info {
    flex: 1 1 45%;
}

.contact-info h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 25px;
}

.contact-row {
    margin-bottom: 25px;
}

.contact-row h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-row p {
    font-size: 16px;
    margin: 0;
}

.contact-row a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.contact-row a:hover {
    text-decoration: underline;
}

/* Мобильная версия */
@media (max-width: 900px) {
    .contact-container {
        flex-direction: column;
    }
    .contact-map {
        width: 100%;
        height: 340px;
    }
}

/* Фикс фона блока */
.contact-block {
    background: #fff !important;
    color: #000 !important;
}

/* Контейнер карты — принудительно белый фон и высота */
.contact-map {
    background: #e8e8e8;
    min-height: 450px;
    height: 450px !important;
    display: block !important;
}

/* =====================================
   ГЛАВНАЯ — ПОПУЛЯРНЫЕ ТОВАРЫ
   2 ТОВАРА В РЯД (МОБИЛКА)
===================================== */

@media (max-width: 768px) {

    /* Контейнер слайдера */
    .common-home .swiper-wrapper {
        display: flex;
        flex-wrap: wrap;
    }

    /* Каждый товар */
    .common-home .swiper-slide {
        width: 50% !important;
        max-width: 50% !important;
        box-sizing: border-box;
        padding: 6px;
        height: auto !important;
    }

    /* Карточка товара */
    .common-home .product-thumb {
        height: 100%;
    }

    /* Картинка */
    .common-home .product-thumb img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* Название — максимум 2 строки */
    .common-home .product-thumb h4,
    .common-home .product-thumb .name {
        font-size: 14px;
        line-height: 1.2;
        max-height: 2.4em;
        overflow: hidden;
    }

    /* Цена */
    .common-home .price {
        font-size: 15px;
        white-space: nowrap;
    }
}

/* Главная — Популярные товары: 2 карточки в ряд на мобилке */
@media (max-width: 768px) {
  #common-home .products-grid{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  #common-home .products-grid .product-card{
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #common-home .products-grid .product-image img{
    width: 100%;
    height: auto;
    display: block;
  }
}
