/**
 * Página de Inicio
 * TiendaCR
 */

/* Hero Slider */
.hero-slider {
    min-height: 100px;
}

@media (max-width: 767px) {
    .hero-slider {
        min-height: 50px;
    }
    .hero-overlay-alibaba {
        padding: 15px;
    }
    .hero-content-alibaba h2 {
        font-size: 1.1rem;
    }
}

.hero-slide-alibaba {
    position: relative;
    background-color: #f8f9fa;
    background-repeat: no-repeat;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-slide-alibaba.hero-slide-fallback {
    background: linear-gradient(135deg, #ff9000 0%, #ff6a00 100%);
}

.hero-overlay-alibaba {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    padding: 40px;
}

.hero-content-alibaba {
    max-width: 400px;
}

.hero-slide-alibaba .hero-content-alibaba {
    max-width: 400px;
}

/* Benefit Icons */
.benefit-icon-circle {
    width: 45px;
    height: 45px;
}

/* Category Sidebar */
.category-sidebar .list-group-item {
    transition: background-color 0.2s;
}

.category-sidebar .list-group-item:hover {
    background-color: #f8f9fa;
}

.category-sidebar .list-group-item a:hover {
    color: var(--primary-color) !important;
}

.category-icon-fixed {
    width: 20px;
}

/* Category Box */
.category-box {
    transition: all 0.2s;
    border-radius: 12px;
}

.category-box:hover {
    background: #f0f0f0 !important;
    transform: translateY(-5px);
}

/* Category Scroll Container */
.category-scroll-item {
    min-width: 150px;
    flex: 0 0 150px;
}

.category-scroll-item .card {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-scroll-item img {
    display: block;
}

.custom-scroll {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0.5rem;
}

.custom-scroll > .category-scroll-item {
    scroll-snap-align: start;
}

@media (max-width: 767px) {
    .category-scroll-item {
        min-width: 125px;
        flex: 0 0 125px;
    }

    .category-scroll-item .card {
        min-height: 125px;
    }
}

/* Store Card Mini */
.store-card-mini {
    transition: transform 0.2s;
}

.store-card-mini:hover {
    transform: translateY(-5px);
}

/* Categories Page */
.home-categories-page .category-item {
    transition: transform 0.3s ease;
}

.home-categories-page .category-item:hover {
    transform: translateY(-5px);
}

.home-categories-page .category-item:hover .category-circle-wrapper {
    border-color: var(--bs-primary);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.home-categories-page .category-circle-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.home-categories-page .category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-categories-page .category-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-categories-page .category-title {
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.home-categories-page .category-item:hover .category-title {
    color: var(--bs-primary) !important;
}

@media (max-width: 576px) {
    .home-categories-page .category-circle-wrapper {
        width: 90px;
        height: 90px;
    }

    .home-categories-page .category-title {
        font-size: 0.85rem;
    }
}

/* Custom Scroll */
.custom-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
    cursor: grab;
}

.custom-scroll:active {
    cursor: grabbing;
}

.custom-scroll::-webkit-scrollbar {
    display: none;
}

/* Evitar que las cards de productos se compriman demasiado */
.home-product-col {
    min-width: 170px;
}

@media (max-width: 575.98px) {
    .home-product-col {
        min-width: 150px;
    }
}

/* Scroll horizontal visible en PC */
@media (min-width: 992px) {
    .custom-scroll {
        scrollbar-width: thin;
        scrollbar-color: #ccc transparent;
    }
    
    .custom-scroll::-webkit-scrollbar {
        display: block;
        height: 6px;
    }
    
    .custom-scroll::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .custom-scroll::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    
    .custom-scroll::-webkit-scrollbar-thumb:hover {
        background: #999;
    }

    .personalized-section .home-product-col {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }
}

/* Product Cards: Home only */
.personalized-section .home-product-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.personalized-section .home-product-card:hover {
    box-shadow: var(--shadow-lg);
}

.personalized-section .home-product-card .product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--light-color);
}

.personalized-section .home-product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.personalized-section .home-product-card:hover .product-image img {
    transform: none;
}

.personalized-section .home-product-card .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.personalized-section .home-product-card .badge-sale {
    background: var(--danger-color);
    color: #fff;
}

.personalized-section .home-product-card .badge-new {
    background: #ff007f;
    color: #fff;
    top: 8px;
    left: 6px;
    padding: 2px 8px;
    font-size: 10px;
    transform: rotate(-14deg);
    transform-origin: top left;
} 

.personalized-section .home-product-card .product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s;
    z-index: 1;
}

.personalized-section .home-product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.personalized-section .home-product-card .product-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    transition: all 0.2s;
}

.personalized-section .home-product-card .product-actions .btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.personalized-section .home-product-card .product-info {
    padding: 8px;
}

.personalized-section .home-product-col .product-category {
    font-size: 9px;
}

.personalized-section .home-product-col .product-title {
    font-size: 11px;
    line-height: 1.2;
    margin: 4px 0;
    height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.personalized-section .home-product-col .price-current {
    font-size: 14px;
    color: #e91e63;
    font-weight: 800;
}

.personalized-section .home-product-col .price-old {
    font-size: 10px;
}

.personalized-section .home-product-col .product-price.has-sale {
    align-items: baseline;
    gap: 6px;
}

.personalized-section .home-product-col .product-price.has-sale .price-old {
    order: 1;
    color: var(--gray-color);
    font-size: 14px;
    text-decoration: line-through;
}

.personalized-section .home-product-col .product-price.has-sale .price-current {
    order: 2;
    color: #e91e63;
    font-size: 14px;
    font-weight: 800;
}

.personalized-section .home-product-col .product-purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.personalized-section .home-product-col .home-add-cart {
    flex: 0 0 42px;
    width: 42px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--success-color);
    border-radius: 999px;
    background: var(--success-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.personalized-section .home-product-col .home-add-cart:hover {
    background: #ff6a00;
    border-color: #ff6a00;
    color: #fff;
}

.personalized-section .home-product-col .product-rating {
    font-size: 10px;
}

.personalized-section .home-product-col .card-footer .btn {
    font-size: 11px;
    padding: 3px 6px;
}
