/* Tienda Styles - Based on PLASTIMARKET Design System */

/* Shop Page Layout */
.shop-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.shop-page .container {
    position: relative;
    z-index: 1;
}

/* Breadcrumb Styling */
.breadcrumb-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb {
    background: none;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item {
    font-weight: 500;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #dee2e6;
    font-weight: 600;
}

/* Sidebar Filters */
.filters-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.filters-sidebar h5 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.filters-sidebar h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), #ff9935);
    border-radius: 2px;
}

.filter-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Category Filters */
.category-filter {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-filter li {
    margin-bottom: 0.75rem;
}

.category-filter .form-check {
    margin-bottom: 0;
}

.category-filter .form-check-input {
    border-radius: 6px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.category-filter .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.category-filter .form-check-label {
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.category-filter .form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Price Range Slider */
.price-range-container {
    margin-bottom: 1rem;
}

.form-range {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #ff9935);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #ff9935);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.price-display {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Brand Filters */
.brand-filter {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-filter li {
    margin-bottom: 0.75rem;
}

.brand-filter .form-check-input {
    border-radius: 6px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.brand-filter .form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 153, 53, 0.25);
}

.brand-filter .form-check-label {
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.brand-filter .form-check-input:checked + .form-check-label {
    color: var(--accent-color);
    font-weight: 600;
}

/* Apply Filters Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9935 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, var(--primary-color) 100%);
}

/* Product Listing Header */
.product-listing {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-listing h2 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.product-listing .text-muted {
    color: #6c757d !important;
    font-weight: 500;
}

/* Sort Select */
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: white;
}

/* Product Cards - Compact Design */
.deals-product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px; /* Reduced */
    padding: 1rem; /* Reduced */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softer */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.deals-product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.deals-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.deals-product-card:hover::before {
    left: 100%;
}

/* Product Image Container */
.product-image-container {
    height: 160px; /* Reduced */
    position: relative;
    overflow: hidden;
    border-radius: 10px; /* Reduced */
    margin-bottom: 0.75rem; /* Reduced */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.deals-product-card:hover .product-image {
    transform: scale(1.1) rotate(2deg);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 10px; /* Adjusted */
    left: 10px; /* Adjusted */
    z-index: 10;
    color: white;
    font-size: 0.7rem; /* Reduced */
    font-weight: 600;
    padding: 0.3rem 0.7rem; /* Reduced */
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge:not(.sale):not(.popular) {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.product-badge.sale {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.product-badge.popular {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 10px; /* Match image container */
}

.deals-product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 40px; /* Reduced */
    height: 40px; /* Reduced */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-view-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Product Info */
.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center; /* Center align all info */
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 0.5rem; /* Reduced */
    justify-content: center;
}

.product-rating .fas.fa-star,
.product-rating .far.fa-star {
    font-size: 12px; /* Reduced */
}

.product-rating .fas.fa-star {
    color: #ffc107;
}

.product-rating .far.fa-star {
    color: #dee2e6;
}

.product-rating span:last-child {
    font-size: 0.75rem; /* Reduced */
    color: #6c757d;
    margin-left: 0.4rem;
}

.product-title {
    font-size: 0.9rem; /* Reduced */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem; /* Reduced */
    transition: color 0.3s ease;
    line-height: 1.3;
    height: 2.34rem; /* 0.9rem * 1.3 * 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.deals-product-card:hover .product-title {
    color: var(--primary-color);
}

/* Price Container */
.price-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0px;
    align-items: center;
    justify-content: center;
}

.current-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.8rem; /* Reduced */
    color: #6c757d;
    text-decoration: line-through;
}

/* Product Actions */
.product-actions {
    margin-top: auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem; /* Reduced */
    gap: 0.5rem;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 28px; /* Reduced */
    height: 28px; /* Reduced */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.qty-input {
    width: 40px; /* Reduced */
    height: 28px; /* Match button height */
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.25rem;
    font-weight: 600;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9935 100%);
    color: white;
    border: none;
    border-radius: 10px; /* Reduced */
    padding: 0.6rem 0.75rem; /* Reduced */
    font-weight: 600;
    font-size: 0.9rem; /* Reduced */
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2); /* Softer */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9935 100%);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.page-link {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin: 0 0.25rem;
    padding: 0.75rem 1rem;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), #ff9935);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.page-item.disabled .page-link {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.shop-filters {
    padding: 0px 15px 0px 35px;
}

/* Filters Header */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filters-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.clear-filters-btn {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Filter Count Badge */
.filter-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 0.5rem;
}

/* Chips Container */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding: 10px 5px;
    background: #f8f9fa;
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #e9ecef;
}

.chips-container::-webkit-scrollbar {
    width: 6px;
}

.chips-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.chips-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Filter Chip */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip i {
    display: none;
    font-size: 0.65rem;
}

.filter-chip:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.05);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary-color), #ff9935);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.filter-chip.active i {
    display: inline-block;
}

/* Apply Filters Button */
.apply-filters-btn {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-sidebar {
        margin-bottom: 2rem;
        position: static;
    }
    
    .product-listing {
        padding: 1.5rem;
    }
    
    .deals-product-card {
        padding: 1rem;
    }
    
    .product-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .quick-view-btn {
        width: 40px;
        height: 40px;
        font-size: 0.7rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-listing h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .shop-page {
        padding: 1rem 0;
    }
    
    .breadcrumb-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .filters-sidebar {
        padding: 1.5rem;
    }
    
    .product-listing {
        padding: 1rem;
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .deals-product-card {
        padding: 0.75rem;
    }
}
/* ===== PAGINACIï¿½N RESPONSIVA ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.page-item .page-link {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: #ccc;
    background: #f8f9fa;
    cursor: not-allowed;
}

/* Paginaciï¿½n en mï¿½viles */
@media (max-width: 576px) {
    .pagination {
        gap: 4px;
    }
    
    .page-item .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Ocultar nï¿½meros de pï¿½gina intermedios en mï¿½vil */
    .page-item:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }
    
    /* Mostrar solo la pï¿½gina activa */
    .page-item.active {
        display: block;
    }
    
    /* Mostrar botones Anterior/Siguiente */
    .page-item:first-child,
    .page-item:last-child {
        display: block;
    }
    
    /* Asegurar que los puntos suspensivos tambiï¿½n se oculten */
    .page-item.disabled {
        display: none;
    }
}

/* Tablet */
@media (min-width: 577px) and (max-width: 768px) {
    .pagination {
        gap: 5px;
    }
    
    .page-item .page-link {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ===== FILTROS EN ACORDEÓN (SOLO MÓVIL) ===== */

/* Desktop: Mostrar como filter-group original, sin acordeón */
@media (min-width: 992px) {
    .filters-accordion .accordion-item {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 0;
        background: transparent !important;
        box-shadow: none;
    }
    
    .filters-accordion .accordion-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .filters-accordion .accordion-header {
        display: block;
        background: transparent !important;
    }
    
    .filters-accordion .accordion-button {
        font-weight: 600;
        font-size: 1rem;
        color: #495057;
        padding: 0;
        background: transparent !important;
        border: none;
        box-shadow: none;
        cursor: default;
        pointer-events: none;
    }
    
    .filters-accordion .accordion-button::after {
        display: none;
    }
    
    .filters-accordion .accordion-button i {
        color: var(--primary-color);
        font-size: 0.9rem;
    }
    
    .filters-accordion .accordion-collapse {
        display: block !important;
        height: auto !important;
    }
    
    .filters-accordion .accordion-body,
    .filters-accordion .accordion-body.p-3 {
        padding: 0 !important;
        background: transparent !important;
        border: none;
    }
    
    .filters-accordion .accordion-body .chips-container {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        max-height: 180px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 5px;
    }
    
    .filters-accordion .accordion-body .chips-container::-webkit-scrollbar {
        width: 6px;
    }
    
    .filters-accordion .accordion-body .chips-container::-webkit-scrollbar-track {
        background: #e9ecef;
        border-radius: 10px;
    }
    
    .filters-accordion .accordion-body .chips-container::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
}

/* Móvil: Acordeón funcional */
@media (max-width: 991px) {
    .filters-accordion .accordion-item {
        border: none;
        margin-bottom: 8px;
        border-radius: 10px;
        overflow: hidden;
        background: white;
        border: 1px solid var(--primary-color);
    }
    
    .filters-accordion .accordion-button {
        font-weight: 600;
        font-size: 14px;
        color: #333;
        padding: 12px 15px;
        background: white;
        border: none;
        box-shadow: none;
        cursor: pointer;
        pointer-events: auto;
    }
    
    .filters-accordion .accordion-button:focus {
        box-shadow: none;
        border-color: transparent;
    }
    
    .filters-accordion .accordion-button:not(.collapsed) {
        background: var(--primary-color);
        color: white;
        box-shadow: none;
    }
    
    .filters-accordion .accordion-button:not(.collapsed)::after {
        filter: brightness(0) invert(1);
    }
    
    .filters-accordion .accordion-button::after {
        width: 14px;
        height: 14px;
        background-size: 14px;
    }
    
    .filters-accordion .accordion-button i {
        font-size: 13px;
    }
    
    .filters-accordion .accordion-body {
        padding: 12px;
        background: white;
        border: none;
    }
    
    .filters-accordion .accordion-body .chips-container {
        max-height: 150px;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Filtro count badge */
.filter-count {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.filters-accordion .accordion-button:not(.collapsed) .filter-count {
    background: rgba(255,255,255,0.2);
    color: white;
}
