/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    color: #8a6d3b;
    font-size: 2rem;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.8rem;
    color: #666;
    display: block;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover, .nav a.active {
    color: #8a6d3b;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    color: #333;
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #8a6d3b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 100px 0 20px;
    margin-top: 70px;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    gap: 10px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb li:last-child {
    color: #8a6d3b;
}

/* Filtros */
.product-filters {
    background: white;
    padding: 30px 0;
    margin-bottom: 30px;
}

.product-filters h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.filter-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-family: 'Montserrat', sans-serif;
}

/* Grid de productos */
.products-listing {
    padding: 40px 0;
}

.products-header {
    margin-bottom: 30px;
    text-align: center;
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.product-image:hover img {
    transform: scale(1.05);
}

.view-details-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    color: #8a6d3b;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    transition: background 0.3s;
}

.view-details-btn:hover {
    background: rgba(255,255,255,1);
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #8a6d3b;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-info {
    padding: 20px;
}

.product-name {
    margin: 0 0 10px 0;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1.3;
    color: #333;
    transition: color 0.3s;
}

.product-name:hover {
    color: #8a6d3b;
}

.product-category {
    color: #c19a6b;
    font-size: 0.8rem;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.product-stock {
    font-size: 0.8rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #8a6d3b;
    margin: 0 0 15px 0;
}

.add-to-cart-btn {
    width: 100%;
    background: #8a6d3b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: #7a5d2b;
}

.add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: #2c2c2c;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #8a6d3b;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #8a6d3b;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #8a6d3b;
}

.payment-methods {
    text-align: center;
}

.payment-methods img {
    margin-bottom: 10px;
    border-radius: 5px;
}

.payment-methods p {
    color: #ccc;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
    font-size: 0.9rem;
}

/* Carrito */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.cart-items {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.3;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    transition: color 0.3s;
}

.remove-btn:hover {
    color: #c0392b;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.checkout-btn {
    width: 100%;
    background: #8a6d3b;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.checkout-btn:hover {
    background: #7a5d2b;
}

/* Modales */
.checkout-modal, .product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    color: #666;
    padding: 5px;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-body h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.product-modal-content {
    display: flex;
    gap: 2rem;
    max-width: 900px;
}

.product-images {
    flex: 1;
}

.carousel-container {
    position: relative;
    width: 400px;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-slides {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255,255,255,1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: white;
}

.indicator:hover {
    background: rgba(255,255,255,0.8);
}

.product-details {
    flex: 1;
    min-width: 300px;
}

.product-details h2 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5rem;
    line-height: 1.3;
}

.product-details .product-category {
    color: #8a6d3b;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.product-details .product-description {
    font-size: 1rem;
    color: #666;
    margin: 15px 0;
    line-height: 1.5;
}

.product-features {
    margin: 20px 0;
}

.product-features h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.product-features ul {
    margin-left: 20px;
}

.product-features li {
    margin-bottom: 5px;
    color: #666;
    list-style-type: disc;
}

.product-stock {
    margin: 10px 0;
    font-weight: 500;
}

.product-price-large {
    font-size: 1.8rem;
    font-weight: bold;
    color: #8a6d3b;
    margin: 20px 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.add-to-cart-large, .buy-now {
    flex: 1;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.3s;
}

.add-to-cart-large {
    background: #8a6d3b;
}

.buy-now {
    background: #2c2c2c;
}

.add-to-cart-large:hover:not(:disabled), .buy-now:hover:not(:disabled) {
    opacity: 0.9;
}

.add-to-cart-large:disabled, .buy-now:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Estados de carga y error */
.loading, .error, .no-products, .empty-cart {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #666;
}

.error {
    color: #e74c3c;
}

/* Estilos específicos para Mercado Pago */
#mercadopago-checkout {
    max-width: 400px;
    margin: 0 auto;
}

.mp-checkout-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.payment-success {
    text-align: center;
    padding: 30px;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.payment-error {
    text-align: center;
    padding: 30px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav {
        display: none;
    }

    .nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav.active ul {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }

    .product-modal-content {
        flex-direction: column;
    }

    .carousel-container {
        width: 100%;
        height: 300px;
    }

    .filter-options {
        flex-direction: column;
        align-items: center;
    }

    .filter-group {
        width: 100%;
        max-width: 300px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .cart-sidebar {
        max-width: 100%;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header .container {
        padding: 10px 15px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}