/* ========================================
   TIENDA - ESTILOS
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: #F5E6E8;
    color: #2c3e50;
    line-height: 1.6;
}

/* ========================================
   HEADER
======================================== */

.header {
    background: #F5E6E8;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #C49A6C;
    text-decoration: none;
}

.logo img {
    width: auto;
    height: 56px;          /* logo visible y consistente */
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.tagline {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 2px;
    position: absolute;
    top: 60px;
}

.nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
}

.nav a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav a.active {
    border-bottom: 2px solid #C49A6C;
    padding-bottom: 2px;
}

.nav a:hover {
    color: #C49A6C;
}

.btn-carrito {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-carrito:hover {
    transform: scale(1.1);
}

.btn-carrito svg {
    stroke: #2c3e50;
}

.carrito-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #C96480;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: #2c3e50;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ========================================
   TIENDA MAIN
======================================== */

.tienda-main {
    padding: 2rem 0 4rem;
}

.tienda-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* ========================================
   SIDEBAR FILTROS
======================================== */

.tienda-sidebar {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 90px;
    overflow: visible;
    border-radius: 8px;
}

.tienda-sidebar > *:first-child {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.carrito-botones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}
.tienda-sidebar > *:last-child {
    border-radius: 0 0 8px 8px;
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #C49A6C 0%, #B88A5F 100%);
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: 1px;
}

.filter-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
}

.filter-title svg {
    stroke: #999;
    transition: transform 0.3s ease;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
}

.filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-option input[type="checkbox"]:checked ~ .checkmark {
    background: #C96480;
    border-color: #C96480;
}

.filter-option input[type="checkbox"]:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-text {
    font-size: 0.95rem;
    color: #555;
    transition: color 0.3s ease;
}

.filter-option:hover .option-text {
    color: #C96480;
}

.filter-divider {
    height: 1px;
    background: #f0f0f0;
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #555;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-select:focus {
    outline: none;
    border-color: #C96480;
}

.btn-limpiar {
    display: block;
    width: calc(100% - 3rem);
    margin: 1rem 1.5rem 1.5rem;
    padding: 0.875rem;
    background: transparent;
    color: #C96480;
    border: 2px solid #C96480;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-limpiar:hover {
    background: #C96480;
    color: white;
}

/* ========================================
   TIENDA CONTENT
======================================== */

.tienda-content {
    width: 100%;
}

.tienda-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.tienda-title {
    font-size: 2rem;
    font-weight: 400;
    color: #2c3e50;
    letter-spacing: 1px;
    font-family: 'Cormorant Garamond', serif;
}

.productos-count {
    font-size: 0.95rem;
    color: #666;
}

.productos-count span {
    font-weight: 700;
    color: #C49A6C;
}

/* ========================================
   GRID DE PRODUCTOS
======================================== */

.tienda-content .productos-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    align-items: start;
}

.producto-card,
a.producto-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.producto-card.hidden {
    display: none;
}

.producto-card:hover,
a.producto-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    transform: translateY(-4px);
}

.producto-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f9f6f4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

a.producto-image {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    aspect-ratio: 1;
    background: #f9f6f4;
    overflow: hidden;
}

.producto-image img,
a.producto-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.producto-card:hover .producto-image img,
a.producto-card:hover .producto-image img {
    transform: scale(1.04);
}

