/* Products Section */
.products-section {
    padding: 36px 0 56px 0;
    background-color: #F8FAFC;
}

.products-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
    position: relative;
}

.products-section .section-header::after {
    content: '';
    position: absolute;
    bottom: -0.5px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    border-radius: 2px;
}

.products-section .section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
    letter-spacing: -0.02em;
}

.products-section .view-all {
    font-size: 13px;
    font-weight: 600;
    color: #13618C;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.products-section .view-all:hover {
    color: #297B35;
}

.products-section .view-all span {
    margin-left: 4px;
}

.products-section .arrow-right {
    margin-left: 6px;
    height: 10px;
    object-fit: contain;
}

/* Products Grid */
.products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0;
    margin-top: 20px;
}

/* Product Card - Using reusable styles from product-card component */
.products-section .product-card {
    flex: 0 0 auto;
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 1px solid #F1F5F9;
}

.products-section .product-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

.products-section .product-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.products-section .product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.products-section .discount-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(to right, #288CCB, #49A644);
    color: #fff;
    padding: 5px 11px;
    border-radius: 10px 0 10px 0;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    letter-spacing: 0.2px;
}

.products-section .product-slider {
    position: relative;
}

.products-section .slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-section .slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.products-section .slider-image.active {
    opacity: 1;
    z-index: 5;
}

.products-section .slider-dots {
    position: absolute;
    bottom: 10px;
    left: 30px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.products-section .slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #CBD5E1;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.products-section .slider-dots .dot.active {
    background-color: #13618C;
}

.products-section .product-info {
    padding: 14px 16px;
    position: relative;
    border-top: 1px solid #F1F5F9;
}

.products-section .product-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 5px;
    line-height: 1.4;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-section .product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.products-section .stars {
    display: flex;
    gap: 2px;
}

.products-section .star {
    font-size: 2vh;
    color: #F59E0B;
}

.products-section .star.empty {
    color: #E5E7EB;
}

.products-section .review-count {
    font-size: 11px;
    color: #94A3B8;
}

.products-section .product-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 5px;
}

.products-section .original-price {
    font-size: 14px;
    font-weight: 500;
    color: #667085;
    text-decoration: line-through;
}

.products-section .sale-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: #13618C;
}

.products-section .sale-price .currency {
    font-size: 20px;
    font-weight: 500;
}

.products-section .sale-price .price-amount {
    font-size: 25px;
    font-weight: 700;
}

.products-section .add-to-cart {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #13618C 0%, #297B35 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(19, 97, 140, 0.25);
}

.products-section .add-to-cart:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(19, 97, 140, 0.35);
}

.products-section .add-to-cart.loading,
.products-section .add-to-cart.success {
    pointer-events: none;
}

.products-section .add-to-cart .btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: home-cart-spin 0.8s linear infinite;
}

.products-section .add-to-cart.success {
    background-color: #1f7a3e;
    border-color: #1f7a3e;
}

.products-section .add-to-cart .btn-check {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.products-section .add-to-cart img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Loading skeleton */
.products-section .skeleton-card {
    pointer-events: none;
}

.products-section .skeleton-box,
.products-section .skeleton-line {
    background: linear-gradient(90deg, #e4e7ec 25%, #f2f4f7 37%, #e4e7ec 63%);
    background-size: 400% 100%;
    animation: home-skeleton-shimmer 1.2s ease-in-out infinite;
}

.products-section .skeleton-box {
    width: 100%;
    height: 200px;
}

.products-section .skeleton-line {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.products-section .skeleton-title {
    width: 85%;
    height: 16px;
}

.products-section .skeleton-subtitle {
    width: 55%;
}

.products-section .skeleton-price {
    width: 40%;
    height: 14px;
    margin-top: 16px;
}

@keyframes home-skeleton-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes home-cart-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.products-section .add-to-cart:hover img {
    filter: brightness(0) invert(1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-section .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 0 40px;
    }

    .products-section .section-header {
        padding: 0 40px;
    }
}

@media (max-width: 992px) {
    .products-section .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 0 30px;
    }

    .products-section .section-header {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding: 30px 0;
    }

    .products-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px;
    }

    .products-section .section-header {
        padding: 0 16px 14px 16px;
        margin-bottom: 24px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .products-section .section-header h2 {
        font-size: 22px;
    }

    .products-section .product-image {
        height: 200px;
    }

    .products-section .product-info {
        padding: 12px;
    }

    .products-section .product-info h3 {
        font-size: 12px;
        min-height: 24px;
    }

    .products-section .sale-price .currency {
        font-size: 14px;
    }

    .products-section .sale-price .price-amount {
        font-size: 18px;
    }

    .products-section .original-price {
        font-size: 12px;
    }

    .products-section .add-to-cart {
        width: 34px;
        height: 34px;
        bottom: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .products-section {
        padding: 20px 0;
    }

    .products-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 12px;
    }

    .products-section .section-header {
        padding: 0 12px 12px 12px;
        margin-bottom: 18px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .products-section .section-header h2 {
        font-size: 20px;
    }

    .products-section .product-image {
        height: 200px;
    }

    .products-section .product-info h3 {
        font-size: 11px;
    }

    .products-section .sale-price .currency {
        font-size: 13px;
    }

    .products-section .sale-price .price-amount {
        font-size: 16px;
    }

    .products-section .add-to-cart {
        width: 30px;
        height: 30px;
        bottom: 10px;
        right: 10px;
    }

    .products-section .add-to-cart img {
        width: 16px;
        height: 16px;
    }
}
