/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --negro: #0a0a0a;
  --blanco: #ffffff;
  --gris-claro: #f5f5f3;
  --gris-medio: #e0e0e0;
  --gris-texto: #888;
  --acento: #c9a96e;
  --rosa: #FF99CC;
  --rosa-oscuro: #e91e63;
  --admin-card: #ffffff;
  --admin-borde: #ebebeb;
  --sombra: 0 4px 30px rgba(0,0,0,0.08);
  --sombra-hover: 0 12px 40px rgba(0,0,0,0.15);
  --radio: 12px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Montserrat', sans-serif;
}

body { font-family: var(--font-body); background: var(--blanco); color: var(--negro); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { transform:translateY(24px); opacity:0; } to { transform:translateY(0); opacity:1; } }

/* ===== MODALES ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); z-index: 9999; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.25s ease; }
.modal-box { background: var(--blanco); border-radius: 20px; padding: 50px 45px; width: 400px; max-width: 92vw; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,0.25); animation: slideUp 0.3s ease; text-align: center; }
.modal-info-box { padding: 28px; width: 700px; max-width: 94vw; text-align: left; }
.modal-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gris-texto); transition: color 0.2s; z-index: 10; }
.modal-close:hover { color: var(--negro); }
.modal-logo img { height: 56px; margin-bottom: 18px; }
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 26px; }
.input-group { margin-bottom: 13px; }
.modal-input { width: 100%; padding: 14px 18px; border: 1.5px solid var(--gris-medio); border-radius: 10px; font-family: var(--font-body); font-size: 14px; outline: none; transition: border-color 0.2s; background: #fafafa; }
.modal-input:focus { border-color: var(--rosa); background: var(--blanco); }
.login-error { color: #e74c3c; font-size: 12px; margin-bottom: 10px; }
.btn-login { width: 100%; padding: 14px; background: var(--negro); color: var(--blanco); border: none; border-radius: 10px; font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 1.5px; cursor: pointer; transition: background 0.2s, transform 0.15s; margin-top: 6px; }
.btn-login:hover { background: #333; transform: translateY(-1px); }

/* ===== NAVBAR ===== */
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 28px 70px; background: var(--blanco); position: relative; z-index: 100; border-bottom: 1px solid var(--gris-medio); }
.btn-mobile-menu { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--negro); padding: 5px; line-height: 1; }

.btn-close-menu-mobile { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--negro); align-self: flex-end; margin-bottom: 20px; }

.nav-left { display: flex; align-items: center; gap: 28px; transition: 0.3s ease; } 
.nav-link-cats { cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: 2px; color: var(--negro); transition: opacity 0.2s; }
.nav-link-cats:hover { opacity: 0.5; }
.nav-edicion { color: var(--rosa) !important; border-bottom: 1px solid var(--rosa); padding-bottom: 1px; font-weight: 700; font-size: 12px; letter-spacing: 2px; cursor: pointer;}
.nav-edicion:hover { opacity: 0.75 !important; }
.nav-center { position: absolute; left: 50%; transform: translateX(-50%); }
.nav-center img { height: 65px; cursor: pointer; transition: transform 0.2s; }
.nav-center img:hover { transform: scale(1.05); }
.nav-right { display: flex; align-items: center; gap: 25px; }
.icon { width: 24px; height: 24px; cursor: pointer; opacity: 0.8; transition: opacity 0.2s; }
.icon:hover { opacity: 1; }
.btn-logout { background: none; border: 1.5px solid var(--negro); padding: 7px 16px; font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 1px; cursor: pointer; border-radius: 6px; transition: all 0.2s; }
.btn-logout:hover { background: var(--negro); color: var(--blanco); }

/* MEGA MENU */
.mega-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--blanco); padding: 30px 80px; box-shadow: 0 15px 40px rgba(0,0,0,0.08); flex-direction: row; gap: 60px; z-index: 999; border-top: 1px solid var(--gris-medio); }
.mega-menu::before { content: ""; position: absolute; top: -40px; left: 0; width: 100%; height: 40px; background: transparent; }
.nav-left:hover .mega-menu { display: flex; } 
.menu-column p { margin: 8px 0; font-size: 13px; color: var(--gris-texto); cursor: pointer; letter-spacing: 0.5px; transition: color 0.2s; }
.menu-column p:hover { color: var(--negro); }

