/* ============================================================
   ENTRETELAS — CSS CLIENTE (pagina-aut2.html)
   Estilos específicos del catálogo público y vista de usuario.
   Requiere que comun.css esté cargado previamente.
============================================================ */


/* NAV */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 0 60px; height: 72px; background: white; border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 200; }
.navbar-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; letter-spacing: 2px; display: flex; align-items: center; }
.navbar-right { display: flex; align-items: center; gap: 28px; }
.navbar-links { display: flex; gap: 24px; }
.navbar-links a { text-decoration: none; color: var(--gris); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.5px; transition: color 0.2s; cursor: pointer; }
.navbar-links a:hover { color: var(--terracota); }

/* CARRITO */
.cart-btn { background: none; border: none; cursor: pointer; position: relative; font-size: 1.4rem; color: var(--texto); padding: 4px; transition: color 0.2s; }
.cart-btn:hover { color: var(--terracota); }
.cart-badge { position: absolute; top: -4px; right: -6px; background: var(--terracota); color: white; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'DM Sans', sans-serif; }
.cart-badge.hidden { display: none; }

/* BANNER */
.banner { background: var(--terracota); color: white; padding: 10px 60px; display: flex; align-items: center; font-size: 0.88rem; }

/* HERO */
.hero { display: flex; align-items: stretch; padding: 24px 60px 0 60px; gap: 32px; min-height: 320px; background: var(--crema); position: relative; z-index: 1; }
.hero-left { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0 40px 0; }
.hero-eyebrow { font-size: 0.78rem; letter-spacing: 3px; text-transform: uppercase; color: var(--terracota); margin-bottom: 14px; font-weight: 500; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: 2.4rem; line-height: 1.2; margin-bottom: 10px; }
.hero p { color: var(--gris); font-size: 0.95rem; margin-bottom: 28px; }
.search-container { display: flex; gap: 0; max-width: 480px; }
.search-input { padding: 13px 20px; width: 100%; border: 1px solid var(--borde); border-right: none; border-radius: 6px 0 0 6px; font-size: 0.95rem; font-family: 'DM Sans', sans-serif; outline: none; background: white; }
.search-input:focus { border-color: var(--terracota); }
.btn-search { background: var(--terracota); color: white; border: none; padding: 13px 24px; border-radius: 0 6px 6px 0; font-size: 0.95rem; cursor: pointer; font-family: 'DM Sans', sans-serif; font-weight: 500; transition: background 0.2s; white-space: nowrap; }
.btn-search:hover { background: var(--terracota-oscuro); }

.hero-mapa-wrap { flex: 1; position: relative; overflow: hidden; cursor: pointer; min-height: 300px; border-radius: 16px 16px 0 0; border: 1px solid var(--borde); border-bottom: none; box-shadow: 0 -4px 24px rgba(0,0,0,0.08); margin-top: 8px; }
#mapa-mini { width: 100%; height: 100%; pointer-events: none; }

.mapa-screensaver { position: absolute; inset: 0; z-index: 5; background: linear-gradient(135deg, #2A1810 0%, #4A2C1A 40%, #A64B2A 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity 0.4s ease; pointer-events: all; opacity: 1; }
.mapa-screensaver.oculto { opacity: 0; pointer-events: none; }
.mapa-screensaver-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: 0.45; }
.mapa-screensaver-content { position: relative; z-index: 2; text-align: center; color: white; }
.mapa-screensaver-content h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 6px; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.mapa-screensaver-content p { font-size: 0.85rem; opacity: 0.85; text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
.mapa-screensaver-pulse { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; position: relative; z-index: 2; animation: pulse-ring 2s ease-in-out infinite; }
@keyframes pulse-ring { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4),0 0 0 0 rgba(255,255,255,0.2); } 50% { box-shadow: 0 0 0 14px rgba(255,255,255,0),0 0 0 28px rgba(255,255,255,0); } }
.hero-mapa-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 24px; background: linear-gradient(to top, rgba(20,10,4,0.35) 0%, transparent 60%); z-index: 6; pointer-events: none; }
.btn-expandir-mapa { pointer-events: all; background: white; color: var(--texto); border: none; padding: 10px 22px; border-radius: 30px; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.18); transition: background 0.2s, color 0.2s; display: flex; align-items: center; gap: 6px; }
.btn-expandir-mapa:hover { background: var(--terracota); color: white; }

.mapa-fullscreen { position: fixed; z-index: 800; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.35); display: none; flex-direction: column; opacity: 0; pointer-events: none; }
.mapa-fullscreen.open { opacity: 1; pointer-events: all; border-radius: 0; inset: 0; }
.mapa-fs-header { background: white; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--borde); flex-shrink: 0; }
.mapa-fs-header h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; }
.mapa-fs-body { flex-grow: 1; display: flex; overflow: hidden; }
.mapa-fs-panel { width: 300px; flex-shrink: 0; background: white; border-right: 1px solid var(--borde); display: flex; flex-direction: column; overflow: hidden; }
.mapa-fs-panel-header { padding: 14px 18px; border-bottom: 1px solid var(--borde); font-size: 0.85rem; color: var(--gris); }
.mapa-fs-lista { flex-grow: 1; overflow-y: auto; }
.mapa-fs-lista .mapa-tienda-item { padding: 10px 16px; }
.mapa-fs-btns { padding: 14px 18px; border-top: 1px solid var(--borde); display: flex; flex-direction: column; gap: 8px; }
#mapa-grande { flex-grow: 1; }
.mapa-cargando { position: absolute; inset: 0; background: rgba(255,255,255,0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gris); z-index: 10; gap: 12px; font-size: 0.9rem; }

/* MAIN */
.main-content { display: flex; padding: 40px 60px; gap: 36px; align-items: flex-start; }
.filters { width: 210px; flex-shrink: 0; background: white; border: 1px solid var(--borde); border-radius: 12px; padding: 18px; position: sticky; top: 80px; }
.filter-search-wrap { position: relative; margin-bottom: 16px; }
.filter-search-input { width: 100%; padding: 9px 34px 9px 12px; border: 1px solid var(--borde); border-radius: 6px; font-size: 0.85rem; font-family: 'DM Sans', sans-serif; outline: none; background: var(--crema); color: var(--texto); transition: border 0.2s; }
.filter-search-input:focus { border-color: var(--terracota); }
.filter-search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--gris); font-size: 0.88rem; pointer-events: none; }
.filters-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.filters-header span { font-family: 'Playfair Display', serif; font-size: 0.95rem; }
.btn-clear { background: none; border: none; color: var(--gris); cursor: pointer; font-size: 0.75rem; text-decoration: underline; font-family: 'DM Sans', sans-serif; }
.filter-tags { display: flex; flex-direction: column; gap: 5px; }
.tag { border: 1px solid var(--borde); padding: 7px 11px; border-radius: 5px; background: var(--crema); cursor: pointer; font-size: 0.83rem; font-family: 'DM Sans', sans-serif; text-align: left; transition: all 0.2s; color: var(--texto); }
.tag:hover { border-color: var(--terracota); color: var(--terracota); background: white; }
.tag.active { background: var(--terracota); color: white; border-color: var(--terracota); }

