/**
 * Universal Sections Components
 * Reusable styles for all sections across the site
 */

/* === SECTION HEADERS === */
.section-header {
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-heading);
    color: var(--color-text);
    margin-bottom: 42px;
}

/* === PRODUCT SECTIONS === */
.offer-section,
.new-products-section,
.bestsellers-section {
    padding: var(--spacing-xl) 0;
}



/* === PRODUCT SLIDERS === */
.products-slider-container {
    position: relative;
}

.products-slider {
    overflow: hidden;
}

.products-track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    padding: 15px 0;
}

.products-track--center {
    justify-content: center;
}

/* === SLIDER NAVIGATION === */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
    color: var(--color-text);
}

.slider-nav:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.slider-nav:hover svg path{
    stroke: var(--color-primary);
}
.slider-nav:disabled {
    cursor: not-allowed;
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

/* === PRODUCT CARDS === */
.product-card {
    flex: 0 0 calc(25% - 15px);
    
    min-width: 250px;
    background: var(--color-primary);
    border: 1px solid rgba(160, 65, 94, 1);
    overflow: hidden;
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    flex-shrink: 0;
}

/* Product Tag Badges */
.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
    max-width: calc(100% - 50px);
}

.product-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: 4px;
    line-height: 1.3;
    white-space: nowrap;
    background: rgba(44, 0, 13, 0.75);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
}

.product-badge--natural-mohair {
    background: rgba(56, 118, 29, 0.85);
    color: #fff;
}

.product-badge--hand-prepared {
    background: rgba(180, 95, 6, 0.85);
    color: #fff;
}

.product-badge--premium-quality {
    background: rgba(160, 65, 94, 0.85);
    color: #fff;
}

.product-badge--limited-color {
    background: rgba(81, 45, 148, 0.85);
    color: #fff;
}

/* Single product badges */
.product-badges--single {
    position: static;
    max-width: none;
    margin-bottom: 8px;
}

.product-badges--single .product-badge {
    font-size: 11px;
    padding: 4px 10px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}



/* === PRODUCT INFO === */
.product-info {
    padding: var(--spacing-md);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-title {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-normal);
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 2.8em; /* Мінімальна висота для 2 рядків тексту */
    display: flex;
    align-items: flex-start;
}

.product-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.product-title a:hover {
    color: var(--color-accent);
}

.product-card-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 8px;
}

.product-card-attr {
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-text, #333);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-card-attr-label {
    font-weight: 600;
}

.product-card-attr-value {
    font-weight: 400;
}

.product-rating {
    margin-bottom: 15px;
}

.product-rating .stars {
    display: flex;
    gap: 2px;
}

/* Custom star rating */
.star-rating {
    display: flex;
    gap: 4px;
    align-items: center;
}

.star-rating .star {
    width: 20px;
    height: 20px;
}

.star-rating .star svg {
    width: 100%;
    height: 100%;
}

.star-rating .star.filled svg path {
    fill: #E98F21;
}

.star-rating .star.empty svg path {
    fill: #E5E5E5;
}

.product-price {
    font-size: 30px;
    font-weight: var(--font-weight-bold);

    margin: 0;
}

 .product-price del,
 .product-price del .woocommerce-Price-amount {
     font-size: 18px;
 }

.product-sales {
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.sales-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-normal);
}

/* === STOCK STATUS BADGE === */
.stock-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    z-index: 2;
    backdrop-filter: blur(9px);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.3);
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stock-badge.in-stock .stock-indicator {
    background-color: #22c55e; /* Зелений */
}

.stock-badge.low-stock .stock-indicator {
    background-color: #f59e0b; /* Жовтий */
}

.stock-badge.out-of-stock .stock-indicator {
    background-color: #ef4444; /* Червоний */
}

/* === PRODUCT FOOTER === */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-rating-price {
    display: flex;
    flex-direction: column;
}

/* === PRODUCT ACTIONS === */
.product-actions {
    flex-shrink: 0;
}