/* ===== VISUAL BUILDER: OVERLAY EN PREVIEW Y ARRASTRE ===== */
.visual-tools { position: absolute; top: 15px; right: 15px; background: var(--blanco); border: 1px solid var(--negro); padding: 8px 12px; border-radius: 8px; display: flex; gap: 8px; align-items: center; z-index: 50; box-shadow: var(--sombra); }
.visual-tools.inline-tools { position: relative; top: 0; right: 0; border: none; box-shadow: none; background: transparent; padding: 0; }
.visual-tools span { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--rosa); }
.visual-tools button { background: var(--gris-claro); border: 1px solid var(--gris-medio); border-radius: 4px; width: 24px; height: 24px; cursor: pointer; font-weight: bold; transition: 0.2s; display: flex; align-items: center; justify-content: center;}
.visual-tools button:hover { background: var(--rosa); color: var(--blanco); border-color: var(--rosa); }

.sortable-ghost { opacity: 0.4; }
.pannable-media { transition: none !important; }
.pannable-media.draggable-mode { cursor: grab; position: relative; z-index: 10; }
.pannable-media.draggable-mode:active { cursor: grabbing; }
.admin-hint-overlay { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: var(--rosa); color: white; padding: 8px 15px; border-radius: 30px; font-size: 12px; font-weight: 700; z-index: 100; pointer-events: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2); letter-spacing: 1px; opacity: 0; transition: opacity 0.3s; }
.block-media-wrapper:hover .admin-hint-overlay { opacity: 1; }

/* ===== PÁGINA DE CATEGORÍA Y SECCIONES ===== */
.seccion-categorias { padding: 70px 70px 50px; background: var(--blanco); position: relative; }