.producto-info {
    padding: 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.producto-marca,
.producto-marca-tag {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #C49A6C;
    font-weight: 600;
    display: block;
}

.producto-nombre {
    font-size: 0.92rem;
    color: #2c2c2c;
    font-weight: 500;
    line-height: 1.4;
    font-family: 'Cormorant Garamond', serif;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-nombre a {
    text-decoration: none;
    color: inherit;
}

.producto-descripcion {
    display: none;
}

.producto-precio {
    font-size: 0.88rem;
    color: #888;
    margin-top: 0.15rem;
    font-family: 'Cormorant Garamond', serif;
}

.producto-precio .woocommerce-Price-amount,
.producto-precio bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.btn-comprar,
.producto-card .button.add_to_cart_button,
.producto-card .button,
.producto-card a.button {
    display: block;
    width: calc(100% - 2rem);
    margin: 0.75rem 1rem 1rem;
    padding: 11px;
    background: transparent;
    color: #C96480;
    border: 1.5px solid #C96480;
    border-radius: 2px;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.btn-comprar:hover,
.producto-card .button.add_to_cart_button:hover,
.producto-card .button:hover,
.producto-card a.button:hover {
    background: #C96480;
    color: white;
    transform: none;
    box-shadow: none;
}

.sin-resultados {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.sin-resultados p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-reset {
    padding: 0.875rem 2rem;
    background: #C96480;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #B55570;
}

/* ========================================
   CARRITO MODAL
======================================== */

.carrito-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.carrito-modal.active {
    visibility: visible;
    opacity: 1;
}

.carrito-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.carrito-panel {
    position: absolute;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.carrito-modal.active .carrito-panel {
    right: 0;
}

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #C49A6C 0%, #B88A5F 100%);
}

.carrito-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    letter-spacing: 1px;
}

.btn-cerrar {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.btn-cerrar:hover {
    transform: rotate(90deg);
}

.btn-cerrar svg {
    stroke: white;
}

.carrito-vacio {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 2rem;
}

.carrito-vacio svg {
    stroke: #ddd;
}

.carrito-vacio p {
    font-size: 1.25rem;
    color: #999;
}

.btn-seguir {
    padding: 0.875rem 2rem;
    background: #C96480;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-seguir:hover {
    background: #B55570;
}

.carrito-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: none;
}

.carrito-items.active {
    display: block;
}

.carrito-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.carrito-item:hover {
    background: #fafafa;
}

.item-imagen {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f9 100%);
    border-radius: 6px;
    padding: 0.5rem;
    flex-shrink: 0;
}

.item-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-nombre {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.item-precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: #C96480;
}

.item-cantidad {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-cantidad {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #666;
}

.btn-cantidad:hover {
    border-color: #C96480;
    color: #C96480;
}

.cantidad-numero {
    font-size: 1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.btn-eliminar {
    background: transparent;
    border: none;
    color: #C96480;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.btn-eliminar:hover {
    color: #B55570;
}

.carrito-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}


.carrito-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #666;
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.btn-finalizar {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #C96480 0%, #B55570 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-bottom: 0; /* quitar el margin-bottom que tenía */
}

.btn-finalizar:hover {
    background: linear-gradient(135deg, #B55570 0%, #A04560 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 100, 128, 0.35);
}

.btn-seguir-comprando {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: #C96480;
    border: 2px solid #C96480;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-seguir-comprando:hover {
    background: #C96480;
    color: white;
}

/* ========================================
   FOOTER
======================================== */

.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    color: #C49A6C;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #C49A6C;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #C49A6C;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ========================================
   FILTROS MÓVIL
======================================== */

.filtros-mobile {
    display: none;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-filtro-mobile {
    flex: 1;
    min-width: calc(33.333% - 0.5rem);
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-filtro-mobile:hover {
    border-color: #C96480;
    color: #C96480;
}

.btn-filtro-mobile svg {
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.btn-filtro-mobile.active svg {
    transform: rotate(180deg);
}

.btn-limpiar-mobile {
    padding: 0.75rem 1rem;
    background: transparent;
    color: #C96480;
    border: 2px solid #C96480;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: calc(33.333% - 0.5rem);
}

.btn-limpiar-mobile:hover {
    background: #C96480;
    color: white;
}

/* ========================================
   MODALES DE FILTROS MÓVIL
======================================== */

.filtro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.filtro-modal.active {
    display: flex;
}

.filtro-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.filtro-modal-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.filtro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #C49A6C 0%, #B88A5F 100%);
    border-radius: 16px 16px 0 0;
}

.filtro-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.btn-cerrar-filtro {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.btn-cerrar-filtro:hover {
    transform: rotate(90deg);
}

.btn-cerrar-filtro svg {
    stroke: white;
}

.filtro-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.filtro-modal-body .filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.filtro-modal-body .filter-option:last-child {
    border-bottom: none;
}

.filter-select-mobile {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    color: #555;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-select-mobile:focus {
    outline: none;
    border-color: #C96480;
}

.filtro-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.btn-aplicar-filtro {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #C96480 0%, #B55570 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-aplicar-filtro:hover {
    background: linear-gradient(135deg, #B55570 0%, #A04560 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 100, 128, 0.35);
}

/* ========================================
   STICKY SIDEBAR — WordPress fix
   overflow:hidden en ancestros rompe sticky;
   overflow:clip lo preserva sin scroll lateral
======================================== */

html,
body {
    overflow-x: clip !important;
}

.tienda-main,
.tienda-container,
#page,
#content,
.site-content,
main {
    overflow: visible !important;
}

.tienda-sidebar {
    position: sticky !important;
    top: 90px !important;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: visible;
}

.tienda-sidebar::-webkit-scrollbar { width: 3px; }
.tienda-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1024px) {
    .tienda-container {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }

    .tienda-content .productos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
}

/* ── 768px: igual que style.css para el nav ── */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .tienda-container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tienda-sidebar  { display: none; }
    .filtros-mobile  { display: flex; }
    .tienda-content  { width: 100%; }
    .tienda-header   { margin-bottom: 1rem; }
    .tienda-title    { font-size: 1.5rem; }
    .productos-count { font-size: 0.85rem; }

    .tienda-content .productos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

    .producto-image { height: 200px; padding: 1rem; }
    .producto-info  { padding: 1rem; }

    .footer-content { grid-template-columns: 1fr; text-align: center; }
}

/* ── 640px: menú móvil — EXACTAMENTE igual a style.css ── */
@media (max-width: 640px) {
    .nav {
        display: block !important; /* ← agregar esto */
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        background: white;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        height: calc(100vh - 70px);
        z-index: 999;
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 40px;
        align-items: flex-start;
        display: flex !important;
    }

    .nav li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav li:last-child { border-bottom: none; }

    .nav a {
        display: block;
        padding: 1.2rem 0;
        font-size: 1rem;
        font-weight: 400;
        color: #2c3e50;
    }

    .nav a:hover { color: #C49A6C; padding-left: 1rem; }
}
@media (max-width: 480px) {
    .carrito-botones {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .btn-finalizar,
    .btn-seguir-comprando {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .container        { padding: 0 1rem; }
    .tienda-container { padding: 0 1rem; }
    .tienda-title     { font-size: 1.5rem; }
    .filtros-mobile   { gap: 0.5rem; }

    .btn-filtro-mobile,
    .btn-limpiar-mobile {
        min-width: calc(50% - 0.25rem);
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    .tienda-content .productos-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .producto-image { height: 240px; }
    .carrito-panel  { max-width: 100%; }
}
.carrito-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1.5rem 2rem !important;
}

.btn-finalizar,
.btn-seguir-comprando {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}
/* ====== FIX CARRITO MÓVIL: altura segura + footer sin solapar ====== */
@media (max-width: 600px) {
    .carrito-panel {
        height: 100dvh;          /* evita que la barra del navegador comprima el panel */
        max-width: 100%;
    }
    .carrito-items {
        flex: 1 1 auto;
        min-height: 0;           /* permite que el scroll funcione dentro del flex */
        overflow-y: auto;
    }
    .carrito-footer {
        flex: 0 0 auto;          /* el footer nunca se encoge */
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)) !important;
    }
    .btn-finalizar,
    .btn-seguir-comprando {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* ====== ESTADO AGOTADO ====== */
.producto-card.agotado .producto-image img { opacity: 0.5; filter: grayscale(40%); }
.producto-image { position: relative; }
.badge-agotado {
    position: absolute; top: 10px; left: 10px;
    background: #b55570; color: #fff;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px; border-radius: 4px;
    z-index: 2;
}
.btn-comprar.agotado,
.btn-comprar:disabled {
    background: #d9d9d9 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}