.stores-list { flex-grow: 1; min-width: 0; }
.section-title { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title span:first-child { font-family: 'Playfair Display', serif; font-size: 1.3rem; }
.section-title span:last-child { color: var(--gris); font-size: 0.85rem; }
#stores-container { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: auto; gap: 22px; }

.store-card { background: white; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; transition: box-shadow 0.25s, transform 0.25s; }
.store-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); transform: translateY(-3px); }
.store-image { width: 100%; height: 180px; object-fit: cover; background: #eee; display: block; }
.store-body { padding: 16px 18px 18px; }
.store-cat-badge { display: inline-block; background: #F5EDE6; color: var(--terracota); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
.store-body h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 5px; }
.store-location { color: var(--gris); font-size: 0.83rem; margin-bottom: 3px; }
.store-phone { color: var(--terracota); font-size: 0.83rem; font-weight: 500; margin-bottom: 14px; }
.btn-view-store { width: 100%; background: var(--texto); color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; font-weight: 500; transition: background 0.2s; }
.btn-view-store:hover { background: var(--terracota); }

.producto-destacado { grid-row: span 2; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; background: #1a1008; transition: box-shadow 0.25s, transform 0.25s; }
.producto-destacado:hover { box-shadow: 0 10px 36px rgba(0,0,0,0.2); transform: translateY(-3px); }
.producto-destacado img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.78; transition: opacity 0.3s; position: absolute; top: 0; left: 0; }
.producto-destacado:hover img { opacity: 0.6; }
.producto-destacado-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 20px; background: linear-gradient(to top, rgba(20,10,4,0.92) 0%, rgba(20,10,4,0.1) 100%); color: white; z-index: 2; }
.prod-dest-badge { display: inline-block; background: var(--terracota); color: white; font-size: 0.67rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
.producto-destacado-info h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; margin-bottom: 3px; line-height: 1.3; }
.pd-detalle { font-size: 0.78rem; opacity: 0.82; margin-bottom: 14px; }
.btn-pd { background: white; color: var(--texto); border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 0.83rem; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: background 0.2s, color 0.2s; }
.btn-pd:hover { background: var(--terracota); color: white; }

.loading { text-align: center; padding: 60px 20px; color: var(--gris); grid-column: 1 / -1; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--borde); border-top-color: var(--terracota); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

.slider-wrapper { grid-column: 1 / -1; border-radius: 12px; overflow: hidden; position: relative; height: 340px; background: #1a1008; box-shadow: 0 6px 28px rgba(0,0,0,0.13); }
.slider-track { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(0.77,0,0.175,1); }
.slider-slide { min-width: 100%; height: 100%; position: relative; flex-shrink: 0; }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.72; }
.slider-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 32px; background: linear-gradient(to top, rgba(20,10,4,0.85) 0%, transparent 100%); color: white; }
.slider-badge { display: inline-block; background: var(--terracota); color: white; font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
.slider-info h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.slider-info p { font-size: 0.88rem; opacity: 0.85; margin-bottom: 14px; }
.slider-btn-ver { background: white; color: var(--texto); border: none; padding: 9px 22px; border-radius: 6px; cursor: pointer; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: background 0.2s, color 0.2s; }
.slider-btn-ver:hover { background: var(--terracota); color: white; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.18); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.3); color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 10; }
.slider-arrow:hover { background: rgba(255,255,255,0.35); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots { position: absolute; bottom: 16px; right: 32px; display: flex; gap: 6px; z-index: 10; }
.slider-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: background 0.3s, transform 0.3s; border: none; }
.slider-dot.active { background: white; transform: scale(1.3); }
.slider-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--terracota); width: 0%; transition: width 7s linear; z-index: 10; }

.modal-overlay { display: none; position: fixed; z-index: 300; left: 0; top: 0; width: 100%; height: 100%; background: rgba(30,20,10,0.65); justify-content: center; align-items: center; padding: 20px; }
.modal-box { background: white; border-radius: 14px; width: 100%; max-width: 780px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 28px 32px 20px; border-bottom: 1px solid var(--borde); position: sticky; top: 0; background: white; z-index: 10; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-header h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--texto); }
.modal-header p { color: var(--gris); font-size: 0.88rem; margin-top: 4px; }
.close-btn { background: none; border: none; font-size: 1.4rem; color: var(--gris); cursor: pointer; padding: 4px; line-height: 1; margin-left: 16px; flex-shrink: 0; }
.close-btn:hover { color: var(--texto); }
.modal-body { padding: 28px 32px; }