.categorias-grid { display: flex; gap: 30px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.categorias-grid::-webkit-scrollbar { display: none; }
.categorias-grid { -ms-overflow-style: none; scrollbar-width: none; }

.categoria-card { position: relative; overflow: hidden; cursor: pointer; background: var(--blanco); transition: transform 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; scroll-snap-align: start; }
.categoria-card img { display: block; transition: transform 0.5s ease; pointer-events:none; }
.categoria-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.cat-label { padding: 16px 0; font-weight: 700; letter-spacing: 2.5px; text-align: center; color: var(--negro); width: 100%; }

#seccion-categoria-pagina { background: var(--blanco); min-height: 80vh; }
.categoria-page-header { padding: 40px 70px 20px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border-bottom: none !important; position: relative; }
.pagina-cat-titulo { font-family: var(--font-display); font-size: 40px; font-weight: 400; letter-spacing: 3px; color: var(--negro); text-transform: uppercase; margin-bottom: 20px; margin-top: 0; }

/* FILTROS CLIENTE */
.filtro-cliente-container { position: relative; display: inline-block; margin-top: 0; margin-bottom: 20px; }
.btn-filtro-cliente { background: var(--blanco); border: 1px solid #dcdcdc; padding: 10px 24px; border-radius: 30px; font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 10px; color: #333; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.btn-filtro-cliente:hover { border-color: var(--negro); color: var(--negro); }
.icono-filtro { font-size: 0; display: inline-block; width: 16px; height: 16px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'%3E%3C/line%3E%3Cline x1='4' y1='10' x2='4' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='20' y1='21' x2='20' y2='16'%3E%3C/line%3E%3Cline x1='20' y1='12' x2='20' y2='3'%3E%3C/line%3E%3Cline x1='1' y1='14' x2='7' y2='14'%3E%3C/line%3E%3Cline x1='9' y1='8' x2='15' y2='8'%3E%3C/line%3E%3Cline x1='17' y1='16' x2='23' y2='16'%3E%3C/line%3E%3C/svg%3E"); background-size: cover; background-repeat: no-repeat; color: transparent; }
.menu-filtro-tallas { position: absolute; top: calc(100% + 10px); left: 0; background: var(--blanco); border: 1px solid var(--gris-medio); border-radius: 12px; padding: 20px; box-shadow: var(--sombra); z-index: 100; width: 280px; display: none; opacity: 0; transition: opacity 0.2s; }
.menu-filtro-tallas.active { display: block; opacity: 1; }
.filtro-titulo-menu { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--gris-texto); margin-bottom: 15px; text-transform: uppercase; }
.opciones-tallas-cliente { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.btn-talla-filtro { background: var(--blanco); border: 1px solid var(--gris-medio); padding: 6px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.btn-talla-filtro:hover { border-color: var(--negro); }
.btn-talla-filtro.active { background: var(--negro); color: var(--blanco); border-color: var(--negro); }
.btn-limpiar-filtro { width: 100%; background: none; border: none; font-size: 12px; text-decoration: underline; color: var(--gris-texto); cursor: pointer; padding: 5px 0; }
.btn-limpiar-filtro:hover { color: var(--negro); }

/* GRID DE 5 COLUMNAS EXACTAS EN PC */
.productos-grid-page { padding: 20px 70px 60px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; background: var(--blanco); min-height: 40vh; }

/* ===== CAROUSEL / MINIATURAS PRENDAS ===== */
.seccion-productos-destacados { padding: 60px 70px; background: var(--blanco); position: relative; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.section-subtitle { font-size: 11px; letter-spacing: 3px; color: var(--acento); font-weight: 600; margin-bottom: 5px; }
.section-title { font-family: var(--font-display); font-size: 32px; font-weight: 300; letter-spacing: 2px; margin-right: 15px; }

.productos-carousel-wrapper { position: relative; }

.productos-carousel { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; transition: transform 0.4s ease; }
.productos-carousel::-webkit-scrollbar { display: none; }
.productos-carousel { -ms-overflow-style: none; scrollbar-width: none; }

.producto-card { background: var(--blanco); border-radius: 8px; overflow: hidden; cursor: pointer; transition: box-shadow 0.3s; position: relative; flex: 0 0 auto; scroll-snap-align: start; }
.producto-card:hover { box-shadow: var(--sombra-hover); }

/* AJUSTES DINÁMICOS DE IMAGEN SIN BORDES GRISES NI RELLENOS */
.producto-img { width: 100%; overflow: hidden; background: transparent; display: flex; align-items: center; justify-content: center; position: relative; border-radius: 8px; }
.producto-img img { position: absolute; top:0; left:0; width: 100%; height: 100%; display: block; transition: opacity 0.5s ease, transform 0.5s ease; padding: 0; border-radius: 8px; } 

.img-secundaria { opacity: 0; }
.producto-card:hover .img-secundaria { opacity: 1; }
.producto-card:not(.has-secundaria):hover .img-principal { transform: scale(1.05); } 
.producto-card.has-secundaria:hover .img-principal { opacity: 0; }

/* NUEVA REGLA: BLOQUEAR HOVER SI EL MODO ENCUADRE ESTÁ ACTIVO */
body.modo-encuadre-activo .producto-card .img-secundaria { opacity: 0 !important; }
body.modo-encuadre-activo .producto-card .img-principal { opacity: 1 !important; transform: none !important; }

/* Info alineada a la izquierda y sin relleno a los lados */
.producto-info { padding: 14px 0px; text-align: left; } 
.producto-nombre { margin-bottom: 3px; }

.carousel-btn { position: absolute; top: 42%; transform: translateY(-50%); background: var(--blanco); border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.12); z-index: 10; transition: box-shadow 0.2s; display: flex; align-items: center; justify-content: center; }
.carousel-btn:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.carousel-next { right: -14px; }
.carousel-prev { left: -14px; }

/* ===== PÁGINA DETALLE DE PRODUCTO (PDP) ===== */
#seccion-producto-detalle { background: var(--blanco); min-height: 80vh; padding-bottom: 60px; }
.pdp-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 50px 70px; max-width: 1300px; margin: 0 auto; align-items: start; }

/* Carrusel Izquierda PDP */
.pdp-images { position: relative; width: 100%; }
.pdp-carousel-wrapper { position: relative; width: 100%; overflow: hidden; border-radius: 12px; background: transparent; }
.pdp-main-img-container { width: 100%; height: 100%; }
.pdp-main-img-container img { width: 100%; height: 100%; padding: 0;}
.pdp-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--negro); font-size: 35px; text-shadow: 0 2px 6px rgba(255,255,255,0.4); cursor: pointer; z-index: 10; transition: transform 0.2s; padding: 0 15px; }
.pdp-arrow:hover { transform: translateY(-50%) scale(1.1); }
.pdp-prev { left: 0; }
.pdp-next { right: 0; }
.pdp-thumbnails { display: flex; gap: 10px; margin-top: 15px; justify-content: center; }
.pdp-thumb { width: 60px; height: 80px; object-fit: cover; cursor: pointer; border-radius: 6px; opacity: 0.6; transition: opacity 0.2s; border: 2px solid transparent; background: transparent; padding: 0;}
.pdp-thumb:hover { opacity: 1; }
.pdp-thumb.active { opacity: 1; border-color: var(--negro); }

/* Info Derecha PDP */
.pdp-info { display: flex; flex-direction: column; }
.pdp-precio-txt { margin-top: 5px; margin-bottom: 30px; }

.pdp-tallas-section { margin-bottom: 30px; }
.pdp-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--gris-texto); margin-bottom: 12px; text-transform: uppercase;}
.pdp-tallas-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.pdp-size-chip { border: 1.5px solid var(--negro); background: var(--blanco); color: var(--negro); border-radius: 20px; padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.pdp-size-chip:hover:not(.agotada) { border-color: var(--rosa-oscuro); color: var(--rosa-oscuro); }
.pdp-size-chip.selected { background: var(--rosa-oscuro); color: var(--blanco); border-color: var(--rosa-oscuro); }
.pdp-size-chip.agotada { opacity: 0.3; text-decoration: line-through; cursor: not-allowed; border-color: var(--gris-medio); color: var(--gris-texto); }

.pdp-acciones { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.btn-pdp { width: 100%; padding: 18px; border-radius: 8px; font-weight: 700; font-size: 14px; letter-spacing: 1.5px; cursor: pointer; transition: all 0.3s; text-align: center; }
.btn-pdp-fav { background: var(--blanco); color: var(--negro); border: 2px solid var(--negro); }
.btn-pdp-fav:hover { background: var(--gris-claro); }

.btn-pdp-cart { background: var(--rosa); color: var(--negro); border: 2px solid var(--rosa); }
.btn-pdp-cart:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 153, 204, 0.4); border-color: var(--rosa); }

