/* Shop-specific styles */

/* Shop Hero Section (ALTURA REDUCIDA) */
.shop-hero {
    background: linear-gradient(to bottom, #F9DAB9, #FEFBF5);
    padding: 30px 50px 20px; /* Padding vertical muy reducido */
    text-align: center;
    margin-bottom: 40px; /* Margen inferior reducido */
}

.shop-hero-content h1 {
    font-family: 'Lora', serif;
    font-size: 3rem; /* Tamaño del título reducido */
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #000;
}

.shop-hero-content p {
    font-size: 1.1rem; /* Tamaño del subtítulo reducido */
    color: #666;
    margin: 0;
}

/* Main shop container */
.shop-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
}

/* =================================
   ESTILOS PARA EL BUSCADOR
   ================================= */
.shop-search-container {
    margin-bottom: 30px; /* Margen reducido */
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 25px;
    border: 1px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #B5651D;
    box-shadow: 0 0 0 3px rgba(181, 101, 29, 0.15);
}

/* === ESTILOS PARA CAMBIO DE VISTA === */
.view-switcher-container {
    text-align: center;
    margin-bottom: 20px;
}

.view-btn {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    margin: 0 5px;
}

.view-btn.active {
    background: #B5651D;
    color: #fff;
    border-color: #B5651D;
}

/* Filtros */
.shop-filters {
    margin-bottom: 40px;
    text-align: center;
}

.filter-container {
    display: inline-flex;
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 25px;
    padding: 5px;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.filter-btn.active,
.filter-btn:hover {
    background: #B5651D;
    color: #fff;
}

/* --- ESTILOS PARA VISTA POR CATEGORÍA --- */
.category-group {
    margin-bottom: 50px;
}

.category-group-title {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.shop-products, .category-group .shop-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px;
    margin-bottom: 0;
}


/* Tarjetas de producto */
.product-item {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    scroll-margin-top: 20px;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-item.hidden {
    display: none;
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: #000;
}

.product-description {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #B5651D;
    margin: 0 0 15px 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: #f8f8f8;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-input {
    border: none;
    padding: 8px;
    width: 40px;
    text-align: center;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    background: #B5651D;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    flex: 1;
}

.add-to-cart-btn:hover {
    background: #8B4A15;
    transform: scale(1.02);
}

/* Estilo del carrito en el header */
.header-cart-icon {
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    position: relative; 
}


/* Modal del carrito */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.cart-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.cart-header h2 {
    margin: 0;
    font-family: 'Lora', serif;
    font-size: 1.5rem;
}

.close-cart {
    font-size: 30px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-cart:hover {
    color: #000;
}

.cart-items {
    overflow-y: auto;
    padding: 0;
    flex-grow: 1;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 500;
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #B5651D;
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    background: #f0f0f0;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.cart-qty-btn:hover {
    background: #e0e0e0;
}

.cart-qty-display {
    min-width: 25px;
    text-align: center;
    font-size: 0.9rem;
}

.remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #ff4444;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #E0E0E0;
    background: #f9f9f9;
}

.cart-total {
    text-align: right;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* === ESTILOS PARA LEYENDA DE ENVÍO EN CARRITO Y CHECKOUT === */
.cart-shipping-info {
    font-size: 0.8rem;
    text-align: center;
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}
.order-summary .cart-shipping-info {
    margin-top: 15px;
    text-align: right;
    background: none;
    padding: 0;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex: 1;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: #B5651D;
    color: #fff;
}

.btn-primary:hover {
    background: #8B4A15;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Modal de checkout */
.checkout-modal {
    display: none;
    position: fixed;
    z-index: 2500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.checkout-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E0E0E0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.checkout-header h2 {
    margin: 0;
    font-family: 'Lora', serif;
    font-size: 1.5rem;
}

.close-checkout {
    font-size: 30px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-checkout:hover {
    color: #000;
}

.checkout-form {
    padding: 20px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: #B5651D;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: #B5651D;
    box-shadow: 0 0 0 2px rgba(181, 101, 29, 0.1);
}

.delivery-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.delivery-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.delivery-options input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    width: 1.15em;
    height: 1.15em;
    border: 1px solid #ccc;
    border-radius: 50%;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
}

.delivery-options input[type="radio"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #B5651D;
    background-color: #B5651D;
}

.delivery-options input[type="radio"]:checked::before {
    transform: scale(1);
}

.delivery-options input[type="radio"]:focus {
    outline: max(2px, 0.15em) solid #B5651D;
    outline-offset: max(2px, 0.15em);
}

.payment-info {
    background-color: #eef6fd;
    border: 1px solid #d0e3f5;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #333;
}

.payment-info p {
    margin-top: 0;
}

.payment-info ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.payment-info li {
    margin-bottom: 5px;
}

.order-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.order-summary h3 {
    margin: 0 0 15px 0;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    color: #B5651D;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.order-total {
    border-top: 1px solid #E0E0E0;
    padding-top: 10px;
    margin-top: 10px;
    text-align: right;
    font-size: 1.2rem;
}

.checkout-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.empty-cart-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shop-hero {
        padding: 30px 20px 20px;
    }
    
    .shop-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .shop-main {
        padding: 0 20px;
    }
    
    .shop-products, .category-group .shop-products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .filter-container {
        flex-wrap: wrap;
        gap: 3px;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .cart-modal-content,
    .checkout-modal-content {
        width: calc(100% - 20px);
        max-width: 500px;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .shop-products, .category-group .shop-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .product-title {
        font-size: 1rem;
    }
    .product-price {
        font-size: 1.1rem;
    }
}


/* =================================
   ESTILOS PARA EL BANNER DE LOGOS
   ================================= */
.logo-scroller-container {
    max-width: 1200px;
    margin: 40px auto; /* Margen reducido */
    overflow: hidden;
    -webkit-mask: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.logo-scroller {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: scroll 30s linear infinite;
}

.logo-scroller img {
    max-height: 50px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-scroller:hover {
    animation-play-state: paused;
}

.logo-scroller img:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* --- ESTILOS PARA OFERTAS --- */
.product-item.on-sale {
    position: relative;
    border: 2px solid #e74c3c;
}

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-price.sale {
    color: #e74c3c;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-weight: normal;
    margin-left: 10px;
    font-size: 0.8rem;
}

/* --- ESTILOS PARA MENSAJE DE COMPRA MÍNIMA --- */
.min-purchase-message {
    text-align: center;
    padding: 10px;
    margin: 15px 0 5px 0;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    color: #b45309;
    font-size: 0.9rem;
}

#checkout:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================= */
/* === ESTILOS PARA MODAL DE PROMOCIÓN === */
/* ============================================= */
.promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.promo-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    animation: modalAppear 0.4s ease-out;
    overflow: hidden;
}

.promo-modal-content a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.promo-modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-modal-title {
    padding: 15px;
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    text-align: center;
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
}

.close-promo-modal {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 35px;
    color: white;
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.close-promo-modal:hover {
    transform: scale(1.1);
}

/* ==================================================== */
/* === ESTILO PARA RESALTAR PRODUCTO EN PROMO === */
/* ==================================================== */
.product-item.highlight {
    box-shadow: 0 0 0 4px #B5651D, 0 8px 20px rgba(181, 101, 29, 0.4);
    transform: scale(1.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}