/* Homepage Specific Styles */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

/* Поднимаем контент главной выше */
.main-content {
    padding-top: 10px;
    background: transparent;
}

/* Hero Slider */
.hero-slider-section {
    padding: 8px 0 20px;
}

.slider-container {
    position: relative;
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #dfe7f3 0%, #cfdced 100%);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 64px;
    box-sizing: border-box;
    position: relative;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(100deg, rgba(11, 19, 33, 0.58) 0%, rgba(16, 25, 39, 0.26) 48%, rgba(16, 25, 39, 0.06) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 430px;
    margin-left: 52px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 20px 22px;
}

.slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

.slide-content h1 {
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.18;
    text-shadow: 0 3px 12px rgba(0,0,0,0.35);
    letter-spacing: -0.4px;
}

.slide-content p {
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.4;
    color: rgba(255,255,255,0.92);
    font-weight: 500;
    text-shadow: 0 1px 8px rgba(0,0,0,0.28);
}

.hero-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 11px;
    font-size: 12px;
    font-weight: 800;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.hero-btn:hover {
    background: var(--accent-hover);
    color: var(--white);
    transform: scale(1.03);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(15px);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.5);
    cursor: pointer;
}

.slider-nav:hover {
    background: #ffffff;
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.16);
}

.slider-nav.prev { left: 24px; }
.slider-nav.next { right: 24px; }

body.modal-open {
    overflow: hidden;
}

body.modal-open .slider-nav,
body.modal-open .slider-dots {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
    background: rgba(255,255,255,0.65);
    padding: 8px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.45);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(45, 61, 84, 0.35);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    width: 22px;
    border-radius: 10px;
}

/* Advantages Section */
.advantages {
    padding: 10px 0 30px;
    background: transparent;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.advantage-item {
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    background: #ffffff;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.advantage-item:hover {
    transform: translateY(-5px);
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.advantage-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.advantage-item h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.advantage-item p {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Categories Section */
.home-categories {
    padding: 10px 0 30px;
    background: transparent;
}

.section-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 15px;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 3px;
}

.text-center { text-align: center; }
.text-center .section-title::after { left: 50%; transform: translateX(-50%); }

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    position: relative;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    transition: var(--transition);
}

.category-overlay h3 {
    color: var(--white);
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.category-card:hover img {
    transform: scale(1.06);
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(63, 111, 148, 0.9) 0%, transparent 100%);
}

.category-card:hover h3 {
    transform: translateY(0);
}

/* Product Tabs */
.product-tabs-section {
    padding: 10px 0 30px;
    background: transparent;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: none;
}

.tab-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 800;
    color: #3d4a57;
    position: relative;
    transition: var(--transition);
    background: #e8edf3;
    border-radius: 16px;
    border: 1px solid #c5d0db;
    cursor: pointer;
    font-family: inherit;
}

.tab-btn:hover:not(.active) {
    color: #1e293b;
    background: #dce5ef;
    border-color: #9aafc2;
}

.tab-btn.active {
    color: var(--white);
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(63, 111, 148, 0.14);
}

.tab-btn.active::after {
    display: none;
}

.tab-content .products-grid {
    transition: opacity 0.2s ease;
}

.tab-content .products-grid.tab-products-fading {
    opacity: 0.35;
}

/* Promotions Section */
.home-promotions {
    padding: 10px 0 40px;
    background: transparent;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 26px;
    font-weight: 900;
    color: var(--secondary-color);
    margin: 0;
}

.view-all-link {
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all-link:hover {
    color: var(--secondary-color);
    transform: translateX(3px);
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.promo-mini-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    min-height: 180px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.promo-mini-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.promo-mini-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 5px 15px rgba(196, 95, 95, 0.2);
}

.promo-mini-content h3 {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
    max-width: 85%;
    color: var(--secondary-color);
}

.promo-mini-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
}

.promo-mini-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e0e4e9;
}

.promo-date {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-mini-link {
    font-weight: 800;
    font-size: 14px;
    color: var(--secondary-color);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .promo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .slider-container { height: 340px; border-radius: 16px; margin: 0; width: 100%; }
    .slide { padding: 0 16px; align-items: flex-end; }
    .slide::before { background: linear-gradient(180deg, rgba(8,14,24,0.05) 0%, rgba(10,18,32,0.52) 64%, rgba(10,18,32,0.78) 100%); }
    .slide-content { transform: translateY(12px); text-align: left; max-width: min(92%, 360px); margin-left: 0; margin-bottom: 40px; background: rgba(255,255,255,0.16); padding: 16px; border-radius: 14px; }
    .slide-content h1 { font-size: 24px; margin-bottom: 8px; line-height: 1.2; }
    .slide-content p { font-size: 14px; margin-bottom: 16px; line-height: 1.4; }
    .hero-btn { padding: 12px 18px; font-size: 14px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
    .slider-nav { display: none; }
    .slider-dots { bottom: 12px; padding: 6px 12px; }
    .dot { width: 8px; height: 8px; }
    .dot.active { width: 20px; }

    .advantages { padding: 10px 0 20px; }
    .advantages-grid { gap: 12px; grid-template-columns: repeat(2, 1fr); }
    .advantage-item { padding: 18px 14px; border-radius: 16px; }
    .advantage-icon { font-size: 28px; margin-bottom: 8px; }
    .advantage-item h3 { font-size: 15px; margin-bottom: 6px; }
    .advantage-item p { font-size: 13px; line-height: 1.4; }

    .home-categories { padding: 10px 0 20px; }
    .section-title { font-size: 24px; margin-bottom: 20px; }
    .category-grid { gap: 15px; grid-template-columns: repeat(2, 1fr); }
    .category-card { height: 180px; border-radius: 16px; }
    .category-overlay { padding: 15px; }
    .category-overlay h3 { font-size: 16px; transform: none; }

    .product-tabs-section { padding: 10px 0 20px; }
    .tabs-header { gap: 15px; overflow-x: auto; justify-content: flex-start; padding-bottom: 10px; margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
    .tab-btn { font-size: 14px; white-space: nowrap; padding: 10px 16px; min-height: 40px; }

    .home-promotions { padding: 10px 0 20px; }
    .section-header-flex { margin-bottom: 20px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-subtitle { font-size: 20px; }
    .promo-grid { grid-template-columns: 1fr; gap: 15px; }
    .promo-mini-card { padding: 20px; min-height: 180px; border-radius: 16px; }
    .promo-mini-content h3 { font-size: 18px; max-width: 100%; margin-bottom: 10px; }
    .promo-mini-desc { font-size: 13px; line-height: 1.4; }
    .promo-mini-badge { top: 15px; right: 15px; font-size: 11px; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .slider-container { height: 300px; }
    .slide-content { max-width: 100%; margin-left: 0; padding: 14px; }
    .slide-content h1 { font-size: 20px; margin-bottom: 6px; }
    .slide-content p { font-size: 13px; margin-bottom: 12px; }
    .hero-btn { font-size: 13px; padding: 12px 16px; }
    .section-title { font-size: 22px; margin-bottom: 20px; }
    .category-grid { grid-template-columns: 1fr; gap: 12px; }
    .category-card { height: 180px; }
    .advantages-grid { grid-template-columns: 1fr; gap: 10px; }
    .advantage-item { padding: 16px 14px; border-radius: 12px; }
    .advantage-icon { font-size: 24px; margin-bottom: 6px; }
    .advantage-item h3 { font-size: 15px; margin-bottom: 4px; }
    .advantage-item p { font-size: 13px; line-height: 1.35; }
    .promo-grid { gap: 12px; }
}