.pdp-descripcion { font-size: 14px; line-height: 1.8; color: #444; border-top: 1px solid var(--gris-medio); padding-top: 25px; }

/* ===== FOOTER ROSADO ===== */
.footer { background: var(--rosa); color: var(--blanco); padding: 60px 70px 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-logo { height: 50px; filter: brightness(0) invert(1); margin-bottom: 15px; display: block; }
.footer-desc { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.9); }
.footer-col h4 { font-size: 11px; letter-spacing: 2.5px; font-weight: 700; color: var(--blanco); margin-bottom: 20px; }
.footer-col p { font-size: 13px; color: rgba(255,255,255,0.9); margin-bottom: 10px; }
.footer-link-p { cursor: pointer; transition: opacity 0.2s; }
.footer-link-p:hover { opacity: 0.75; text-decoration: underline; }
.footer-social-link { color: rgba(255,255,255,0.9); text-decoration: none; transition: opacity 0.2s; }
.footer-social-link:hover { opacity: 0.75; text-decoration: underline; }
.footer-pagos { display: flex; flex-wrap: wrap; gap: 8px; }
.pago-badge { background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.45); padding: 5px 13px; border-radius: 20px; font-size: 11px; color: var(--blanco); font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.3); padding-top: 25px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,0.8); }
.icono-admin-oculto { width: 14px; height: 14px; opacity: 0.18; cursor: pointer; transition: opacity 0.3s; filter: brightness(0) invert(1); }
.icono-admin-oculto:hover { opacity: 0.6; }

