/* Vitrina de Joyería: terciopelo verde, luz marfil y latón. Compartido por tienda, panel y kit de marca. */
:root {
  /* terciopelo */
  --v-950: #060D0A;
  --v-900: #0A1712;
  --v-800: #0E2219;
  --v-700: #133022;
  --v-600: #1B3F2F;
  --v-500: #2A5643;
  --v-300: #7E9A8B;
  --v-200: #AFC2B6;
  /* luz marfil */
  --ivory: #F6F2E8;
  --ivory-2: #EDE6D6;
  --paper: #FBF9F3;
  --ink: #13241B;
  --ink-2: #3B4F44;
  --muted: #5F6F65;
  /* latón */
  --brass: #C8A35A;
  --brass-hi: #E3C88E;
  --brass-lo: #7D6230;
  --alert: #A33A2C;

  --font-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --font-text: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4.5vw, 72px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.6 var(--font-text); font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--brass-lo); scrollbar-color: var(--v-300) var(--ivory-2);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .24em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--brass); color: var(--v-950); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ivory-2); }
::-webkit-scrollbar-thumb { background: var(--v-300); border: 2px solid var(--ivory-2); border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 10px 14px; }
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: .86rem; }
.empty { color: var(--muted); padding: 18px 0; }
.label { font: 500 .72rem/1.3 var(--font-text); letter-spacing: .2em; text-transform: uppercase; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 26px; border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); font: 500 .8rem/1 var(--font-text); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: var(--v-950); }
.btn-brass:hover { background: var(--brass-hi); border-color: var(--brass-hi); }
.btn-dark { background: var(--v-800); border-color: var(--v-800); color: var(--ivory); }
.btn-dark:hover { background: var(--v-700); }
.btn-ghost-light { border-color: color-mix(in srgb, var(--ivory) 55%, transparent); color: var(--ivory); }
.btn-ghost-light:hover { background: color-mix(in srgb, var(--ivory) 10%, transparent); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .72rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--ink-2); text-decoration: underline; text-underline-offset: .25em; font-size: .9rem; }
.link.danger { color: var(--alert); }

/* Botones de redes: discos de latón con etiqueta al pasar */
.socials { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.soc {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--brass) 70%, transparent); color: var(--brass-hi); text-decoration: none;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), translate .3s var(--ease-out);
}
.soc:hover { background: var(--brass); color: var(--v-950); translate: 0 -2px; }
.soc .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px; padding: 5px 9px; border-radius: 4px; background: var(--v-950); color: var(--ivory); font-size: .72rem; letter-spacing: .06em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; }
.soc:hover .tip, .soc:focus-visible .tip { opacity: 1; translate: -50% 0; }
.on-light .soc { color: var(--brass-lo); border-color: var(--brass); }
.on-light .soc:hover { color: var(--v-950); }

/* Placa de latón: códigos de prenda */
.plaque {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 3px;
  background: linear-gradient(180deg, #E6CB91, #BF9A52); color: var(--v-950);
  font: 600 .7rem/1.2 var(--font-text); letter-spacing: .16em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* Formularios */
label { display: grid; gap: 6px; font-size: .8rem; font-weight: 500; letter-spacing: .04em; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #CFC6B2; border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 1rem; font-weight: 400; letter-spacing: 0;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #7F8A82; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass-lo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 30%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2313241B' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 36px; }
input[type=checkbox], input[type=radio] { accent-color: var(--v-700); width: 18px; height: 18px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .8rem; font-weight: 500; letter-spacing: .04em; color: var(--ink-2); padding: 0; margin-bottom: 8px; }

.qty { display: inline-flex; align-items: center; border: 1px solid #CFC6B2; border-radius: 999px; height: 38px; }
.qty button { width: 38px; height: 100%; border: 0; background: none; font-size: 1.05rem; color: var(--ink); border-radius: 999px; }
.qty button:disabled { color: #C9C2B3; cursor: not-allowed; }
.qty span { min-width: 22px; text-align: center; font-weight: 500; }

/* Diálogos */
dialog { border: 0; padding: 0; background: var(--paper); color: var(--ink); max-height: 100dvh; }
dialog::backdrop { background: color-mix(in srgb, var(--v-950) 84%, transparent); }
dialog[open] { animation: rise .5s var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #D9D1BF; background: var(--paper); color: var(--ink); flex: none; }
.x:hover { background: var(--ivory-2); }

#toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 200; translate: -50% 12px; opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 13px 20px; border-radius: 14px; background: var(--v-950); color: var(--ivory);
  font-size: .9rem; box-shadow: 0 14px 34px -14px rgba(6, 13, 10, .7); transition: opacity .3s var(--ease-out), translate .3s var(--ease-out);
}
#toast.show { opacity: 1; translate: -50% 0; }
#toast[data-kind=err] { background: var(--alert); }

/* Prendas colgadas: se mecen al pasar y se asientan (giran desde el gancho) */
.hang { transform-origin: 50% 0; }
@media (prefers-reduced-motion: no-preference) {
  .sway:hover .hang, .sway:focus-within .hang { animation: sway 1.8s var(--ease-out); }
}
@keyframes sway { 18% { rotate: 2.4deg; } 42% { rotate: -1.6deg; } 64% { rotate: .9deg; } 84% { rotate: -.35deg; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
