/* ========================================
   VARIABLES DE COLOR Y CONFIGURACIÓN
   ======================================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* ========================================
   HERO SEARCH SECTION
   ======================================== */
.hero-search {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-search .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ========================================
   MODERN SEARCH BAR
   ======================================== */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-wrapper {
    position: relative;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input {
    border: none;
    padding: 0.9rem 1.2rem 0.9rem 3.5rem;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    background: transparent;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.search-clear-btn.show {
    display: flex;
}

/* ========================================
   FILTERS SECTION
   ======================================== */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-light);
}

.filters-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.clear-filters-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-filters-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* ========================================
   CATEGORY PILLS
   ======================================== */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-pill {
    display: none;
}

.category-pill-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: white;
}

.category-pill-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-pill:checked + .category-pill-label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* ========================================
   PRICE FILTER
   ======================================== */
.price-filter {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.price-filter-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-inputs {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.price-input-wrapper {
    flex: 1;
    position: relative;
}

.price-input-wrapper .currency {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-weight: 500;
}

.price-input {
    width: 100%;
    padding: 0.6rem 0.8rem 0.6rem 1.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products-section {
    margin-bottom: 3rem;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-count {
    font-size: 1rem;
    color: var(--text-light);
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-label {
    font-weight: 500;
    color: var(--text-dark);
}

.sort-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ========================================
   PRODUCT GRID
   ======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* ========================================
   PRODUCT CARD
   ======================================== */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-image-container {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-light);
}

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

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

.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

.discount-badge {
    background: var(--secondary-color);
    color: white;
}

.product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

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

.product-old-price {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-stock {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.add-to-cart-direct-btn,
.add-to-cart-btn {
    width: 100%;
    padding: 0.65rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: auto;
}

.add-to-cart-direct-btn:hover:not(:disabled),
.add-to-cart-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.add-to-cart-direct-btn:disabled,
.add-to-cart-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* ========================================
   LOADING STATE
   ======================================== */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.spinner-border {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-light);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .filters-section {
        padding: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .category-pills {
        gap: 0.4rem;
    }

    .category-pill-label {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-wrapper {
        justify-content: space-between;
    }

    .hero-search {
        padding: 1.5rem 0 1.5rem;
    }

    .search-input {
        padding: 0.8rem 1rem 0.8rem 3rem;
        font-size: 0.9rem;
    }

    .search-icon {
        left: 1rem;
        font-size: 1rem;
    }
}

/* ========================================
   BUSCADOR DENTRO DE FILTROS
   ======================================== */
.filter-search-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.search-wrapper-filter {
    position: relative;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-wrapper-filter:focus-within {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input-filter {
    border: none;
    padding: 0.9rem 3rem 0.9rem 3rem;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    background: transparent;
}

.search-icon-filter {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-clear-btn-filter {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.search-clear-btn-filter:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.search-clear-btn-filter.show {
    display: flex;
}

/* Eliminar estilos del hero search ya que no se usa */
.hero-search {
    display: none;
}

/* Layout Principal */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Card Mejorada */
.product-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-color, #6366f1);
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%; /* Aspect Ratio 1:1 */
    background: #f8f9fa;
    overflow: hidden;
}

.product-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; /* O 'contain' según tus fotos */
    padding: 1rem;
    transition: transform 0.3s ease;
}

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

/* Sidebar Sticky */
.filters-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #eef0f2;
    /* Sticky logic handled via class .sticky-top in HTML */
}

/* Pagination Styles */
.page-link {
    color: var(--text-dark, #333);
    border: none;
    margin: 0 2px;
    border-radius: 6px !important;
    font-weight: 500;
}
.page-item.active .page-link {
    background-color: var(--primary-color, #6366f1);
    color: white;
}
.page-link:focus {
    box-shadow: none;
    background-color: #f1f5f9;
}

/* Mobile Offcanvas Override */
@media (max-width: 768px) {
    .filters-sidebar {
        border: none;
        padding: 1rem;
    }
}

/* =====================================================
   ESTILOS DEL CARRITO DE COMPRAS - DISEÑO PROFESIONAL
   ===================================================== */


#mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

#cart-dropdown-wrapper.show #mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header del mini-cart */
.mini-cart-header {
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
    color: #ffffff;
    padding: 1rem 1.25rem;
    border-radius: 10px 10px 0 0;
}

.mini-cart-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.mini-cart-item-count {
    font-weight: 700;
}

/* Body del mini-cart */
.mini-cart-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
}

/* Custom scrollbar */
.mini-cart-body::-webkit-scrollbar {
    width: 6px;
}

.mini-cart-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mini-cart-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.mini-cart-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Items del mini-cart */
.mini-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.mini-cart-item:hover {
    background-color: #f8f9fa;
}

.mini-cart-item:last-child {
    border-bottom: none;
}

.mini-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.mini-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-cart-item-details h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-cart-item-details p {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Mensaje de carrito vacío */
#mini-cart-empty-message {
    display: none;
    padding: 2rem 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Footer del mini-cart */
.mini-cart-footer {
    padding: 1rem 1.25rem;
    border-top: 2px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.mini-cart-total {
    font-size: 1.25rem;
    color: #1e88e5;
}

.mini-cart-footer .btn {
    padding: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mini-cart-footer .btn-primary {
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
    border: none;
}

.mini-cart-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
}

/* Badge del carrito en el navbar */
#cart-item-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    line-height: 20px;
    border-radius: 10px;
    animation: pulse 2s infinite;
}


/* Responsive para mini-cart */
@media (max-width: 576px) {
    #mini-cart-dropdown {
        width: calc(100vw - 2rem);
        right: -1rem;
    }

    .mini-cart-body {
        max-height: 250px;
    }

    .mini-cart-item img {
        width: 50px;
        height: 50px;
    }

    .mini-cart-item-details h6 {
        font-size: 0.85rem;
    }
}

/
#mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    margin-top: 0.5rem;
    overflow: hidden;
}

#cart-dropdown-wrapper.show #mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Flecha indicadora */
#mini-cart-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0,0,0,0.1);
    border-left: 1px solid rgba(0,0,0,0.1);
}

/* Header del mini-cart */
.mini-cart-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mini-cart-header h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mini-cart-header .mini-cart-item-count {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Body del mini-cart */
.mini-cart-body {
    max-height: 350px;
    overflow-y: auto;
    background: #fafafa;
}

/* Scrollbar personalizado */
.mini-cart-body::-webkit-scrollbar {
    width: 5px;
}

.mini-cart-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mini-cart-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.mini-cart-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Items del mini-cart */
.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.mini-cart-item:hover {
    background-color: #f8f9fa;
}

.mini-cart-item:last-child {
    border-bottom: none;
}

/* Imagen del producto - OPTIMIZADA */
.mini-cart-item-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #fff;
    padding: 3px;
}

/* Información del producto */
.mini-cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-cart-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cart-item-price {
    font-size: 0.75rem;
    color: #1e88e5;
    font-weight: 600;
    margin: 0;
}

.mini-cart-item-quantity {
    font-size: 0.7rem;
    color: #666;
    margin: 0;
}

/* Botón eliminar (opcional) */
.mini-cart-item-remove {
    align-self: flex-start;
    margin-top: 5px;
}

.btn-remove-mini {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-radius: 4px;
}

.btn-remove-mini:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #c82333;
}

/* Carrito vacío */
.mini-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.mini-cart-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.3;
    display: block;
}

.mini-cart-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Footer del mini-cart */
.mini-cart-footer {
    padding: 12px 15px;
    background: #fff;
    border-top: 2px solid #f0f0f0;
}

.mini-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 1rem;
}

.mini-cart-total-row span:first-child {
    color: #666;
    font-weight: 500;
}

.mini-cart-total {
    color: #1e88e5;
    font-size: 1.2rem;
}

/* Acciones del footer */
.mini-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-cart-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.mini-cart-actions .btn-outline-primary {
    border: 1.5px solid #1e88e5;
    color: #1e88e5;
}

.mini-cart-actions .btn-outline-primary:hover {
    background: #1e88e5;
    color: #fff;
    transform: translateY(-1px);
}

.mini-cart-actions .btn-primary {
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
    border: none;
}

.mini-cart-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

/* Badge del carrito en navbar */
#cart-item-count {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Hover effect en el ícono */
#cart-icon-link:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Loading state */
.mini-cart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #999;
}

.mini-cart-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Responsive */
@media (max-width: 576px) {
    #mini-cart-dropdown {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 350px;
        height: 100vh;
        border-radius: 0;
        margin-top: 0;
        transform: translateX(100%);
    }
    
    #cart-dropdown-wrapper.show #mini-cart-dropdown {
        transform: translateX(0);
    }
    
    #mini-cart-dropdown::before {
        display: none;
    }
    
    .mini-cart-body {
        max-height: calc(100vh - 160px);
    }
}
/* --- FIX DE ESPACIADO SUPERIOR --- */
/* =======================================================
   AJUSTE DE ESPACIADO PARA NAVBAR FIJO (RESPONSIVE)
   ======================================================= */

/* 1. Escritorio y Pantallas Grandes (> 992px) */
body {
    /* Altura estándar del navbar en PC */
    padding-top: 90px;
}

/* 2. Tablets y Laptops Pequeñas (768px a 991px) */
@media (max-width: 991px) {
    body {
        /* En tablets, el menú suele ser un poco más alto o el buscador baja */
        padding-top: 120px;
    }
}

/* 3. Celulares (Menos de 768px) - EL CRÍTICO */
@media (max-width: 767px) {
    body {
        /* IMPORTANTE: En móvil, el navbar + buscador + categorías 
           ocupan mucho espacio vertical (aprox 150px). 
           Aumentamos esto para "bajar" todo el sitio. */
        padding-top: 155px !important;
    }
    
    /* Ajuste fino del contenedor del catálogo */
    .container.mt-2 { 
        margin-top: 10px !important; 
    }
    
    /* Si tus filtros son 'sticky', ajustamos su posición "top" 
       para que no queden tapados por el navbar */
    .sticky-search-header {
        top: 60px; /* Ajusta según la altura real de tu barra azul superior */
    }
}