/* ===== DRAWERS (CARRITO Y FAVORITOS) REDISEÑADOS ===== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: none; opacity: 0; transition: opacity 0.3s; }
.drawer-overlay.active { display: block; opacity: 1; }
.drawer-panel { position: fixed; top: 0; right: -450px; width: 450px; max-width: 100vw; height: 100vh; height: 100dvh; background: white; z-index: 10000; box-shadow: -10px 0 40px rgba(0,0,0,0.1); display: flex; flex-direction: column; transition: right 0.3s ease; }
.drawer-panel.active { right: 0; }
.drawer-header { padding: 25px; border-bottom: 1px solid var(--gris-medio); display: flex; justify-content: space-between; align-items: center; }
.drawer-header h3 { font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.btn-close-drawer { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gris-texto); transition: color 0.2s; }
.btn-close-drawer:hover { color: var(--negro); }
.drawer-content { flex: 1; overflow-y: auto; padding: 25px; }
.drawer-footer { padding: 25px; border-top: 1px solid var(--gris-medio); background: #fafafa; padding-bottom: max(25px, env(safe-area-inset-bottom)); }

.icon-container { position: relative; cursor: pointer; display: inline-block; margin-left: 10px; }
.icon-counter { position: absolute; top: -8px; right: -10px; background: var(--rosa); color: white; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; pointer-events: none; }

.cart-item, .fav-item { display: flex; gap: 15px; margin-bottom: 25px; align-items: stretch; position: relative; border-bottom: 1px solid var(--gris-claro); padding-bottom: 20px; }
.cart-item:last-child, .fav-item:last-child { border-bottom: none; padding-bottom: 0; }
.cart-item-img, .fav-item-img { width: 90px; height: 120px; object-fit: cover; border-radius: 6px; background: transparent; padding: 0; }
.cart-item-info, .fav-item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

.cart-item-header { display: flex; justify-content: space-between; align-items: flex-start; }
.cart-item-name, .fav-item-name { font-weight: 600; font-size: 15px; line-height: 1.3; max-width: 85%; }
.btn-remove-item { background: none; border: none; font-size: 16px; color: var(--gris-texto); cursor: pointer; padding: 0 0 5px 5px; line-height: 1; transition: color 0.2s;}
.btn-remove-item:hover { color: #e74c3c; }

.cart-item-desc, .fav-item-desc { font-size: 13px; color: var(--gris-texto); margin-top: 4px; }
.cart-item-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.cart-item-price, .fav-item-price { font-weight: 700; font-size: 15px; }

.quantity-selector { display: flex; align-items: center; gap: 10px; border: 1px solid var(--gris-medio); border-radius: 4px; width: fit-content; padding: 2px 8px; }
.btn-qty { background: none; border: none; width: 24px; height: 28px; cursor: pointer; font-size: 16px; color: var(--gris-texto); transition: color 0.2s;}
.btn-qty:hover { color: var(--negro); }
.qty-value { font-weight: 600; font-size: 13px; min-width: 20px; text-align: center; }

.cart-empty { text-align: center; color: var(--gris-texto); padding-top: 40px; font-size: 14px; }
.cart-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 16px; }
.cart-summary strong { font-size: 20px; font-weight: 600; }

.btn-checkout { width: 100%; background: var(--rosa); color: var(--negro); border: none; padding: 18px; border-radius: 8px; font-weight: 700; font-size: 15px; letter-spacing: 1px; cursor: pointer; transition: 0.3s; }
.btn-checkout:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 153, 204, 0.4); }

.btn-fav-to-cart { display: none; }

.stock-agotado { opacity: 0.5; filter: grayscale(50%); }
.agotado-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: white; padding: 6px 14px; border-radius: 4px; font-weight: 700; font-size: 11px; letter-spacing: 2px; pointer-events: none; z-index: 5; }

/* ===== PANEL ADMIN ===== */
#seccion-edicion { min-height: 100vh; background: var(--gris-claro); padding-bottom: 50px; } 
.admin-panel { max-width: 1100px; margin: 0 auto; padding: 60px 40px; }
.admin-titulo { font-family: var(--font-display); font-size: 40px; font-weight: 300; margin-bottom: 6px; }
.admin-subtitle { font-size: 12px; letter-spacing: 2px; color: var(--gris-texto); margin-bottom: 38px; }

/* NUEVAS CLASES LAYOUT ADMIN PARA MOBILE */
.admin-header-mobile { display:flex; justify-content: space-between; align-items:center; margin-bottom: 6px; }
.admin-botones-mobile { display:flex; gap:10px; }
.filtros-header-mobile { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.filtros-inputs-mobile { display:flex; gap: 10px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.filtros-inputs-mobile input, .filtros-inputs-mobile select { width: auto; margin-bottom: 0; min-width: 140px;}

.admin-tabs { display: flex; gap: 4px; margin-bottom: 32px; border-bottom: 2px solid var(--admin-borde); }
.admin-tab { background: none; border: none; padding: 13px 22px; font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.5px; cursor: pointer; color: var(--gris-texto); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.admin-tab:hover { color: var(--negro); }
.admin-tab.active { color: var(--negro); border-bottom-color: var(--negro); }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }
.tab-title { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin-bottom: 5px; }
.tab-desc { font-size: 13px; color: var(--gris-texto); margin-bottom: 26px; }

.admin-card { background: var(--admin-card); border: 1px solid var(--admin-borde); border-radius: var(--radio); padding: 26px 30px; margin-bottom: 20px; box-shadow: var(--sombra); }
.admin-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 7px; }
.input-hint { font-size: 12px; color: #aaa; margin-bottom: 14px; line-height: 1.5; }
.radio-group { display: flex; gap: 20px; margin-bottom: 16px; }
.radio-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; font-weight: 500; }
.admin-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--admin-borde); border-radius: 8px; font-family: var(--font-body); font-size: 13px; outline: none; background: #fafafa; transition: border-color 0.2s; margin-bottom: 12px; }
.admin-input:focus { border-color: var(--rosa); background: var(--blanco); }
.admin-select { appearance: auto; cursor: pointer; }
.btn-admin { background: var(--negro); color: var(--blanco); border: none; padding: 12px 28px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; cursor: pointer; border-radius: 8px; transition: all 0.2s; }
.btn-admin:hover { background: #333; transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 11px; }

/* BUSCADOR DESPLEGABLE */
.dropdown-item { padding: 10px 15px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--admin-borde); transition: background 0.2s; color: var(--negro); }
.dropdown-item:hover { background: var(--gris-claro); }
.dropdown-item:last-child { border-bottom: none; }

