/**
 * Category Separate Sliders - Styles
 * Each selected category as its own product slider on homepage
 * PrestaShop 8.2.3 Compatible
 */

/* =============================
   Base Styles
   ============================= */

.hcs-category-sliders-wrapper {
    width: 100%;
    margin: 20px 0;
    padding: 0;
}

.hcs-category-slider-block {
    margin-bottom: 40px;
    padding: 0 15px;
    position: relative;
}

.hcs-category-slider-block:last-child {
    margin-bottom: 0;
}

/* Header */
.hcs-category-slider-header {
    margin-bottom: 20px;
    padding: 0 5px;
}

.hcs-category-slider-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
    padding: 0;
    line-height: 1.4;
}

.hcs-category-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: color 0.3s ease;
}

.hcs-category-title-link:hover .hcs-category-slider-title,
.hcs-category-title-link:hover {
    color: #0066cc;
}

/* Carousel Container */
.hcs-category-products {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 4px 0 16px 0;
    box-sizing: border-box;
}

/* Product Item */
.hcs-category-product-item {
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
}

.hcs-category-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hcs-category-product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Thumbnail */
.hcs-category-product-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%;
    background: #f8f8f8;
}

.hcs-category-product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Product Info */
.hcs-category-product-info {
    padding: 12px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hcs-category-product-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #333;
}

.hcs-category-product-name a {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.hcs-category-product-name a:hover {
    color: #0066cc;
}

.hcs-category-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-top: auto;
}

.hcs-category-price {
    display: inline-block;
}

/* =============================
   View More Products Link
   ============================= */

.hcs-category-view-more {
    text-align: center;
    margin-top: 20px;
    padding: 0 5px;
}

.hcs-view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid #0066cc;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: transparent;
    line-height: 1.4;
}

.hcs-view-more-link:hover {
    background: #0066cc;
    color: #fff;
    text-decoration: none;
}

.hcs-view-more-count {
    font-weight: 400;
    font-size: 13px;
    opacity: 0.8;
}

.hcs-view-more-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.hcs-view-more-link:hover .hcs-view-more-arrow {
    transform: translateX(3px);
}

/* Fixed Height Mode */
.hcs-fixed-height .hcs-category-product-item {
    height: 100%;
}

.hcs-item-fixed {
    display: flex;
    flex-direction: column;
}

.hcs-item-fixed .hcs-category-product-card {
    height: 100%;
    min-height: 280px;
}

.hcs-item-fixed .hcs-category-product-thumb {
    flex: 1;
}

.hcs-item-fixed .hcs-category-product-image {
    height: 100%;
    min-height: 180px;
}

/* =============================
   Responsive Breakpoints
   ============================= */

/* Tablet Landscape and Below (max-width: 1100px) */
@media only screen and (max-width: 1100px) {
    .hcs-category-slider-block {
        padding: 0 10px;
    }

    .hcs-category-slider-title {
        font-size: 20px;
    }

    .hcs-category-products {
        grid-template-columns: repeat(4, 1fr);
    }

    .hcs-category-product-name {
        font-size: 13px;
    }

    .hcs-category-product-price {
        font-size: 15px;
    }

    .hcs-view-more-link {
        font-size: 14px;
        padding: 9px 20px;
    }
}

/* Tablet Portrait (max-width: 1000px) */
@media only screen and (max-width: 1000px) {
    .hcs-category-sliders-wrapper {
        margin: 15px 0;
    }

    .hcs-category-slider-block {
        padding: 0 8px;
    }

    .hcs-category-slider-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .hcs-category-product-item {
        padding: 0 6px;
    }

    .hcs-category-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .hcs-category-product-card {
        border-radius: 6px;
    }

    .hcs-category-product-info {
        padding: 10px;
    }

    .hcs-category-product-name {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .hcs-category-product-price {
        font-size: 14px;
    }

    .hcs-item-fixed .hcs-category-product-card {
        min-height: 240px;
    }

    .hcs-item-fixed .hcs-category-product-image {
        min-height: 150px;
    }

    .hcs-view-more-link {
        font-size: 13px;
        padding: 8px 18px;
    }
}

/* Mobile (max-width: 768px) */
@media only screen and (max-width: 768px) {
    .hcs-category-sliders-wrapper {
        margin: 10px 0;
    }

    .hcs-category-slider-block {
        padding: 0 5px;
        margin-bottom: 25px;
    }

    .hcs-category-slider-header {
        margin-bottom: 12px;
        padding: 0;
    }

    .hcs-category-slider-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .hcs-category-product-item {
        padding: 0 4px;
    }

    .hcs-category-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .hcs-category-product-card {
        border-radius: 4px;
        border: 1px solid #f0f0f0;
    }

    .hcs-category-product-info {
        padding: 8px;
    }

    .hcs-category-product-name {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .hcs-category-product-price {
        font-size: 13px;
    }

    .hcs-item-fixed .hcs-category-product-card {
        min-height: 200px;
    }

    .hcs-item-fixed .hcs-category-product-image {
        min-height: 120px;
    }

    .hcs-category-view-more {
        margin-top: 15px;
    }

    .hcs-view-more-link {
        font-size: 13px;
        padding: 8px 16px;
        width: 100%;
        justify-content: center;
    }
}

/* Small Mobile (max-width: 480px) */
@media only screen and (max-width: 480px) {
    .hcs-category-slider-title {
        font-size: 15px;
    }

    .hcs-category-product-name {
        font-size: 11px;
    }

    .hcs-category-product-price {
        font-size: 12px;
    }

    .hcs-item-fixed .hcs-category-product-card {
        min-height: 180px;
    }

    .hcs-item-fixed .hcs-category-product-image {
        min-height: 100px;
    }

    .hcs-view-more-link {
        font-size: 12px;
        padding: 7px 14px;
    }

    .hcs-view-more-count {
        font-size: 11px;
    }
}

/* =============================
   Print Styles
   ============================= */

@media print {
    .hcs-category-sliders-wrapper {
        display: none;
    }
}

/* =============================
   Accessibility
   ============================= */

@media (prefers-reduced-motion: reduce) {
    .hcs-category-product-card {
        transition: none;
    }

    .hcs-category-product-image {
        transition: none;
    }

    .hcs-view-more-link {
        transition: none;
    }

    .hcs-view-more-arrow {
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.hcs-category-product-card:focus-within {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.hcs-view-more-link:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* RTL Support */
[dir="rtl"] .hcs-category-slider-title {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .hcs-category-product-info {
    text-align: right;
}

[dir="rtl"] .hcs-view-more-link {
    direction: rtl;
}

[dir="rtl"] .hcs-view-more-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .hcs-view-more-link:hover .hcs-view-more-arrow {
    transform: scaleX(-1) translateX(3px);
}