#prendas-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.prenda-card { border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s, transform 0.15s; cursor: pointer; position: relative; }
.prenda-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); transform: translateY(-2px); }
.prenda-img { width: 100%; height: 180px; object-fit: cover; background: #f0ebe4; display: block; }
.img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #f0ebe4, #e8ddd4); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--gris); }
.prenda-info { padding: 12px 14px 14px; }
.prenda-nombre { font-weight: 500; font-size: 0.9rem; margin-bottom: 4px; }
.prenda-precio { color: var(--terracota); font-weight: 600; font-size: 1rem; margin-bottom: 8px; }
.btn-seleccionar { width: 100%; background: var(--texto); color: white; border: none; padding: 9px; border-radius: 5px; cursor: pointer; font-size: 0.85rem; font-family: 'DM Sans', sans-serif; font-weight: 500; transition: background 0.2s; }
.btn-seleccionar:hover { background: var(--terracota); }
.btn-seleccionar:disabled { background: var(--gris-claro); color: var(--gris); cursor: default; }
.prenda-agotada { cursor: default; opacity: 0.75; }
.prenda-agotada:hover { box-shadow: none; transform: none; }
.prenda-agotada .prenda-img,
.prenda-agotada .img-placeholder { filter: grayscale(40%); }
.badge-agotado { position: absolute; top: 10px; left: 10px; background: rgba(192,57,43,0.92); color: white; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; pointer-events: none; z-index: 1; }
.no-prendas { text-align: center; padding: 40px; color: var(--gris); grid-column: 1/-1; }

.submenu-overlay { display: none; position: fixed; z-index: 500; left: 0; top: 0; width: 100%; height: 100%; background: rgba(30,20,10,0.5); justify-content: center; align-items: center; padding: 20px; }
.submenu-box { background: white; border-radius: 14px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.submenu-header { padding: 22px 26px 16px; border-bottom: 1px solid var(--borde); display: flex; justify-content: space-between; align-items: flex-start; }
.submenu-header h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; }
.precio-tag { color: var(--terracota); font-weight: 600; font-size: 1.1rem; margin-top: 4px; }
.submenu-body { padding: 22px 26px; }
.submenu-section { margin-bottom: 20px; }
.submenu-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); margin-bottom: 10px; }
.opciones-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion-btn { border: 1.5px solid var(--borde); padding: 7px 14px; border-radius: 5px; background: white; cursor: pointer; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; color: var(--texto); transition: all 0.15s; }
.opcion-btn:hover { border-color: var(--terracota); color: var(--terracota); }
.opcion-btn.selected { background: var(--terracota); color: white; border-color: var(--terracota); }
.btn-confirmar-carrito { width: 100%; background: var(--terracota); color: white; border: none; padding: 13px; border-radius: 7px; cursor: pointer; font-size: 0.95rem; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: background 0.2s; margin-top: 8px; }
.btn-confirmar-carrito:hover { background: var(--terracota-oscuro); }
.submenu-error { color: #c0392b; font-size: 0.82rem; margin-top: 10px; display: none; }

.carrito-overlay { display: none; position: fixed; z-index: 400; left: 0; top: 0; width: 100%; height: 100%; background: rgba(30,20,10,0.4); }
.carrito-panel { position: fixed; right: 0; top: 0; height: 100%; width: 380px; background: white; z-index: 401; box-shadow: -8px 0 40px rgba(0,0,0,0.15); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s ease; }
.carrito-panel.open { transform: translateX(0); }
.carrito-header { padding: 24px 24px 18px; border-bottom: 1px solid var(--borde); display: flex; justify-content: space-between; align-items: center; }
.carrito-header h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; }
.carrito-items { flex-grow: 1; overflow-y: auto; padding: 16px 24px; }
.carrito-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--borde); align-items: flex-start; }
.carrito-item-img { width: 60px; height: 70px; object-fit: cover; border-radius: 6px; background: #f0ebe4; flex-shrink: 0; }
.carrito-item-info { flex-grow: 1; }
.carrito-item-nombre { font-weight: 500; font-size: 0.9rem; margin-bottom: 3px; }
.carrito-item-detalle { font-size: 0.78rem; color: var(--gris); margin-bottom: 6px; line-height: 1.5; }
.carrito-item-precio { color: var(--terracota); font-weight: 600; font-size: 0.95rem; }
.btn-eliminar { background: none; border: none; cursor: pointer; color: var(--gris); font-size: 1rem; padding: 2px; flex-shrink: 0; transition: color 0.2s; }
.btn-eliminar:hover { color: #c0392b; }
.carrito-vacio { text-align: center; padding: 60px 20px; color: var(--gris); }
.carrito-vacio .icono { font-size: 2.5rem; margin-bottom: 12px; }
.carrito-footer { padding: 20px 24px; border-top: 1px solid var(--borde); }
.carrito-total { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 600; margin-bottom: 14px; }
.btn-checkout { width: 100%; background: var(--terracota); color: white; border: none; padding: 14px; border-radius: 7px; cursor: pointer; font-size: 1rem; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: background 0.2s; }
.btn-checkout:hover { background: var(--terracota-oscuro); }
.btn-vaciar { width: 100%; background: none; border: 1px solid var(--borde); color: var(--gris); padding: 10px; border-radius: 7px; cursor: pointer; font-size: 0.85rem; font-family: 'DM Sans', sans-serif; margin-top: 8px; transition: all 0.2s; }
.btn-vaciar:hover { border-color: #c0392b; color: #c0392b; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--texto); color: white; padding: 12px 22px; border-radius: 8px; font-size: 0.9rem; z-index: 999; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.mapa-tienda-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--borde); cursor: pointer; transition: background 0.15s; }
.mapa-tienda-item:hover { background: var(--crema); }
.mapa-tienda-item.en-ruta { background: #FEF3ED; border-left: 3px solid var(--terracota); }
.mapa-tienda-check { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--borde); flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; transition: all 0.15s; background: white; }
.mapa-tienda-item.en-ruta .mapa-tienda-check { background: var(--terracota); border-color: var(--terracota); color: white; }
.mapa-tienda-nombre { font-weight: 500; font-size: 0.88rem; margin-bottom: 2px; }
.mapa-tienda-cat { font-size: 0.76rem; color: var(--gris); }
.btn-trazar-ruta { width: 100%; background: var(--terracota); color: white; border: none; padding: 11px; border-radius: 7px; cursor: pointer; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: background 0.2s; }
.btn-trazar-ruta:hover { background: var(--terracota-oscuro); }
.btn-trazar-ruta:disabled { background: var(--borde); color: var(--gris); cursor: not-allowed; }
.btn-limpiar-ruta { width: 100%; background: none; border: 1px solid var(--borde); color: var(--gris); padding: 9px; border-radius: 7px; cursor: pointer; font-size: 0.85rem; font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
.btn-limpiar-ruta:hover { border-color: #c0392b; color: #c0392b; }

.btn-agregar-ruta { width: 100%; background: transparent; color: var(--terracota); border: 1.5px solid var(--terracota); padding: 9px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-family: 'DM Sans', sans-serif; font-weight: 600; transition: all 0.2s; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-agregar-ruta:hover { background: var(--terracota); color: white; }
.btn-agregar-ruta.en-ruta { background: var(--terracota); color: white; }
.btn-agregar-ruta.en-ruta:hover { background: var(--terracota-oscuro); }

/* ============================ */
/* AUTH                          */
/* ============================ */
.user-section { display: flex; align-items: center; gap: 12px; position: relative; }
.btn-login { background: var(--terracota); color: white; border: none; padding: 8px 18px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-family: 'DM Sans', sans-serif; font-weight: 500; transition: background 0.2s; }
.btn-login:hover { background: var(--terracota-oscuro); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--terracota); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; cursor: pointer; font-size: 0.9rem; border: 2px solid var(--borde); transition: border-color 0.2s; overflow: hidden; }
.user-avatar:hover { border-color: var(--terracota); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* user-menu: ahora absoluto al body, posicionado por JS */
.user-menu { position: fixed; background: white; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); min-width: 220px; z-index: 250; overflow: hidden; display: none; }
.user-menu.open { display: block; }
.user-menu-header { padding: 16px; border-bottom: 1px solid var(--borde); background: var(--crema); }
.user-menu-header strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.user-menu-header span { font-size: 0.78rem; color: var(--gris); }
.user-menu a, .user-menu button { display: block; width: 100%; padding: 12px 16px; text-align: left; background: none; border: none; cursor: pointer; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; color: var(--texto); text-decoration: none; transition: background 0.15s; }
.user-menu a:hover, .user-menu button:hover { background: var(--crema); }
.user-menu .divider { height: 1px; background: var(--borde); margin: 4px 0; }
.user-menu .logout { color: #c0392b; }

.auth-overlay { display: none; position: fixed; z-index: 600; inset: 0; background: rgba(30,20,10,0.65); justify-content: center; align-items: center; padding: 20px; }
.auth-box { background: white; border-radius: 14px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-header { padding: 28px 32px 20px; border-bottom: 1px solid var(--borde); display: flex; justify-content: space-between; align-items: flex-start; }
.auth-header h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.auth-header p { color: var(--gris); font-size: 0.85rem; margin-top: 4px; }
.auth-body { padding: 24px 32px 28px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--borde); margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; color: var(--gris); border-bottom: 2px solid transparent; transition: all 0.2s; }
.auth-tab.active { color: var(--terracota); border-bottom-color: var(--terracota); font-weight: 600; }
.auth-method-toggle { display: flex; gap: 6px; margin-bottom: 18px; background: var(--crema); padding: 4px; border-radius: 8px; }
.auth-method-btn { flex: 1; padding: 8px; border: none; border-radius: 6px; background: transparent; cursor: pointer; font-size: 0.82rem; font-family: 'DM Sans', sans-serif; color: var(--gris); transition: all 0.2s; }
.auth-method-btn.active { background: white; color: var(--texto); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--gris); margin-bottom: 6px; letter-spacing: 0.3px; }
.auth-field input { width: 100%; padding: 11px 14px; border: 1px solid var(--borde); border-radius: 7px; font-size: 0.92rem; font-family: 'DM Sans', sans-serif; outline: none; background: white; color: var(--texto); transition: border 0.2s; }
.auth-field input:focus { border-color: var(--terracota); }
.auth-submit { width: 100%; background: var(--terracota); color: white; border: none; padding: 13px; border-radius: 7px; font-size: 0.95rem; font-family: 'DM Sans', sans-serif; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-top: 6px; }
.auth-submit:hover { background: var(--terracota-oscuro); }
.auth-submit:disabled { background: var(--gris); cursor: not-allowed; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 16px; color: var(--gris); font-size: 0.78rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--borde); }
.auth-social { display: flex; flex-direction: column; gap: 8px; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px; border: 1px solid var(--borde); border-radius: 7px; background: white; cursor: pointer; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; color: var(--texto); transition: all 0.2s; }
.btn-social:hover { background: var(--crema); border-color: var(--gris); }
.btn-social svg { width: 18px; height: 18px; }
.auth-message { padding: 10px 14px; border-radius: 6px; font-size: 0.83rem; margin-bottom: 14px; display: none; }
.auth-message.error { background: #FDECEA; color: #c0392b; border: 1px solid #f5c6c0; display: block; }
.auth-message.success { background: #E8F5E9; color: #2e7d32; border: 1px solid #c8e6c9; display: block; }
.auth-message.info { background: #E3F2FD; color: #1565c0; border: 1px solid #bbdefb; display: block; }
.auth-helper { font-size: 0.8rem; color: var(--gris); text-align: center; margin-top: 14px; }
.auth-helper a { color: var(--terracota); text-decoration: none; cursor: pointer; }
.auth-helper a:hover { text-decoration: underline; }
.otp-container { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.otp-input { width: 44px; height: 52px; text-align: center; font-size: 1.3rem; font-weight: 600; border: 1.5px solid var(--borde); border-radius: 7px; outline: none; background: white; }
.otp-input:focus { border-color: var(--terracota); }
/* Vista de perfil — contenedor principal */
    .perfil-view {
display: none;
max-width: 960px;
margin: 0 auto;
padding: 32px 60px;
    }
    .perfil-view.activa { display: block; }
    
    /* Cuando perfil está activa, ocultar catálogo */
    body.viendo-perfil .banner,
    body.viendo-perfil .hero,
    body.viendo-perfil .main-content { display: none; }
    
    .perfil-back {
display: inline-flex; align-items: center; gap: 8px;
background: none; border: none; cursor: pointer;
color: var(--gris); font-size: 0.88rem; padding: 8px 0;
margin-bottom: 16px; font-family: 'DM Sans', sans-serif;
transition: color 0.2s;
    }
    .perfil-back:hover { color: var(--terracota); }
    
    .perfil-header {
display: flex; align-items: center; gap: 24px;
padding: 28px; background: white; border: 1px solid var(--borde);
border-radius: 14px; margin-bottom: 24px;
    }
    .perfil-avatar-big {
position: relative;
width: 88px; height: 88px; border-radius: 50%;
background: var(--terracota); color: white;
display: flex; align-items: center; justify-content: center;
font-size: 2.2rem; font-weight: 600; overflow: hidden;
flex-shrink: 0; cursor: pointer; transition: opacity 0.2s;
    }
    .perfil-avatar-big:hover { opacity: 0.85; }
    .perfil-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
    .perfil-avatar-big .overlay {
position: absolute; inset: 0;
background: rgba(0,0,0,0.45); color: white;
display: flex; align-items: center; justify-content: center;
font-size: 0.72rem; opacity: 0; transition: opacity 0.2s;
text-align: center; padding: 4px;
    }
    .perfil-avatar-big:hover .overlay { opacity: 1; }
    .perfil-avatar-big input[type="file"] { display: none; }
    
    .perfil-header-info h1 {
font-family: 'Playfair Display', serif;
font-size: 1.6rem; margin-bottom: 4px;
    }
    .perfil-header-info p {
color: var(--gris); font-size: 0.9rem;
    }
    
    /* Tabs */
    .perfil-tabs {
display: flex; gap: 4px; margin-bottom: 20px;
border-bottom: 1px solid var(--borde);
    }
    .perfil-tab {
background: none; border: none; padding: 12px 20px;
font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
color: var(--gris); cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.2s;
    }
    .perfil-tab:hover { color: var(--texto); }
    .perfil-tab.active {
color: var(--terracota);
border-bottom-color: var(--terracota);
font-weight: 600;
    }
    
    /* Paneles de contenido */
    .perfil-panel { display: none; }
    .perfil-panel.active { display: block; }
    
    .perfil-card {
background: white; border: 1px solid var(--borde);
border-radius: 12px; padding: 24px 28px;
margin-bottom: 16px;
    }
    .perfil-card h2 {
font-family: 'Playfair Display', serif;
font-size: 1.15rem; margin-bottom: 4px;
    }
    .perfil-card .subtitle {
color: var(--gris); font-size: 0.85rem;
margin-bottom: 20px;
    }
    
    /* Formulario */
    .form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px 18px;
    }
    .form-grid .full { grid-column: 1 / -1; }
    
    .form-field { display: flex; flex-direction: column; }
    .form-field label {
font-size: 0.78rem; font-weight: 500;
color: var(--gris); margin-bottom: 6px;
letter-spacing: 0.3px;
    }
    .form-field input,
    .form-field select,
    .form-field textarea {
padding: 10px 13px;
border: 1px solid var(--borde); border-radius: 7px;
font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
outline: none; background: white; color: var(--texto);
transition: border 0.2s;
    }
    .form-field input:focus,
    .form-field select:focus,
    .form-field textarea:focus { border-color: var(--terracota); }
    .form-field input:disabled {
background: var(--crema); color: var(--gris); cursor: not-allowed;
    }
    .form-field textarea { resize: vertical; min-height: 60px; }
    .form-field .hint {
font-size: 0.74rem; color: var(--gris);
margin-top: 4px; font-style: italic;
    }
    
    /* Chips de estilos */
    .estilos-grid {
display: flex; flex-wrap: wrap; gap: 8px;
    }
    .estilo-chip {
padding: 7px 14px; border-radius: 20px;
border: 1.5px solid var(--borde); background: white;
cursor: pointer; font-size: 0.83rem; color: var(--texto);
font-family: 'DM Sans', sans-serif; transition: all 0.15s;
    }
    .estilo-chip:hover { border-color: var(--terracota); }
    .estilo-chip.selected {
background: var(--terracota); color: white; border-color: var(--terracota);
    }
    
    /* Toggles para notificaciones */
    .toggle-row {
display: flex; justify-content: space-between; align-items: center;
padding: 12px 0; border-bottom: 1px solid var(--borde);
    }
    .toggle-row:last-child { border-bottom: none; }
    .toggle-row-text { flex: 1; }
    .toggle-row-text strong {
display: block; font-size: 0.9rem; margin-bottom: 2px; font-weight: 500;
    }
    .toggle-row-text span {
font-size: 0.8rem; color: var(--gris);
    }
    .toggle-switch {
position: relative; width: 44px; height: 24px;
background: var(--borde); border-radius: 12px;
cursor: pointer; transition: background 0.2s;
flex-shrink: 0;
    }
    .toggle-switch.active { background: var(--terracota); }
    .toggle-switch::after {
content: ''; position: absolute;
top: 2px; left: 2px;
width: 20px; height: 20px;
background: white; border-radius: 50%;
transition: transform 0.2s;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    .toggle-switch.active::after { transform: translateX(20px); }
    
    /* Botones de acción */
    .perfil-actions {
display: flex; justify-content: flex-end; gap: 10px;
margin-top: 22px; padding-top: 20px;
border-top: 1px solid var(--borde);
    }
    .btn-guardar {
background: var(--terracota); color: white; border: none;
padding: 10px 24px; border-radius: 7px; cursor: pointer;
font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
font-weight: 600; transition: background 0.2s;
    }
    .btn-guardar:hover { background: var(--terracota-oscuro); }
    .btn-guardar:disabled { background: var(--gris); cursor: not-allowed; }
    .btn-cancelar {
background: white; color: var(--gris); border: 1px solid var(--borde);
padding: 10px 22px; border-radius: 7px; cursor: pointer;
font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
transition: all 0.2s;
    }
    .btn-cancelar:hover { color: var(--texto); border-color: var(--gris); }
    
    /* Zona de peligro */
    .perfil-card.danger { border-color: #f5c6c0; }
    .perfil-card.danger h2 { color: #c0392b; }
    .btn-peligro {
background: white; color: #c0392b;
border: 1.5px solid #c0392b;
padding: 9px 20px; border-radius: 7px; cursor: pointer;
font-size: 0.88rem; font-family: 'DM Sans', sans-serif;
font-weight: 500; transition: all 0.2s;
    }
    .btn-peligro:hover { background: #c0392b; color: white; }
    
    /* DIRECCIONES — listado */
    .direcciones-header {
display: flex; justify-content: space-between; align-items: center;
margin-bottom: 18px;
    }
    .btn-agregar-direccion {
background: var(--terracota); color: white; border: none;
padding: 9px 18px; border-radius: 7px; cursor: pointer;
font-size: 0.85rem; font-weight: 500; font-family: 'DM Sans', sans-serif;
display: flex; align-items: center; gap: 6px;
transition: background 0.2s;
    }
    .btn-agregar-direccion:hover { background: var(--terracota-oscuro); }
    
    .direccion-card {
background: white; border: 1px solid var(--borde);
border-radius: 10px; padding: 18px 22px;
margin-bottom: 12px; display: flex;
justify-content: space-between; align-items: flex-start;
gap: 14px; transition: border 0.2s;
    }
    .direccion-card.principal { border-color: var(--terracota); border-width: 2px; }
    .direccion-card-info { flex: 1; min-width: 0; }
    .direccion-etiqueta {
display: inline-block; font-size: 0.72rem; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.5px;
color: var(--terracota); margin-bottom: 4px;
    }
    .direccion-etiqueta .badge-principal {
background: var(--terracota); color: white;
padding: 2px 8px; border-radius: 10px; margin-left: 6px;
font-size: 0.65rem;
    }
    .direccion-texto {
font-size: 0.92rem; color: var(--texto);
line-height: 1.5; margin-bottom: 6px;
    }
    .direccion-meta {
font-size: 0.8rem; color: var(--gris);
    }
    .direccion-actions {
display: flex; flex-direction: column; gap: 6px;
flex-shrink: 0;
    }
    .btn-icon {
background: none; border: 1px solid var(--borde);
padding: 6px 12px; border-radius: 6px; cursor: pointer;
font-size: 0.78rem; color: var(--gris);
font-family: 'DM Sans', sans-serif;
transition: all 0.15s; white-space: nowrap;
    }
    .btn-icon:hover { color: var(--texto); border-color: var(--gris); }
    .btn-icon.eliminar:hover { color: #c0392b; border-color: #c0392b; }
    .btn-icon.principal {
color: var(--terracota); border-color: var(--terracota);
    }
    
    .direcciones-vacio {
text-align: center; padding: 50px 20px; color: var(--gris);
background: white; border: 1px dashed var(--borde);
border-radius: 12px;
    }
    .direcciones-vacio .icono { font-size: 2.5rem; margin-bottom: 10px; }
    
    /* Modal direccion */
    .dir-modal-overlay {
display: none; position: fixed; z-index: 700;
inset: 0; background: rgba(30,20,10,0.65);
justify-content: center; align-items: center; padding: 20px;
    }
    .dir-modal-overlay.show { display: flex; }
    .dir-modal-box {
background: white; border-radius: 14px;
width: 100%; max-width: 540px;
max-height: 90vh; overflow-y: auto;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    }
    .dir-modal-header {
padding: 24px 28px 18px; border-bottom: 1px solid var(--borde);
display: flex; justify-content: space-between; align-items: flex-start;
    }
    .dir-modal-header h2 {
font-family: 'Playfair Display', serif;
font-size: 1.3rem;
    }
    .dir-modal-body { padding: 22px 28px 26px; }
    
    .checkbox-row {
display: flex; align-items: center; gap: 10px;
margin-top: 14px;
    }
    .checkbox-row input[type="checkbox"] {
width: 16px; height: 16px; cursor: pointer;
accent-color: var(--terracota);
    }
    .checkbox-row label {
font-size: 0.88rem; color: var(--texto); cursor: pointer;
    }
    
    /* Estado loading */
    .perfil-cargando {
text-align: center; padding: 80px 20px;
color: var(--gris);
    }
    
    /* Responsive */
    @media (max-width: 700px) {
.perfil-view { padding: 20px; }
.form-grid { grid-template-columns: 1fr; }
.perfil-header { flex-direction: column; text-align: center; }
.direccion-card { flex-direction: column; }
.direccion-actions { flex-direction: row; }
    }
    /* Vista de checkout — pantalla completa como perfil */
  .checkout-view {
    display: none;
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 60px;
  }
  .checkout-view.activa { display: block; }
  body.viendo-checkout .banner,
  body.viendo-checkout .hero,
  body.viendo-checkout .main-content { display: none; }
  
  .checkout-back {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    color: var(--gris); font-size: 0.88rem; padding: 8px 0;
    margin-bottom: 14px; font-family: 'DM Sans', sans-serif;
    transition: color 0.2s;
  }
  .checkout-back:hover { color: var(--terracota); }
  
  .checkout-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; margin-bottom: 6px;
  }
  .checkout-header p {
    color: var(--gris); font-size: 0.92rem; margin-bottom: 26px;
  }
  
  /* Stepper visual */
  .checkout-steps {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 30px;
  }
  .checkout-step {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
  }
  .checkout-step-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--borde); color: var(--gris);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 600;
  }
  .checkout-step.active .checkout-step-num,
  .checkout-step.done .checkout-step-num {
    background: var(--terracota); color: white;
  }
  .checkout-step-label { font-size: 0.85rem; color: var(--gris); }
  .checkout-step.active .checkout-step-label,
  .checkout-step.done .checkout-step-label { color: var(--texto); font-weight: 500; }
  .checkout-step-line {
    flex: 1; height: 2px; background: var(--borde);
    min-width: 24px;
  }
  .checkout-step-line.done { background: var(--terracota); }
  
  /* Tarjeta por tienda */
  .checkout-tienda-card {
    background: white; border: 1px solid var(--borde);
    border-radius: 12px; margin-bottom: 18px;
    overflow: hidden;
  }
  .checkout-tienda-header {
    padding: 16px 22px; background: var(--crema);
    border-bottom: 1px solid var(--borde);
    display: flex; justify-content: space-between; align-items: center;
  }
  .checkout-tienda-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; margin-bottom: 2px;
  }
  .checkout-tienda-header .meta {
    font-size: 0.78rem; color: var(--gris);
  }
  .checkout-tienda-subtotal {
    text-align: right; font-size: 0.88rem;
  }
  .checkout-tienda-subtotal strong {
    display: block; font-size: 1.05rem; color: var(--terracota);
  }
  
  /* Items dentro de la tarjeta */
  .checkout-item {
    display: flex; gap: 12px; padding: 14px 22px;
    border-bottom: 1px solid var(--borde);
    align-items: flex-start;
  }
  .checkout-item:last-child { border-bottom: none; }
  .checkout-item-img {
    width: 56px; height: 64px; border-radius: 6px;
    object-fit: cover; background: #f0ebe4; flex-shrink: 0;
  }
  .checkout-item-img.placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
  }
  .checkout-item-info { flex: 1; min-width: 0; }
  .checkout-item-nombre { font-weight: 500; font-size: 0.92rem; margin-bottom: 3px; }
  .checkout-item-detalle { font-size: 0.78rem; color: var(--gris); }
  .checkout-item-precio {
    color: var(--terracota); font-weight: 600;
    font-size: 0.95rem; white-space: nowrap;
  }
  
  /* Sección de entrega — dentro de cada tienda */
  .checkout-entrega {
    padding: 16px 22px; border-top: 1px solid var(--borde);
    background: #FCFAF7;
  }
  .checkout-entrega-label {
    font-size: 0.78rem; font-weight: 600;
    color: var(--gris); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 10px;
  }
  .opciones-entrega {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  }
  .opcion-entrega {
    border: 1.5px solid var(--borde); background: white;
    padding: 12px 14px; border-radius: 8px; cursor: pointer;
    transition: all 0.15s;
  }
  .opcion-entrega:hover { border-color: var(--gris); }
  .opcion-entrega.selected {
    border-color: var(--terracota); background: #FEF3ED;
  }
  .opcion-entrega-titulo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 500; font-size: 0.9rem; margin-bottom: 4px;
  }
  .opcion-entrega-titulo .icono { font-size: 1.1rem; }
  .opcion-entrega-detalle { font-size: 0.78rem; color: var(--gris); line-height: 1.4; }
  
  /* Selector de dirección (cuando es envío) */
  .seleccionar-direccion {
    margin-top: 14px; padding: 14px;
    background: white; border: 1px dashed var(--borde);
    border-radius: 8px;
  }
  .direccion-mini {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
  }
  .direccion-mini-info { flex: 1; min-width: 0; }
  .direccion-mini-titulo { font-size: 0.85rem; font-weight: 500; margin-bottom: 2px; }
  .direccion-mini-texto { font-size: 0.78rem; color: var(--gris); line-height: 1.4; }
  .btn-cambiar {
    background: none; border: 1px solid var(--borde);
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    font-size: 0.78rem; color: var(--terracota);
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s; flex-shrink: 0;
  }
  .btn-cambiar:hover { background: var(--terracota); color: white; }
  .sin-direccion {
    font-size: 0.85rem; color: var(--gris); text-align: center;
    padding: 8px;
  }
  .sin-direccion a { color: var(--terracota); cursor: pointer; }
  
  /* Notas para la tienda */
  .checkout-notas {
    margin-top: 14px;
  }
  .checkout-notas textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--borde); border-radius: 7px;
    font-size: 0.88rem; font-family: 'DM Sans', sans-serif;
    outline: none; background: white;
    min-height: 60px; resize: vertical;
  }
  .checkout-notas textarea:focus { border-color: var(--terracota); }
  
  /* Datos de contacto */
  .checkout-contacto {
    background: white; border: 1px solid var(--borde);
    border-radius: 12px; padding: 22px;
    margin-bottom: 20px;
  }
  .checkout-contacto h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; margin-bottom: 4px;
  }
  .checkout-contacto p {
    font-size: 0.85rem; color: var(--gris); margin-bottom: 14px;
  }
  .contacto-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }
  
  /* Resumen total — sticky en móvil */
  .checkout-resumen {
    background: white; border: 1px solid var(--borde);
    border-radius: 12px; padding: 22px;
    position: sticky; bottom: 20px;
  }
  .resumen-linea {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 0.92rem;
  }
  .resumen-linea.total {
    border-top: 1px solid var(--borde); margin-top: 8px;
    padding-top: 12px; font-size: 1.1rem; font-weight: 600;
  }
  .resumen-linea.total .valor { color: var(--terracota); }
  .resumen-info {
    background: #FEF3ED; padding: 12px; border-radius: 7px;
    font-size: 0.82rem; color: var(--terracota);
    margin: 14px 0; line-height: 1.5;
  }
  .btn-confirmar-orden {
    width: 100%; background: var(--terracota); color: white;
    border: none; padding: 14px; border-radius: 8px;
    font-size: 0.98rem; font-family: 'DM Sans', sans-serif;
    font-weight: 600; cursor: pointer;
    transition: background 0.2s; margin-top: 8px;
  }
  .btn-confirmar-orden:hover { background: var(--terracota-oscuro); }
  .btn-confirmar-orden:disabled { background: var(--gris); cursor: not-allowed; }
  
  /* Modal selector de dirección */
  .selector-dir-overlay {
    display: none; position: fixed; z-index: 750;
    inset: 0; background: rgba(30,20,10,0.65);
    justify-content: center; align-items: center; padding: 20px;
  }
  .selector-dir-overlay.show { display: flex; }
  .selector-dir-box {
    background: white; border-radius: 14px;
    width: 100%; max-width: 540px;
    max-height: 80vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  }
  .selector-dir-header {
    padding: 22px 26px 16px; border-bottom: 1px solid var(--borde);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; background: white; z-index: 1;
  }
  .selector-dir-header h3 {
    font-family: 'Playfair Display', serif; font-size: 1.2rem;
  }
  .selector-dir-body { padding: 16px 22px 22px; }
  .selector-dir-item {
    border: 1.5px solid var(--borde); border-radius: 8px;
    padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
    transition: all 0.15s;
  }
  .selector-dir-item:hover { border-color: var(--gris); }
  .selector-dir-item.selected {
    border-color: var(--terracota); background: #FEF3ED;
  }
  .selector-dir-item .etiqueta {
    font-weight: 600; font-size: 0.88rem;
    color: var(--terracota); margin-bottom: 4px;
  }
  .selector-dir-item .texto { font-size: 0.85rem; line-height: 1.5; }
  .selector-dir-add {
    border: 1.5px dashed var(--borde); border-radius: 8px;
    padding: 14px; text-align: center; cursor: pointer;
    color: var(--terracota); font-weight: 500; font-size: 0.88rem;
    transition: all 0.15s;
  }
  .selector-dir-add:hover { background: var(--crema); border-color: var(--terracota); }
  
  /* Pantalla de confirmación */
  .confirmacion-view {
    display: none;
    max-width: 720px;
    margin: 60px auto;
    padding: 0 60px;
    text-align: center;
  }
  .confirmacion-view.activa { display: block; }
  body.viendo-confirmacion .banner,
  body.viendo-confirmacion .hero,
  body.viendo-confirmacion .main-content { display: none; }
  .confirmacion-icon {
    width: 88px; height: 88px; border-radius: 50%;
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white; font-size: 3rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3);
    animation: scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes scale-in {
    from { transform: scale(0); }
    to { transform: scale(1); }
  }
  .confirmacion-view h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem; margin-bottom: 8px;
  }
  .confirmacion-view > p {
    color: var(--gris); font-size: 0.95rem;
    margin-bottom: 28px; line-height: 1.5;
  }
  .ordenes-confirmadas {
    background: white; border: 1px solid var(--borde);
    border-radius: 12px; padding: 24px;
    margin-bottom: 22px; text-align: left;
  }
  .ordenes-confirmadas h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; margin-bottom: 14px;
  }
  .orden-confirmada {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--borde);
    font-size: 0.9rem;
  }
  .orden-confirmada:last-child { border-bottom: none; }
  .orden-confirmada .num {
    font-family: 'Courier New', monospace;
    color: var(--terracota); font-weight: 600;
  }
  .confirmacion-actions {
    display: flex; gap: 10px; justify-content: center;
    flex-wrap: wrap;
  }
  .btn-confirmacion {
    padding: 12px 26px; border-radius: 8px;
    font-size: 0.92rem; font-family: 'DM Sans', sans-serif;
    font-weight: 500; cursor: pointer;
    transition: all 0.2s; border: none;
  }
  .btn-confirmacion.primary {
    background: var(--terracota); color: white;
  }
  .btn-confirmacion.primary:hover { background: var(--terracota-oscuro); }
  .btn-confirmacion.secondary {
    background: white; color: var(--texto);
    border: 1px solid var(--borde);
  }
  .btn-confirmacion.secondary:hover { border-color: var(--gris); }
  
  /* Responsive */
  @media (max-width: 700px) {
    .checkout-view, .confirmacion-view { padding: 20px; }
    .opciones-entrega { grid-template-columns: 1fr; }
    .contacto-grid { grid-template-columns: 1fr; }
    .checkout-steps { font-size: 0.75rem; }
    .checkout-step-label { display: none; }
  }
  /* Filtros de órdenes */
  .ordenes-filtros {
    display: flex; gap: 8px; margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .filtro-orden {
    background: white; border: 1px solid var(--borde);
    padding: 7px 14px; border-radius: 20px; cursor: pointer;
    font-size: 0.83rem; font-family: 'DM Sans', sans-serif;
    color: var(--gris); transition: all 0.15s;
  }
  .filtro-orden:hover { border-color: var(--terracota); color: var(--terracota); }
  .filtro-orden.active {
    background: var(--terracota); color: white; border-color: var(--terracota);
  }
  
  /* Tarjeta de orden en el listado */
  .orden-card {
    background: white; border: 1px solid var(--borde);
    border-radius: 12px; padding: 18px 22px;
    margin-bottom: 14px; transition: box-shadow 0.2s;
  }
  .orden-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
  
  .orden-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 14px; flex-wrap: wrap;
  }
  .orden-card-left { flex: 1; min-width: 0; }
  .orden-numero {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem; color: var(--gris);
    margin-bottom: 4px; letter-spacing: 0.5px;
  }
  .orden-tienda {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; margin-bottom: 4px;
  }
  .orden-meta {
    font-size: 0.82rem; color: var(--gris);
    display: flex; gap: 14px; flex-wrap: wrap;
  }
  .orden-meta span { display: inline-flex; align-items: center; gap: 4px; }
  
  .orden-card-right {
    text-align: right; flex-shrink: 0;
  }
  .orden-total {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; font-weight: 700;
    color: var(--terracota); margin-bottom: 6px;
  }
  
  /* Badge de estado */
  .estado-badge {
    display: inline-block; padding: 4px 11px;
    border-radius: 20px; font-size: 0.74rem;
    font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .estado-pendiente_contacto { background: #FEF3ED; color: var(--terracota); }
  .estado-confirmada { background: #E3F2FD; color: #1565c0; }
  .estado-pagada { background: #E0F7FA; color: #00796b; }
  .estado-preparando { background: #FFF3E0; color: #ef6c00; }
  .estado-enviada { background: #F3E5F5; color: #7b1fa2; }
  .estado-lista_recoger { background: #FFF8E1; color: #f57c00; }
  .estado-entregada { background: #E8F5E9; color: #2e7d32; }
  .estado-cancelada { background: #FDECEA; color: #c0392b; }
  
  /* Preview de items en la tarjeta */
  .orden-items-preview {
    display: flex; gap: 8px; margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--borde); align-items: center;
  }
  .item-thumb {
    width: 44px; height: 50px; border-radius: 6px;
    object-fit: cover; background: #f0ebe4; flex-shrink: 0;
  }
  .item-thumb.placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
  }
  .items-resumen {
    font-size: 0.85rem; color: var(--gris); flex: 1;
  }
  .btn-ver-detalle {
    background: white; color: var(--terracota);
    border: 1.5px solid var(--terracota);
    padding: 7px 16px; border-radius: 6px; cursor: pointer;
    font-size: 0.82rem; font-family: 'DM Sans', sans-serif;
    font-weight: 600; transition: all 0.15s;
  }
  .btn-ver-detalle:hover { background: var(--terracota); color: white; }
  
  /* Lista vacía */
  .ordenes-vacio {
    text-align: center; padding: 60px 20px;
    background: white; border: 1px dashed var(--borde);
    border-radius: 12px;
  }
  .ordenes-vacio .icono { font-size: 3rem; margin-bottom: 14px; opacity: 0.4; }
  .ordenes-vacio h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem; margin-bottom: 6px;
  }
  .ordenes-vacio p { color: var(--gris); font-size: 0.9rem; margin-bottom: 18px; }
  .btn-explorar {
    background: var(--terracota); color: white; border: none;
    padding: 11px 24px; border-radius: 7px; cursor: pointer;
    font-size: 0.88rem; font-family: 'DM Sans', sans-serif; font-weight: 500;
    transition: background 0.2s;
  }
  .btn-explorar:hover { background: var(--terracota-oscuro); }
  
  /* Modal detalle de orden */
  .orden-detalle-overlay {
    display: none; position: fixed; z-index: 700;
    inset: 0; background: rgba(30,20,10,0.65);
    justify-content: center; align-items: center; padding: 20px;
  }
  .orden-detalle-overlay.show { display: flex; }
  .orden-detalle-box {
    background: white; border-radius: 14px;
    width: 100%; max-width: 680px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  }
  .orden-detalle-header {
    padding: 26px 32px 18px; border-bottom: 1px solid var(--borde);
    display: flex; justify-content: space-between; align-items: flex-start;
    position: sticky; top: 0; background: white; z-index: 1;
  }
  .orden-detalle-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem; margin-bottom: 4px;
  }
  .orden-detalle-header .num {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem; color: var(--gris);
  }
  .orden-detalle-body { padding: 22px 32px 28px; }
  
  .detalle-seccion {
    margin-bottom: 24px;
  }
  .detalle-seccion h3 {
    font-size: 0.78rem; font-weight: 600;
    color: var(--gris); text-transform: uppercase;
    letter-spacing: 0.6px; margin-bottom: 10px;
  }
  
  .detalle-item {
    display: flex; gap: 14px; padding: 12px 0;
    border-bottom: 1px solid var(--borde); align-items: flex-start;
  }
  .detalle-item:last-child { border-bottom: none; }
  .detalle-item-img {
    width: 52px; height: 60px; border-radius: 6px;
    object-fit: cover; background: #f0ebe4; flex-shrink: 0;
  }
  .detalle-item-img.placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
  }
  .detalle-item-info { flex: 1; min-width: 0; }
  .detalle-item-nombre { font-weight: 500; font-size: 0.92rem; margin-bottom: 3px; }
  .detalle-item-meta { font-size: 0.78rem; color: var(--gris); }
  .detalle-item-precio {
    font-weight: 600; color: var(--terracota); font-size: 0.95rem;
    white-space: nowrap;
  }
  
  /* Línea de tiempo */
  .timeline {
    position: relative; padding-left: 26px;
  }
  .timeline::before {
    content: ''; position: absolute;
    left: 9px; top: 8px; bottom: 8px;
    width: 2px; background: var(--borde);
  }
  .timeline-item {
    position: relative; padding-bottom: 14px;
    padding-left: 4px;
  }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-item::before {
    content: ''; position: absolute;
    left: -24px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--borde); border: 2px solid white;
  }
  .timeline-item.activo::before { background: var(--terracota); }
  .timeline-item.completado::before { background: #4caf50; }
  .timeline-item-titulo {
    font-size: 0.88rem; font-weight: 500;
    margin-bottom: 2px;
  }
  .timeline-item-fecha {
    font-size: 0.76rem; color: var(--gris);
  }
  
  /* Resumen de totales */
  .detalle-totales {
    background: var(--crema); border-radius: 8px;
    padding: 14px 18px;
  }
  .detalle-totales-linea {
    display: flex; justify-content: space-between;
    padding: 5px 0; font-size: 0.9rem;
  }
  .detalle-totales-linea.total {
    border-top: 1px solid var(--borde); margin-top: 6px;
    padding-top: 10px; font-size: 1.05rem; font-weight: 700;
  }
  .detalle-totales-linea.total .valor { color: var(--terracota); }
  
  /* Acciones */
  .detalle-acciones {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 22px; padding-top: 20px;
    border-top: 1px solid var(--borde);
  }
  .btn-whatsapp {
    flex: 1; min-width: 180px;
    background: #25D366; color: white; border: none;
    padding: 12px; border-radius: 8px; cursor: pointer;
    font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
    font-weight: 600; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.2s;
  }
  .btn-whatsapp:hover { background: #1ebe5b; }
  .btn-cancelar-orden {
    flex: 1; min-width: 140px;
    background: white; color: #c0392b;
    border: 1.5px solid #c0392b;
    padding: 11px; border-radius: 8px; cursor: pointer;
    font-size: 0.88rem; font-family: 'DM Sans', sans-serif;
    font-weight: 500; transition: all 0.2s;
  }
  .btn-cancelar-orden:hover { background: #c0392b; color: white; }
  
  /* Modal cancelar */
  .cancelar-overlay {
    display: none; position: fixed; z-index: 800;
    inset: 0; background: rgba(30,20,10,0.7);
    justify-content: center; align-items: center; padding: 20px;
  }
  .cancelar-overlay.show { display: flex; }
  .cancelar-box {
    background: white; border-radius: 14px;
    max-width: 420px; width: 100%; padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  }
  .cancelar-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem; margin-bottom: 8px;
  }
  .cancelar-box p {
    color: var(--gris); font-size: 0.9rem;
    margin-bottom: 18px; line-height: 1.5;
  }
  .cancelar-box textarea {
    width: 100%; min-height: 70px; padding: 10px 12px;
    border: 1px solid var(--borde); border-radius: 7px;
    font-family: 'DM Sans', sans-serif; font-size: 0.88rem;
    outline: none; margin-bottom: 16px;
    resize: vertical;
  }
  .cancelar-box textarea:focus { border-color: var(--terracota); }
  .cancelar-actions {
    display: flex; gap: 10px; justify-content: flex-end;
  }
  .btn-cancelar-no {
    background: white; border: 1px solid var(--borde);
    padding: 9px 18px; border-radius: 7px; cursor: pointer;
    font-size: 0.85rem; font-family: 'DM Sans', sans-serif;
    color: var(--texto); transition: all 0.15s;
  }
  .btn-cancelar-no:hover { border-color: var(--gris); }
  .btn-cancelar-si {
    background: #c0392b; color: white; border: none;
    padding: 9px 18px; border-radius: 7px; cursor: pointer;
    font-size: 0.85rem; font-family: 'DM Sans', sans-serif;
    font-weight: 600; transition: background 0.2s;
  }
  .btn-cancelar-si:hover { background: #a83020; }

  /* Sección de método de pago dentro de cada tarjeta de tienda */
  .checkout-pago {
    padding: 16px 22px;
    border-top: 1px solid var(--borde);
    background: white;
  }
  .checkout-pago-label {
    font-size: 0.78rem; font-weight: 600;
    color: var(--gris); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 10px;
  }
  
  .opciones-pago {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .opcion-pago {
    border: 1.5px solid var(--borde); background: white;
    padding: 12px 14px; border-radius: 8px; cursor: pointer;
    transition: all 0.15s;
  }
  .opcion-pago:hover { border-color: var(--gris); }
  .opcion-pago.selected {
    border-color: var(--terracota); background: #FEF3ED;
  }
  .opcion-pago.disabled {
    opacity: 0.5; cursor: not-allowed; background: var(--crema);
  }
  .opcion-pago-titulo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 500; font-size: 0.9rem; margin-bottom: 4px;
  }
  .opcion-pago-titulo .icono { font-size: 1.15rem; }
  .opcion-pago-detalle { font-size: 0.78rem; color: var(--gris); line-height: 1.4; }
  
  /* Datos bancarios desplegables (cuando selecciona transferencia) */
  .datos-bancarios {
    margin-top: 14px;
    background: linear-gradient(135deg, #FEF3ED 0%, #FAF7F2 100%);
    border: 1px solid #F5C9B5;
    border-radius: 10px;
    padding: 16px 18px;
    animation: slide-down 0.3s ease;
  }
  @keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .datos-bancarios-titulo {
    font-size: 0.82rem; font-weight: 600;
    color: var(--terracota-oscuro); margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
  }
  .dato-bancario-fila {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(166, 75, 42, 0.2);
  }
  .dato-bancario-fila:last-of-type { border-bottom: none; }
  .dato-bancario-label {
    font-size: 0.75rem; color: var(--gris);
    text-transform: uppercase; letter-spacing: 0.4px;
  }
  .dato-bancario-valor {
    font-family: 'Courier New', monospace;
    font-size: 0.92rem; font-weight: 600;
    color: var(--texto);
    flex: 1; text-align: right;
    margin: 0 10px;
    word-break: break-all;
  }
  .btn-copiar {
    background: white; color: var(--terracota);
    border: 1px solid var(--terracota);
    padding: 4px 10px; border-radius: 5px; cursor: pointer;
    font-size: 0.72rem; font-family: 'DM Sans', sans-serif;
    font-weight: 600; transition: all 0.15s;
    flex-shrink: 0;
  }
  .btn-copiar:hover { background: var(--terracota); color: white; }
  .btn-copiar.copiado { background: #4caf50; color: white; border-color: #4caf50; }
  
  .datos-bancarios-nota {
    margin-top: 12px; padding-top: 10px;
    border-top: 1px dashed rgba(166, 75, 42, 0.2);
    font-size: 0.78rem; color: var(--gris);
    line-height: 1.5; font-style: italic;
  }
  
  .pago-sin-config {
    margin-top: 14px; padding: 12px 16px;
    background: #FFF8E1; border: 1px dashed #FFB300;
    border-radius: 8px;
    font-size: 0.85rem; color: #6F4C00;
    line-height: 1.5;
  }

/* ── ACCESIBILIDAD: FOCUS-VISIBLE (catálogo) ────────────── */
.btn-search:focus-visible,
.btn-login:focus-visible,
.btn-checkout:focus-visible,
.btn-confirmar-carrito:focus-visible,
.auth-submit:focus-visible {
    outline: 2px solid var(--terracota);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(166,75,42,0.2);
}
.cart-btn:focus-visible {
    outline: 2px solid var(--terracota);
    outline-offset: 4px;
    border-radius: 6px;
}
.tag:focus-visible,
.navbar-links a:focus-visible,
.opcion-btn:focus-visible,
.perfil-tab:focus-visible { outline: 2px solid var(--terracota); outline-offset: 2px; }
.close-btn:focus-visible { outline: 2px solid var(--terracota); outline-offset: 3px; border-radius: 4px; }
.slider-arrow:focus-visible { outline: 2px solid white; outline-offset: 3px; }