/* BLOQUES */
.bloque-tipos { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.btn-bloque { background: var(--gris-claro); border: 1.5px solid var(--admin-borde); padding: 10px 17px; border-radius: 8px; font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; letter-spacing: 0.5px; }
.btn-bloque:hover { border-color: var(--negro); background: var(--blanco); }
.lista-bloques { display: flex; flex-direction: column; gap: 14px; }
.bloque-item { background: var(--blanco); border: 1.5px solid var(--admin-borde); border-radius: 10px; padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; animation: slideUp 0.25s ease; position: relative; }
.bloque-header { display: flex; justify-content: space-between; align-items: center; background: #fafafa; margin: -18px -22px 10px -22px; padding: 10px 22px; border-bottom: 1px solid var(--admin-borde); border-radius: 10px 10px 0 0; }
.bloque-tipo-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--rosa); text-transform: uppercase; }
.btn-eliminar { background: none; border: 1px solid #e0e0e0; padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; color: #999; transition: all 0.2s; }
.btn-eliminar:hover { border-color: #e74c3c; background: #e74c3c; color: #fff; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }

/* STOCK TALLAS/COLORES */
.seccion-stock { background: var(--gris-claro); border: 1px solid var(--admin-borde); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.seccion-stock h4 { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.stock-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; min-height: 8px; }
.stock-chip { display: flex; align-items: center; gap: 8px; background: var(--blanco); border: 1.5px solid var(--admin-borde); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.stock-chip .chip-qty { background: var(--negro); color: var(--blanco); border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.stock-chip .chip-del { cursor: pointer; color: #ccc; font-size: 13px; transition: color 0.2s; background: none; border: none; padding: 0; line-height: 1; }
.stock-chip .chip-del:hover { color: #e74c3c; }
.stock-agregar-row { display: flex; gap: 10px; align-items: center; }

/* CATEGORÍAS Y PRENDAS ADMIN */
.grid-categorias-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px; margin-top: 16px; }
.cat-admin-card { background: var(--gris-claro); border: 1.5px solid var(--admin-borde); border-radius: 10px; overflow: hidden; text-align: center; position: relative; }
.cat-admin-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.cat-admin-info { padding: 12px; }
.cat-admin-info span { font-size: 12px; font-weight: 600; letter-spacing: 1px; display: block; margin-bottom: 8px; }
.btn-cat-accion { background: none; border: 1px solid var(--admin-borde); padding: 4px 12px; font-size: 11px; border-radius: 6px; cursor: pointer; color: var(--gris-texto); transition: all 0.2s; margin: 2px; }
.btn-cat-accion:hover { border-color: var(--negro); color: var(--negro); }
.btn-cat-accion.danger:hover { border-color: #e74c3c; color: #e74c3c; }
.btn-cat-accion.edit:hover { border-color: #3498db; color: #3498db; }

.grid-prendas-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 16px; margin-top: 16px; }
.prenda-admin-card { background: var(--gris-claro); border: 1.5px solid var(--admin-borde); border-radius: 10px; overflow: hidden; position: relative; }
.prenda-admin-img { width: 100%; height: 160px; object-fit: cover; display: block; background: transparent; }
.prenda-sin-img { width: 100%; height: 160px; background: var(--gris-claro); display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 12px; }
.prenda-admin-info { padding: 13px 14px; }
.prenda-admin-info strong { font-size: 13px; display: block; margin-bottom: 3px; }
.prenda-admin-info span { font-size: 12px; color: var(--gris-texto); display: block; margin-bottom: 2px; }
.prenda-admin-acciones { display: flex; gap: 8px; margin-top: 10px; }
.btn-prenda-accion { flex: 1; background: none; border: 1px solid var(--admin-borde); padding: 5px; font-size: 11px; border-radius: 6px; cursor: pointer; color: var(--gris-texto); transition: all 0.2s; font-family: var(--font-body); }
.btn-prenda-accion:hover { border-color: var(--negro); color: var(--negro); }
.btn-prenda-accion.danger:hover { border-color: #e74c3c; color: #e74c3c; }
.btn-prenda-accion.edit:hover { border-color: #3498db; color: #3498db; }

.badge-oculto { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.7); color: white; padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 1px; z-index: 5; pointer-events: none; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.toggle-switch input:checked + .toggle-slider { background-color: #27ae60; }
.toggle-switch input:focus + .toggle-slider { box-shadow: 0 0 1px #27ae60; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* CONTROLES DE ESTILO POR BLOQUE */
.estilo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; margin-bottom: 8px; }
.estilo-campo { display: flex; flex-direction: column; gap: 5px; }
.estilo-label { font-size: 11px; font-weight: 600; color: #777; letter-spacing: 0.3px; }

/* TOAST */
.toast { position: fixed; bottom: 28px; right: 28px; background: var(--negro); color: var(--blanco); padding: 13px 22px; border-radius: 10px; font-size: 13px; font-weight: 500; z-index: 99999; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: slideUp 0.3s ease; }
.toast.exito { background: #27ae60; }
.toast.error { background: #e74c3c; }
.toast.info { background: #3498db; }

/* ===== MODO PREVISUALIZACION (RECUADRO) ===== */
body.modo-preview { background: rgba(0, 0, 0, 0.85); height: 100vh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body.modo-preview #navbar { display: flex !important; width: 90vw; border-radius: 12px 12px 0 0; position: relative; z-index: 10001; }
body.modo-preview #seccion-principal, body.modo-preview #seccion-categoria-pagina, body.modo-preview #seccion-producto-detalle { width: 90vw; height: calc(90vh - 80px); background: white; border-radius: 0 0 12px 12px; overflow-y: auto; position: relative; box-shadow: 0 15px 50px rgba(0,0,0,0.6); display: block !important; }
body.modo-preview.viendo-categoria #seccion-principal, body.modo-preview.viendo-categoria #seccion-producto-detalle { display: none !important; }
body.modo-preview.viendo-producto #seccion-principal, body.modo-preview.viendo-producto #seccion-categoria-pagina { display: none !important; }
body.modo-preview:not(.viendo-categoria):not(.viendo-producto) #seccion-categoria-pagina, body.modo-preview:not(.viendo-categoria):not(.viendo-producto) #seccion-producto-detalle { display: none !important; }
body.modo-preview #seccion-edicion { display: none !important; }
.btn-cerrar-preview { position: fixed; top: 20px; right: 30px; background: var(--rosa); color: white; border: none; padding: 12px 24px; border-radius: 30px; font-family: var(--font-body); font-weight: 700; cursor: pointer; z-index: 100000; box-shadow: 0 5px 15px rgba(0,0,0,0.3); font-size: 14px; letter-spacing: 1px; transition: all 0.2s; }
.btn-cerrar-preview:hover { background: #ff77b3; transform: scale(1.05); }

/* ===== FILTROS PANEL DE VENTAS ===== */
.filtros-pedidos { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-filtro { background: var(--blanco); border: 1.5px solid var(--admin-borde); padding: 6px 14px; font-size: 11px; font-weight: 600; border-radius: 20px; cursor: pointer; color: var(--gris-texto); transition: all 0.2s; font-family: var(--font-body); }
.btn-filtro:hover { border-color: var(--negro); color: var(--negro); }
.btn-filtro.active { background: var(--negro); color: var(--blanco); border-color: var(--negro); }

/* CHECKBOX BORRAR PEDIDOS */
.delete-checkbox-container { margin-right: 15px; display: none; }
.delete-checkbox-container.visible { display: flex; align-items: center; }
.delete-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: #e74c3c; }

/* CHECKBOX SELECCIÓN MÚLTIPLE (BULK) */
.bulk-checkbox-container { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.95); border-radius: 6px; padding: 5px; z-index: 10; display: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.bulk-checkbox-container.visible { display: block; animation: fadeIn 0.2s ease; }
.bulk-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: #3498db; margin: 0; display: block; }


/* ========================================================================= */
/* MEDIA QUERIES (RESPONSIVE PARA MÓVILES Y TABLETS)                         */
/* ========================================================================= */

/* TABLETS (MÁS DE 768px PERO MENOS DE 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .productos-grid-page { grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 30px 40px; }
  .pdp-container { gap: 30px; padding: 40px; }
}

/* CELULARES (MENOS DE 768px) */
@media (max-width: 768px) {
  
  /* Navbar y Menú */
  .navbar { padding: 15px 20px; }
  .nav-center img { height: 45px; }
  .btn-mobile-menu { display: block; } 
  .btn-close-menu-mobile { display: block; } 
  
  .nav-left { position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; height: 100dvh; background: var(--blanco); flex-direction: column; align-items: flex-start; padding: 40px 30px; box-shadow: 5px 0 20px rgba(0,0,0,0.1); z-index: 10000; gap: 20px; }
  .nav-left.active { left: 0; }
  .nav-link-cats, .nav-edicion { font-size: 16px; width: 100%; border-bottom: 1px solid var(--gris-claro); padding-bottom: 15px; margin-bottom: 5px;}
  
  .mega-menu { display: flex !important; position: static; box-shadow: none; padding: 0; border: none; flex-direction: column; gap: 15px; background: transparent; width: 100%;}
  .mega-menu::before { display: none; }
  .menu-column p { font-size: 15px; padding: 12px 0; border-bottom: 1px solid var(--gris-claro); margin: 0; width: 100%;}

  /* Secciones y Bloques */
  .seccion-categorias, .seccion-productos-destacados { padding: 40px 10px; }
  .section-title { font-size: 26px; }
  .categoria-page-header { padding: 30px 15px 10px; }
  
  .categoria-card { width: 60vw !important; max-width: 250px; } 

  /* AJUSTE MAGISTRAL DE GRID PARA CELULARES: 2 COLUMNAS PERFECTAS */
  .productos-grid-page { 
    grid-template-columns: repeat(2, 1fr); 
    padding: 10px 10px 40px; 
    gap: 8px; 
  }
  
  /* Hacemos que el carrusel también se vea de a dos prendas y ajustamos información */
  .producto-card { width: 100% !important; min-width: unset !important; }
  .producto-info { padding: 10px 0px; text-align: left; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px;}

  /* AJUSTE PARA VIDEOS/IMÁGENES EN CELULAR (IGNORA LA ALTURA FIJA) */
  .block-media-wrapper { 
    height: auto !important; 
    aspect-ratio: 4/5; /* Proporción ideal para celular (Vertical tipo Instagram) */
  }

  /* Detalle de Producto (PDP) */
  .pdp-container { grid-template-columns: 1fr; padding: 20px 15px; gap: 25px; }
  .pdp-thumbnails { overflow-x: auto; padding-bottom: 10px; justify-content: flex-start; }
  
  /* Footer */
  .footer { padding: 40px 20px 20px; margin-top: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .footer-logo { margin: 0 auto 15px; }
  .footer-pagos { justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }

  /* Modales y Drawers */
  .modal-box { padding: 30px 25px; }
  .drawer-panel { width: 100%; right: -100%; height: 100dvh; } 
  .drawer-panel.active { right: 0; }
  
  /* Ajustes Panel Admin Mobile */
  .admin-panel { padding: 30px 15px; }
  .admin-header-mobile { flex-direction: column; align-items: flex-start; gap: 15px; }
  .admin-botones-mobile { width: 100%; flex-wrap: wrap; }
  .admin-botones-mobile button { flex: 1; min-width: 100px; padding: 12px 10px; font-size: 11px; }

  .filtros-header-mobile { flex-direction: column; align-items: flex-start; }
  .filtros-inputs-mobile { width: 100%; justify-content: flex-start; flex-direction: column; gap: 8px; }
  .filtros-inputs-mobile input, .filtros-inputs-mobile select { width: 100% !important; }

  .admin-tabs { flex-wrap: wrap; }
  .admin-tab { flex: 1 1 40%; text-align: center; padding: 10px; font-size: 11px; }
  .form-row, .form-grid, .estilo-grid { grid-template-columns: 1fr; }
  .bloque-header { flex-direction: column; gap: 10px; align-items: flex-start; }
  .grid-categorias-admin, .grid-prendas-admin { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .prenda-admin-img { height: 120px; }
}