:root {
  --paper: #FFF3F8;
  --ink: #3A1230;
  --ink-soft: #8A5477;
  --rasp: #E0218A;
  --rasp-deep: #B8106E;
  --blush: #FFD3E6;
  --line: #F3C6DC;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --wrap: min(1240px, 100% - 2rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; color-scheme: light; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23E0218A' fill-opacity='.07'%3E%3Cg transform='translate(40 40)'%3E%3Cellipse cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(72)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(144)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(216)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(288)' cy='-9' rx='4.5' ry='7'/%3E%3C/g%3E%3Cg transform='translate(120 120) scale(.8)'%3E%3Cellipse cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(72)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(144)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(216)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(288)' cy='-9' rx='4.5' ry='7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
main { flex: 1; width: var(--wrap); margin: 0 auto; min-height: calc(100vh - 280px); }
a { color: var(--rasp-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--rasp); outline-offset: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 500; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h2 { font-size: 1.9rem; text-align: center; margin: 0 0 1.4rem; }
h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }
h4 { font-family: var(--sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 .8rem; }
small { color: var(--ink-soft); }

/* Barra superior y cabecera */
.announce { background: var(--rasp); color: white; text-align: center; font-size: .85rem; font-weight: 600; padding: .45rem 1rem; margin-top: 4.5rem; }
.stripe { height: 3px; background: var(--rasp); }
.top { background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
/* Logo | menú (centrado en el hueco) | buscador | herramientas. Buscador y herramientas tienen ancho fijo, así no se mueven al cambiar idioma o país */
.top-inner { width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .8rem; padding: 1rem 0; }
.brand { line-height: 0; display: flex; align-items: center; width: 148px; flex-shrink: 0; }
.brand img { height: 39px; width: auto; max-width: none; display: block; border: 0; position: relative; top: -4px; }
.menu { display: flex; flex-direction: column; align-items: center; justify-self: center; position: relative; left: 1rem; width: max-content; gap: .1rem; font-weight: 600; font-size: 1rem; }
.menu-row { display: flex; flex-wrap: nowrap; gap: 1rem; align-items: center; }
.menu > a { color: var(--ink); text-decoration: none; padding: .4rem 0; }
.menu > a:hover, .menu > a.on { color: var(--rasp); }
.nav-dd { position: relative; }
.nav-dd-link { color: var(--ink); text-decoration: none; padding: .2rem 0; font-weight: 600; display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.nav-dd-link:hover { color: var(--rasp); }
.nav-dd-link svg { opacity: .5; transition: transform .2s; }
.nav-dd:hover .nav-dd-link svg { transform: rotate(180deg); opacity: 1; }
.nav-dd::after { content: ''; position: absolute; left: -2rem; right: -2rem; top: 100%; height: 1.5rem; }
.nav-dd ul { position: absolute; left: 0; top: calc(100% + .2rem); min-width: 220px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(58,18,48,.12); padding: .5rem; margin: 0; list-style: none; z-index: 30; opacity: 0; visibility: hidden; transition: opacity .15s .2s, visibility 0s .2s; }
.nav-dd:hover ul, .nav-dd:focus-within ul { opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-dd ul a { display: block; padding: .5rem .9rem; color: var(--ink); text-decoration: none; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.nav-dd ul a:hover { background: var(--paper); color: var(--rasp); }

/* Dropdown del logo */
.brand-dd { display: flex; align-items: center; }
.brand-dd .brand { width: auto; }
.brand-arrow { display: grid; place-items: center; color: var(--ink); opacity: .5; transition: transform .2s, opacity .15s; cursor: default; padding: 0 .25rem; }
.brand-dd:hover .brand-arrow { opacity: 1; transform: rotate(180deg); }

/* Desplegables */
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; padding: .4rem 0; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.dd summary::-webkit-details-marker { display: none; }
.cn-short { display: none; }
.dd summary::after { content: ''; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-.15em); opacity: .7; }
.dd[open] summary { color: var(--rasp); }
.dd ul, .dd .panel { position: absolute; left: 0; top: 100%; min-width: 230px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(58,18,48,.12); padding: .5rem; margin: .3rem 0 0; list-style: none; z-index: 30; }
.dd.right ul, .dd.right .panel { left: auto; right: 0; }
.dd ul a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; border-radius: 6px; font-weight: 500; }
.dd ul a:hover { background: var(--paper); color: var(--rasp); }
.dd .panel { padding: .9rem; display: grid; gap: .8rem; }
.dd .panel label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.dd .panel select { font-size: .95rem; }

/* Herramientas: búsqueda, cuenta, carrito */
/* Todos los elementos tienen ancho fijo y separación uniforme: el buscador no se mueve al cambiar idioma o país */
.tools { display: flex; align-items: center; gap: .75rem; }
.tools .dd summary { width: 118px; justify-content: flex-end; }
.tools .dd summary .cn-full { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tools .icon-link { flex-shrink: 0; white-space: nowrap; }
.tools .icon-link:last-child { }

.search { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); padding: 3px 3px 3px 0; overflow: hidden; }
.search input { border: 0; background: transparent; border-radius: 999px; padding: .4rem .9rem; width: 150px; font-size: .95rem; -webkit-appearance: none; appearance: none; box-shadow: none; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--rasp); }
.search button { border: 0; background: var(--rasp); color: white; width: 32px; height: 32px; border-radius: 50%; padding: 0; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: background .15s, transform .15s; }
.search button:hover { background: var(--rasp-deep); transform: scale(1.08); }
.icon-link { display: flex; align-items: center; gap: .4rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.icon-link:hover { color: var(--rasp); }
.theme-toggle { background: none; border: 0; cursor: pointer; color: var(--ink); padding: .3rem; margin: 0; display: grid; place-items: center; border-radius: 50%; }
.theme-toggle:hover { color: var(--rasp); }
/* El icono indica el modo al que se cambia: luna en claro, sol en oscuro */
.theme-toggle .icon-sun { display: none; }
.dark .theme-toggle .icon-moon { display: none; }
.dark .theme-toggle .icon-sun { display: block; }
.pill { display: inline-block; background: var(--rasp); color: white; border-radius: 999px; font-size: .72rem; padding: 0 .5em; line-height: 1.5; }

/* Banner de portada */
.hero { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 2rem; padding: 2.2rem 0 .5rem; }
.hero-logo { width: min(380px, 100%); height: auto; margin: 0 0 1.2rem; }
.hero p { font-size: 1.1rem; color: var(--ink-soft); max-width: 48ch; margin: 0 0 1.4rem; }
.hero-art { width: 100%; height: auto; border-radius: 12px; }

/* Carrusel */
.carousel { position: relative; }
.carousel-track { display: flex; gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: .3rem .2rem 1rem; margin: 0 -.2rem; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > .card { flex: 0 0 calc((100% - 3 * 1.4rem) / 4); scroll-snap-align: start; }
.carousel-btn { position: absolute; top: 38%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--rasp); background: white; color: var(--rasp-deep); cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(224,33,138,.15); transition: background .15s, color .15s, opacity .15s; }
.carousel-btn:hover { background: var(--rasp); color: white; }
.carousel-btn.prev { left: -22px; } .carousel-btn.next { right: -22px; }
.carousel-btn[disabled] { opacity: .3; cursor: default; }
.carousel-btn[disabled]:hover { background: white; color: var(--rasp-deep); }
.carousel.no-scroll .carousel-btn { display: none; }

/* Bloques de portada */
.block { padding: 2.8rem 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.4rem; }
.card { display: flex; flex-direction: column; }
.card .photo { position: relative; aspect-ratio: 3 / 4; background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(224,33,138,.07); display: block; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .photo img { transform: scale(1.03); }
.card:hover .photo { border-color: var(--rasp); }
.card h3 { margin: .8rem 0 .1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--rasp); }
.card .meta { margin: 0; color: var(--ink-soft); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy { display: flex; flex-direction: column; padding-top: .6rem; gap: .35rem; }
.buy form { width: 100%; }
.price { font-weight: 700; font-size: 1.1rem; }
.stock-ok { color: #2D7A3A; font-size: .82rem; font-weight: 600; margin: -.3rem 0 .25rem; }
.card.sold .photo img { filter: grayscale(.7); opacity: .7; }

.stock-note { color: var(--ink-soft); font-size: .82rem; font-weight: 600; margin: -.3rem 0 .25rem; }
.nophoto { height: 100%; display: grid; place-items: center; color: var(--blush); font-family: var(--sans); font-style: italic; font-size: 1.6rem; }
.tag { position: absolute; left: .7rem; top: .7rem; background: var(--blush); color: var(--rasp-deep); font-size: .72rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; }
.tag.sold { background: var(--ink); color: white; }
.empty { color: var(--ink-soft); font-style: italic; font-family: var(--sans); font-size: 1.15rem; text-align: center; }
.center { text-align: center; padding: 1.5rem 0 3rem; }

/* Cuadrícula de subcategorías */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 1.4rem; }
.cat-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); }
.cat-card .cat-photo { aspect-ratio: 3 / 4; width: 100%; background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(224,33,138,.07); }
.cat-card .cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cat-card:hover .cat-photo img { transform: scale(1.03); }
.cat-card:hover .cat-photo { border-color: var(--rasp); }
.cat-card h3 { margin: .8rem 0 .15rem; text-align: center; font-size: 1.1rem; }
.cat-card:hover h3 { color: var(--rasp); }
.cat-count { margin: 0; color: var(--ink-soft); font-size: .88rem; }

/* Ficha */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 2rem 0 4rem; align-items: start; }
.gallery { display: flex; gap: .8rem; aspect-ratio: 1 / 1; }
.thumbs-col { display: flex; flex-direction: column; gap: .5rem; flex-shrink: 0; width: 64px; overflow-y: auto; }
.thumbs-col .thumb-btn { width: 64px; height: 64px; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; background: white; cursor: pointer; flex-shrink: 0; }
.thumbs-col .thumb-btn.active { border-color: var(--rasp); }
.thumbs-col .thumb-btn:hover { border-color: var(--rasp); }
.thumbs-col .thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.photo-main { position: relative; flex: 1; background: white; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.photo-main img { width: 100%; height: 100%; object-fit: contain; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.1); opacity: 0; transition: opacity .2s, background .15s; z-index: 2; }
.photo-main.has-nav:hover .photo-nav { opacity: 1; }
.photo-nav:hover { background: white; color: var(--rasp); }
.photo-nav.prev { left: .6rem; }
.photo-nav.next { right: .6rem; }
.photo-counter { position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.5); color: white; font-size: .72rem; font-weight: 600; padding: .2em .65em; border-radius: 999px; z-index: 2; }
.crumb { color: var(--ink-soft); font-size: .85rem; margin: 0 0 .4rem; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--rasp); text-decoration: underline; }
.info h1 { margin: 0 0 1rem; font-size: clamp(1.4rem, 2.8vw, 1.9rem); line-height: 1.25; }
.info-price { font-family: var(--sans); font-size: 2rem; font-weight: 500; margin: 0 0 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.info-specs { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.4rem; margin: 0 0 1.4rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.info-specs dt { color: var(--ink-soft); font-size: .9rem; padding: .3rem 0; }
.info-specs dd { margin: 0; font-size: .95rem; padding: .3rem 0; }
.spec-qty { display: flex; align-items: center; gap: .8rem; }
.stock-inline { font-size: .85rem; font-weight: 600; }
.stock-inline.in { color: #1A7A2E; }
.stock-inline.out { color: var(--ink-soft); }
.qty-wrap { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.qty-sm .qty-btn { width: 34px; height: 34px; font-size: 1.1rem; }
.qty-sm .qty-input { width: 42px; height: 34px; font-size: .95rem; }
.qty-btn { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--ink); display: grid; place-items: center; transition: background .15s; }
.qty-btn:hover { background: var(--paper); color: var(--rasp); }
.qty-input { width: 48px; height: 40px; border: 0; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); text-align: center; font: inherit; font-weight: 600; font-size: 1rem; background: transparent; padding: 0; -moz-appearance: textfield; }
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.info-actions { margin: 0 0 1.4rem; }
.info-actions .btn { font-size: 1.05rem; padding: .85rem 1.4rem; }
.info-shipping { border-top: 1px solid var(--line); padding-top: 1rem; margin: 0 0 .5rem; }
.info-shipping h4 { margin: 0 0 .6rem; }
.ship-specs { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.4rem; margin: 0; }
.ship-specs dt { color: var(--ink-soft); font-size: .88rem; }
.ship-specs dd { margin: 0; font-size: .88rem; }
.info-desc { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.info-desc h4 { margin: 0 0 .5rem; }
.info-desc p { white-space: pre-line; color: var(--ink-soft); line-height: 1.7; margin: 0; max-width: 60ch; }

/* Botones y formularios */
.btn { display: inline-block; font: inherit; font-weight: 600; padding: .7rem 1.4rem; border-radius: 999px; border: 1.5px solid var(--rasp); background: white; color: var(--rasp-deep); cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { background: var(--blush); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(224,33,138,.25); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary { background: var(--rasp); border-color: var(--rasp); color: white; }
.btn.primary:hover { background: var(--rasp-deep); border-color: var(--rasp-deep); }
.btn.small { padding: .4rem .9rem; font-size: .85rem; }
.btn.wide { width: 100%; text-align: center; }
.btn.big { font-size: 1.15rem; padding: .9rem 2.2rem; }
/* Mismo ancho para 'Ver todas las …' en los tres grupos */
.btn.grp-all { min-width: min(400px, 100%); text-align: center; }
button.link { font: inherit; background: none; border: 0; color: var(--rasp-deep); text-decoration: underline; cursor: pointer; padding: 0; }
button.link.danger { color: #9B1C1C; }
.narrow { max-width: 70%; padding: 2.5rem 1rem 4rem; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack label, .inline label { display: flex; flex-direction: column; gap: .3rem; font-weight: 500; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { flex-direction: row !important; align-items: center; gap: .6rem !important; align-self: end; padding-bottom: .6rem; }
input, select, textarea { font: inherit; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--rasp); }
textarea { resize: vertical; }
.inline { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.alert { background: #FBE3E3; color: #7A1616; padding: .8rem 1rem; border-radius: 8px; }
.ok { background: var(--blush); color: var(--rasp-deep); padding: .8rem 1rem; border-radius: 8px; }
.ok.bad { background: #FDE2E2; color: #8A1C1C; }
.cat-photo-form { display: flex; align-items: center; gap: .5rem; margin: 0; }
.cat-photo-form input[type=file] { font-size: .85rem; max-width: 220px; }
.nophoto-sm { width: 56px; height: 72px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 6px; font-size: .7rem; color: var(--ink-soft); text-align: center; }
.note { color: var(--ink-soft); font-size: .95rem; }

/* Tablas */
.lines { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; }
.lines td { padding: .8rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines .num { text-align: right; white-space: nowrap; font-weight: 600; }
.lines .thumb { width: 64px; }
.lines .thumb img { width: 56px; height: 72px; object-fit: cover; border-radius: 6px; }
.lines .total td { border-bottom: 0; font-family: var(--sans); font-size: 1.3rem; }
.lines .muted { opacity: .55; }
.lines td:last-child:has(.row-actions) { text-align: right; }
.row-actions { white-space: nowrap; display: inline-flex; }
.row-actions form { margin: 0; display: flex; }
.row-actions a,
.row-actions > button,
.row-actions form button {
  display: inline-flex; align-items: center; padding: .5rem 1rem;
  font: inherit; font-size: .85rem; font-weight: 600;
  background: var(--blush); color: var(--rasp-deep);
  border: 1px solid var(--rasp); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.row-actions > :first-child:is(a, button) { border-radius: 6px 0 0 6px; }
.row-actions > :first-child:is(form) button { border-radius: 6px 0 0 6px; }
.row-actions > :last-child:is(a, button) { border-radius: 0 6px 6px 0; border-left: 0; }
.row-actions > :last-child:is(form) button { border-radius: 0 6px 6px 0; border-left: 0; }
.row-actions > :only-child:is(a, button) { border-radius: 6px; }
.row-actions > :only-child:is(form) button { border-radius: 6px; }
.row-actions a:hover, .row-actions > button:hover, .row-actions form button:hover { background: var(--rasp); color: white; }
.paybox { margin: 1.8rem 0 0; }
.cart-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.cart-qty .qty-btn { width: 34px; height: 34px; border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.cart-qty .qty-btn:hover:not([disabled]) { background: var(--paper); color: var(--rasp); }
.cart-qty .qty-btn[disabled] { opacity: .3; cursor: default; }
.cart-qty .qty-val { width: 36px; text-align: center; font-weight: 600; font-size: .95rem; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); line-height: 34px; }
.cart-remove { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-size: 1.3rem; padding: .2rem .5rem; border-radius: 4px; line-height: 1; }
.cart-remove:hover { color: #9B1C1C; background: #FBE3E3; }

/* Perfil de usuario */
.profile-header { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1.5rem; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--rasp); color: white; display: grid; place-items: center; font-family: var(--sans); font-size: 1.6rem; font-weight: 600; flex-shrink: 0; }
.profile-name { font-size: 1.6rem; margin: 0; line-height: 1.2; }
.profile-email { color: var(--ink-soft); font-size: .9rem; margin: .2rem 0 0; }
.profile-since { color: var(--ink-soft); font-size: .8rem; margin: .15rem 0 0; }
.profile-actions { display: flex; gap: .8rem; margin-bottom: 2.5rem; }
.btn.outline { background: transparent; border: 1.5px solid var(--line); color: var(--ink-soft); }
.btn.outline:hover { border-color: var(--rasp); color: var(--rasp); background: transparent; }
.profile-section { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.section-title { text-align: left; font-size: 1.3rem; margin: 0 0 1rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--ink-soft); }
.empty-state svg { margin: 0 auto .8rem; opacity: .35; }
.empty-state p { margin: 0 0 1.2rem; }
.orders-list { display: flex; flex-direction: column; gap: .7rem; }
.order-card { display: block; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.order-card:hover { border-color: var(--rasp); box-shadow: 0 2px 12px rgba(224,33,138,.1); }
.order-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.order-ref { font-weight: 700; font-size: .95rem; color: var(--rasp-deep); }
.order-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.order-date { font-size: .85rem; color: var(--ink-soft); }
.order-total { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; }
.order-status { display: inline-block; font-size: .75rem; font-weight: 600; padding: .2em .7em; border-radius: 999px; }
.order-status.big { font-size: .85rem; padding: .3em .9em; }
.order-status.paid { background: #DEF7EC; color: #1A7A2E; }
.order-status.pending { background: #FEF3C7; color: #92400E; }
.order-status.failed { background: #FBE3E3; color: #9B1C1C; }
.order-status.oversold { background: #FBE3E3; color: #9B1C1C; }
.auth-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 2rem 2rem 1.5rem; margin: 0 auto; }
.auth-card h1 { text-align: center; font-size: 1.8rem; margin-bottom: 1.2rem; }
/* Detalle de pedido */
.order-detail-card { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: .5rem; }
.order-detail-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--line); }
.order-detail-ref { font-size: 1.3rem; margin: 0; }
.order-detail-date { color: var(--ink-soft); font-size: .85rem; margin: .2rem 0 0; }
.order-detail-items { padding: 1.2rem 1.6rem; }
.order-detail-items h4 { margin-bottom: .6rem; }
.order-item-row { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.order-item-row:last-child { border-bottom: 0; }
.order-item-name { flex: 1; font-weight: 500; }
.order-item-qty { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
.order-item-price { font-weight: 600; white-space: nowrap; }
.order-detail-footer { background: var(--paper); padding: 1.2rem 1.6rem; border-top: 1px solid var(--line); }
.order-detail-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.order-total-amount { font-family: var(--sans); font-size: 1.3rem; font-weight: 600; color: var(--rasp-deep); }
.order-detail-address { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.order-detail-address h4 { margin-bottom: .3rem; }
.order-detail-address p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.muted { color: var(--ink-soft); }

/* Admin */
.admin.wide { padding: 2.5rem 0 4rem; }
.admin h2 { text-align: left; font-size: 1.5rem; margin-top: 3rem; }
.bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.actions { display: flex; gap: 1.2rem; align-items: center; }
.cats { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.cats li { background: white; border: 1px solid var(--line); border-radius: 999px; padding: .2em .5em .2em .8em; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; }
.cats li form { display: inline; margin: 0; }
.cats li button.x { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-size: .8rem; padding: .1em .3em; border-radius: 50%; line-height: 1; }
.cats li button.x:hover { background: #FBE3E3; color: #9B1C1C; }
.grp-title { margin-top: 1.5rem; }
.w60 { width: 60px; } .w80 { width: 80px; } .w140 { width: 140px; }
.upper { text-transform: uppercase; }
.form-foot { text-align: center; margin-top: 1.5rem; }
.rate-input { display: inline-flex; align-items: center; gap: .4rem; }
.rate-input input[type="number"] { width: 80px; padding: .4rem .5rem; text-align: right; }
.add-country { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.admin-form h1 { color: var(--rasp-deep); }
.form-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .9rem; }
.form-section-title { color: var(--rasp-deep); margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--sans); font-weight: 700; border-bottom: 2px solid var(--blush); padding-bottom: .5rem; }
.admin-form .stack { gap: 1.2rem; }
.admin-form .btn.primary.wide { font-size: 1.05rem; padding: .9rem 1.4rem; margin-top: .5rem; }
.drop { display: grid; place-items: center; gap: .6rem; padding: 1.5rem; border: 2px dashed var(--line); border-radius: 14px; background: white; cursor: pointer; text-align: center; color: var(--ink-soft); }
.drop.over { border-color: var(--rasp); background: var(--paper); }
.drop img { max-height: 260px; border-radius: 8px; }
.gallery-edit { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gallery-thumb { position: relative; width: 100px; height: 130px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb .gallery-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.5); color: white; font-size: .7rem; text-align: center; padding: .15rem; }
.gallery-x { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: white; border: 0; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.gallery-x:hover { background: #9B1C1C; }
.photo-col { display: flex; flex-direction: column; gap: .8rem; }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.thumb-btn { border: 2px solid var(--line); border-radius: 8px; overflow: hidden; width: 70px; height: 90px; cursor: pointer; padding: 0; background: white; }
.thumb-btn.active { border-color: var(--rasp); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Pie */
.foot { background: white; border-top: 1px solid var(--line); }
.foot-grid { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1.8fr .7fr .7fr; gap: 2rem 2rem; padding: 2.5rem 1rem 1.5rem; font-size: .92rem; }
.foot p { margin: .15rem 0; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: auto auto; gap: .4rem 1rem; }
.foot-links a { color: var(--rasp-deep); }
.foot-links a:hover { color: var(--rasp); }
.social { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--paper); color: var(--ink-soft); text-decoration: none; transition: background .2s, color .2s; }
.social a:hover { background: var(--rasp); color: white; }
.social a svg { width: 20px; height: 20px; }

.pay-badges { list-style: none; padding: 0; margin: 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.pay-badges li { border: 1.5px solid var(--line); border-radius: 6px; padding: .15em .6em; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.tiny { padding: .8rem 1rem 1.5rem; font-size: .8rem; color: var(--ink-soft); text-align: center; }

/* Cuenta de usuario */
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--ink-soft); font-size: .85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.google { display: inline-flex; align-items: center; gap: .6rem; background: white; border: 1.5px solid var(--line); color: var(--ink); width: 100%; justify-content: center; }
.btn.google:hover { background: var(--paper); border-color: var(--ink-soft); }
.btn.google svg { flex-shrink: 0; }

/* Modo oscuro */
html.dark {
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23F06ABC' fill-opacity='.05'%3E%3Cg transform='translate(40 40)'%3E%3Cellipse cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(72)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(144)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(216)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(288)' cy='-9' rx='4.5' ry='7'/%3E%3C/g%3E%3Cg transform='translate(120 120) scale(.8)'%3E%3Cellipse cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(72)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(144)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(216)' cy='-9' rx='4.5' ry='7'/%3E%3Cellipse transform='rotate(288)' cy='-9' rx='4.5' ry='7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --paper: #1A0F16;
  --ink: #F0E0EA;
  --ink-soft: #B89AAC;
  --rasp: #F06ABC;
  --rasp-deep: #F288CC;
  --blush: #2E1528;
  --line: #3D2234;
}
html.dark .top, html.dark .dd ul, html.dark .dd .panel, html.dark .nav-dd ul, html.dark .foot { background: #241520; }
html.dark .order-card, html.dark .auth-card, html.dark .order-detail-card { background: #241520; }
html.dark .order-detail-footer { background: #1A0F16; }
html.dark .order-card:hover { box-shadow: 0 2px 12px rgba(240,106,188,.12); }
html.dark .card .photo, html.dark .cat-card .cat-photo { background: #241520; }
html.dark .carousel-btn, html.dark .carousel-btn[disabled]:hover { background: #241520; }
html.dark input, html.dark select, html.dark textarea { background: #241520; color: var(--ink); }
html.dark .btn { background: #241520; }
html.dark .btn.primary { background: var(--rasp); color: #1A0F16; }
html.dark .btn.primary:hover { background: var(--rasp-deep); }
html.dark .btn.google { background: #241520; }
html.dark .search { background: #241520; }
html.dark .search input { background: transparent; border: 0; }
html.dark .row-actions a, html.dark .row-actions > button, html.dark .row-actions form button { background: var(--blush); }
html.dark .tag { background: var(--blush); }
html.dark .tag.sold { background: #444; }
html.dark .pay-badges li { color: var(--ink-soft); }
html.dark .form-card { background: #241520; }
html.dark .drop { background: #241520; }
html.dark .photo-nav { background: rgba(36,21,32,.85); color: var(--ink); }
html.dark .photo-nav:hover { background: #241520; color: var(--rasp); }
html.dark .cart-qty { background: #241520; }
html.dark .qty-wrap { background: #241520; }
html.dark .gallery-thumb { border-color: var(--line); }
html.dark .thumb-btn { background: #241520; border-color: var(--line); }
html.dark .announce { background: #8B1460; }
html.dark .stripe { background: #8B1460; }

@media (max-width: 1000px) {
  .top { position: static; }
  .top-inner { grid-template-columns: auto 1fr auto; gap: 1rem; }
  .brand { width: auto; }
  .menu { grid-column: 1 / -1; order: 3; justify-self: start; left: 0; }
  .search { justify-self: end; }
  .search input { width: 130px; }
  .theme-toggle { margin: 0; }
  .icon-link span:not(.pill) { display: none; }
  .tools .dd summary, .tools .icon-link, .tools .icon-link:last-child { width: auto; }
  .grid, .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-track > .card { flex-basis: calc((100% - 2 * 1.4rem) / 3); }
  .carousel-btn.prev { left: -8px; } .carousel-btn.next { right: -8px; }
}
@media (max-width: 760px) {
  /* Cabecera en tres filas: logo + herramientas / buscador / menú */
  .top-inner { grid-template-columns: 1fr auto; gap: .8rem; padding: .8rem 0; }
  .search { grid-column: 1 / -1; order: 2; justify-self: stretch; }
  .search input { width: 100%; flex: 1; }
  .tools { gap: .5rem; }
  .brand img { height: 40px; }
  .cn-full { display: none; }
  .cn-short { display: inline; }
  .menu { order: 3; width: 100%; font-size: .95rem; }
  .menu-row { flex-wrap: wrap; justify-content: center; gap: .2rem .8rem; }
  /* Desplegable a todo el ancho de la fila del menú, no centrado sobre la categoría */
  .menu { position: relative; }
  .nav-dd { position: static; }
  .nav-dd ul { left: 0; right: 0; min-width: 0; }
  .hero { grid-template-columns: 1fr; text-align: center; width: 100%; }
  .hero-art { width: 100%; border-radius: 12px; }
  .hero-logo { margin-left: auto; margin-right: auto; }
  .hero p { margin-left: auto; margin-right: auto; }
  .detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .gallery { flex-direction: column-reverse; aspect-ratio: auto; }
  .thumbs-col { flex-direction: row; width: auto; overflow-x: auto; }
  .thumbs-col .thumb-btn { width: 52px; height: 52px; }
  .photo-main { aspect-ratio: 1 / 1; }
  .two { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem .8rem; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem .8rem; }
  .carousel-track { gap: .8rem; }
  .carousel-track > .card { flex-basis: calc((100% - .8rem) / 2); }
.carousel-track > .card { display: flex; flex-direction: column; }
  .tools { flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
}
@media (max-width: 760px) {
  .narrow { max-width: 100%; padding: 1.5rem 1rem 3rem; }
  .auth-card { padding: 1.2rem 1rem 1rem; }
  .lines .thumb { width: 48px; }
  .lines .thumb img { width: 48px; height: 60px; }
  .lines td { padding: .6rem .3rem; font-size: .9rem; }
  .lines .total td { font-size: 1.1rem; }
  .cart-qty .qty-btn { width: 28px; height: 28px; font-size: .95rem; }
  .cart-qty .qty-val { width: 28px; font-size: .85rem; line-height: 28px; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .foot-links { grid-template-columns: 1fr; gap: .4rem; }
  .social { justify-content: center; }
  .pay-badges { justify-content: center; }
}