.add-to-cart-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.add-to-cart-btn svg path{
    fill: var(--color-primary);
}
.add-to-cart-btn:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.add-to-cart-btn:hover svg path{
    fill: var(--color-accent);
}
.add-to-cart-btn.success {
    background: #22c55e;
}

.add-to-cart-btn svg {
    width: 20px;
    height: 17px;
}

/* === CATEGORIES SECTION === */
.categories-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.category-card {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    aspect-ratio: 1 / 1;
    width: 100%;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.category-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    height: 100%;
}

.category-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 185px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
    z-index: 1;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

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

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #999;
}

.category-overlay {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    color: white;
    padding: 0 var(--spacing-md);
    text-align: left;
    z-index: 2;
}

.category-name {
    font-size: var(--font-size-lg);
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    min-height: 72px;
}

.category-name::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 10%;
    height: 2px;
    background: white;
}

.category-card:hover .category-name {
    color: var(--color-accent);
}

/* === CONTENT SECTIONS === */
.partners-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-primary);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
    align-items: center;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity:1;
    transition: opacity var(--transition-fast);
    border: 1px solid transparent;
 }

 

.partner-logo img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0);
    transition: filter var(--transition-fast);
}

.partner-logo:hover img {
    filter: grayscale(100%);
}

.seo-section {
    padding: var(--spacing-xl) 0;
}

.seo-content {
    display: block;
}

.seo-image {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.seo-image img {
    width: 100%;
    height: auto;
    
}

 
.seo-text{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}
.seo-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-heading);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    padding-top: var(--spacing-sm);
    display: inline-block;
    position: relative;
}
.seo-title::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 10%;
    height: 1px;
    width: 60%;
    background: #000;
}
.seo-description {
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .product-card {
        flex: 0 0 calc(33.333% - 13.33px);
        width: calc(33.333% - 13.33px);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
}

@media (max-width: 768px) {
    .offer-section,
    .new-products-section,
    .bestsellers-section,
    .categories-section {
        padding: var(--spacing-lg) 0;
    }
    
    .products-slider {
        margin: 0 50px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .product-card {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
        min-width: 200px;
    }
    
    .add-to-cart-btn {
        width: 40px;
        height: 40px;
    }
    
    .add-to-cart-btn svg {
        width: 18px;
        height: 15px;
    }
    
    .categories-grid {
        gap: var(--spacing-sm);
    }
    
    .category-card {
        width: auto;
        height: auto;
    }
    
    .category-name {
        font-size: var(--font-size-body);
    }
    
    .partners-section {
        padding: var(--spacing-md) 0;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .partner-logo {
        height: 60px;
    }
    
    .partner-logo img {
        max-height: 40px;
    }
    
    .seo-section {
        padding: var(--spacing-lg) 0;
    }
    
    
    .seo-image img {
        max-height: 190px;
        object-fit: contain;
    }
    
    .seo-text {
        padding: 0;
    }
    
    .seo-title {
        font-size: var(--font-size-h3);
    }
}

@media (max-width: 480px) {
    .products-slider {
        margin: 0 40px;
    }
    
    .slider-nav {
        width: 36px;
        height: 36px;
    }
    
    .product-card {
        flex: 0 0 calc(100% - 0px);
        width: calc(100% - 0px);
        min-width: auto;
    }
    
    .product-info {
        padding: var(--spacing-sm);
    }
    
    .add-to-cart-btn {
        width: 36px;
        height: 36px;
    }
    
    .add-to-cart-btn svg {
        width: 16px;
        height: 14px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs);
    }
    
    .category-overlay {
        bottom: 16px;
        padding: 0 var(--spacing-sm);
    }
    
    .category-name {
        font-size: var(--font-size-menu);
    }
    
    .category-name::before {
        top: -12px;
    }
    
 
    .partner-logo {
        height: 50px;
        padding: var(--spacing-xs);
    }
    
    .partner-logo img {
        max-height: 30px;
    }
    
    .seo-description {
        font-size: var(--font-size-menu);
    }
    
    .seo-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-menu);
    }
    .prev-btn {
    left: -4px;
}

    .next-btn {
        right: -4px;
    }
}
