/* Páginas internas: catálogo, producto, tiendas, ayuda, login + mega menú + sheets */
:root { --brown: #4a2c1c; --brown-d: #2f1b10; }

/* ============ VISTA ============ */
.view-page { min-height: 78svh; padding: calc(var(--header-h) + var(--ticker-h) + 36px) 28px 90px; outline: 0; }
.view-page[hidden], #homeMain[hidden] { display: none !important; }
.page { max-width: 1120px; margin: 0 auto; animation: pageIn .7s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px); } }
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .04em; }
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; }
.page-title { font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.01em; margin-bottom: 26px; color: #3d3d41; }
.page-title.upper { text-transform: uppercase; }
.lead { font-size: 15px; line-height: 1.7; color: #55555a; max-width: 70ch; margin-bottom: 28px; }
.h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.h3 { font-size: 16px; font-weight: 700; margin: 30px 0 12px; }
.section-title.left { text-align: left; margin: 64px 0 24px; }
.empty, .muted { color: var(--muted); font-size: 14px; padding: 30px 0; grid-column: 1 / -1; }

/* ============ BOTONES ============ */
.btn-brown {
  background: var(--brown); color: #fff; padding: 17px 24px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  border: 1.5px solid var(--brown); transition: background .35s var(--ease), color .35s, transform .35s var(--ease);
}
.btn-brown:hover:not(:disabled) { background: var(--brown-d); transform: translateY(-2px); }
.btn-brown:disabled { background: #b9b3ae; border-color: #b9b3ae; cursor: not-allowed; }
.btn-brown.inline { display: inline-block; padding: 14px 28px; margin: 6px 0 4px; }

/* ============ MEGA MENÚ ============ */
.mega { position: absolute; left: 0; right: 0; top: calc(100% - var(--ticker-h)); z-index: 5; background: #fff; border-top: 1px solid #ececee; box-shadow: 0 30px 50px -30px rgba(0,0,0,.35);
  clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease); }
.mega.is-open { clip-path: inset(0); }
.mega-inner { max-width: 1320px; margin: 0 auto; padding: 22px 28px 26px; display: flex; justify-content: space-between; gap: 40px; }
.mega-links { display: flex; gap: 48px; align-items: flex-start; padding-top: 4px; }
.mega-links a { font-size: 13px; font-weight: 500; position: relative; max-width: 110px; line-height: 1.35; }
.mega-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.mega-links a:hover::after { transform: scaleX(1); }
.mega-media { display: flex; gap: 8px; }
.mega-media figure { width: 140px; }
.mega-media span { display: block; aspect-ratio: 1 / 1.4; background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 60%, #888), var(--tone)); }
.mega-media figcaption { font-size: 8px; text-transform: uppercase; margin-top: 6px; color: var(--muted); }
.main-nav a.is-active::after { transform: scaleX(1); }

/* ============ CATÁLOGO ============ */
.cat-tools { display: flex; align-items: center; gap: 26px; margin-bottom: 18px; }
.tool { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 500; transition: opacity .3s; }
.tool svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); }
.tool:hover svg { transform: scale(1.2) rotate(-6deg); }
.count { margin-left: auto; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; min-height: 0; }
.chip { font-size: 11px; padding: 7px 12px; border: 1px solid #d9d9dc; transition: background .3s, color .3s; }
.chip:hover { background: var(--ink); color: #fff; }
.grid-wide { max-width: none; margin: 0; gap: 34px 14px; }
.page .card { animation: pageIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 56px; }
.pager button { width: 40px; height: 40px; border: 1px solid #e0e0e3; font-size: 13px; transition: background .3s, color .3s, border-color .3s; }
.pager button:hover:not(:disabled) { border-color: var(--ink); }
.pager button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }

/* ============ SHEETS ============ */
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 400; width: min(380px, 100%); background: #fff; overflow: auto;
  transform: translateX(100%); visibility: hidden; transition: transform .55s var(--ease), visibility 0s .55s; box-shadow: -20px 0 60px -30px rgba(0,0,0,.4); }
.sheet.is-open { transform: none; visibility: visible; transition: transform .55s var(--ease); }
.sheet > header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; }
.sheet h2 { font-size: 14px; font-weight: 600; }
.sheet > header button { width: 38px; height: 38px; border-radius: 50%; font-size: 16px; transition: background .3s, transform .4s var(--ease); }
.sheet > header button:hover { background: #f1f1f2; transform: rotate(90deg); }
.sheet-body { padding: 0 24px 40px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 11px 0; font-size: 12.5px; cursor: pointer; }
.opt input { appearance: none; width: 16px; height: 16px; border: 1.5px solid #9a9aa0; border-radius: 50%; display: grid; place-items: center; transition: border-color .25s; flex: none; }
.opt.chk input { border-radius: 3px; }
.opt input::after { content: ''; width: 8px; height: 8px; border-radius: inherit; background: var(--ink); transform: scale(0); transition: transform .3s var(--ease); }
.opt input:checked { border-color: var(--ink); }
.opt input:checked::after { transform: scale(1); }
.opt:hover span { text-decoration: underline; }
.fg { border-bottom: 1px solid #ececee; }
.fg summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; padding: 16px 0; font-size: 13px; font-weight: 500; }
.fg summary::-webkit-details-marker { display: none; }
.fg summary::after { content: '+'; font-size: 18px; transition: transform .4s var(--ease); }
.fg[open] summary::after { transform: rotate(45deg); }
.fg > div { padding-bottom: 12px; }
.price-f { padding-top: 22px; }
.price-f h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.price-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.price-row label { flex: 1; min-width: 80px; font-size: 10.5px; color: var(--muted); }
.price-row input { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #d9d9dc; font: inherit; font-size: 13px; }
.price-row input:focus { outline: 0; border-color: var(--ink); }
.clear { margin-top: 26px; font-size: 12px; text-decoration: underline; color: var(--muted); }

/* ============ PRODUCTO ============ */
.pd { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.pd-gallery { display: grid; grid-template-columns: 78px 1fr; gap: 14px; }
.pd-thumbs { display: grid; gap: 10px; align-content: start; }
.pd-thumb { aspect-ratio: 1 / 1.25; background: #f4f4f5; position: relative; overflow: hidden; outline: 1.5px solid transparent; transition: outline-color .3s; }
.pd-thumb.is-on { outline-color: var(--ink); }
.pd-thumb span { position: absolute; inset: 0; background: linear-gradient(calc(120deg + var(--t) * 40deg), #ebebed, #d8d8dc); }
.pd-main { position: relative; aspect-ratio: 1 / 1.1; background: #f7f7f7; overflow: hidden; display: grid; place-items: center; }
.pd-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(calc(120deg + var(--shift, 0) * 40deg), transparent 40%, rgba(0,0,0,.05)); transition: opacity .5s; }
.pd-main .card-ph { font-size: 36px; }
.pd-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.pd-info h1 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; text-transform: uppercase; color: #3d3d41; margin-bottom: 18px; }
.pd-price { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.pd-small { font-size: 11.5px; color: #77777c; margin-top: 5px; }
.pd-transfer { font-size: 15px; margin-top: 12px; }
.pd-transfer b { font-weight: 700; }
.pd-more { margin: 10px 0; font-size: 11.5px; }
.pd-more summary { cursor: pointer; width: max-content; font-weight: 600; text-decoration: underline; }
.pd-more p { margin-top: 8px; color: #77777c; line-height: 1.6; }
.pd-ship { font-size: 12px; margin: 12px 0 22px; }
.pd-opt { margin-bottom: 20px; font-size: 12px; }
.pd-opt b { font-weight: 700; }
.swatch { width: 54px; height: 54px; margin-top: 8px; background: #151517; border: 2px solid transparent; outline: 1.5px solid var(--ink); outline-offset: 2px; }
.sizes { display: flex; gap: 8px; margin: 10px 0 12px; flex-wrap: wrap; }
.sizes button { min-width: 42px; height: 38px; padding: 0 12px; border: 1px solid #cfcfd3; font-size: 12px; transition: background .3s, color .3s, border-color .3s; }
.sizes button:hover { border-color: var(--ink); }
.sizes button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sizes.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pd-link { font-size: 11.5px; text-decoration: underline; }
.pd-buy { display: flex; gap: 12px; margin: 26px 0 22px; }
.qty-lg { margin-top: 0; }
.qty-lg button, .qty-lg span { height: 52px; }
.qty-lg button { width: 40px; }
.qty-lg span { display: grid; place-items: center; }
.pd-buy .btn-brown { flex: 1; }
.pd-acc { border-top: 1px solid #e3e3e6; border-bottom: 1px solid #e3e3e6; }
.pd-acc summary { list-style: none; cursor: pointer; padding: 16px 0; font-size: 13px; display: flex; justify-content: space-between; }
.pd-acc summary::-webkit-details-marker { display: none; }
.pd-acc summary::after { content: '+'; font-size: 18px; transition: transform .4s var(--ease); }
.pd-acc[open] summary::after { transform: rotate(45deg); }
.pd-acc p { font-size: 12.5px; line-height: 1.7; color: #55555a; padding-bottom: 16px; }
.pd-share { display: flex; gap: 16px; align-items: center; margin-top: 18px; font-size: 12px; }
.pd-share span { color: var(--muted); }
.pd-share button, .pd-share a { text-decoration: underline; }

/* ============ TIENDAS ============ */
.store-list { max-width: 620px; }
.store { padding: 26px 0; border-bottom: 1px solid #d5d5d8; }
.store h2 { font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.store p { font-size: 13px; color: #55555a; margin-bottom: 8px; }
.store p b { font-weight: 600; color: var(--ink); }
.store a { transition: color .3s; }
.store p a:hover { color: #1f7a3d; text-decoration: underline; }
.store-map { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; transition: transform .4s var(--ease); }
.store-map:hover { transform: translateX(6px); }
.store-bye { padding: 30px 0; font-size: 16px; }

/* ============ AYUDA ============ */
.page-help .plain { padding-left: 20px; margin: 10px 0 18px; font-size: 14px; line-height: 1.75; color: #55555a; list-style: disc; max-width: 75ch; }
.page-help .plain.num { list-style: decimal; }
.page-help p { font-size: 14px; line-height: 1.75; color: #55555a; max-width: 75ch; margin-bottom: 14px; }
.steps { max-width: 720px; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 54px 1fr; align-items: center; padding: 16px 0; border-bottom: 1px solid #ececee; font-size: 14.5px; }
.steps b { font-size: 22px; font-weight: 800; font-style: italic; color: #cfcfd3; transition: color .3s; }
.steps li:hover b { color: var(--ink); }
.size-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.size-table h2 { font-size: 17px; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; }
.size-table table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; }
.size-table th, .size-table td { padding: 10px 6px; border-bottom: 1px solid #e3e3e6; }
.size-table thead th { font-weight: 700; border-bottom: 1.5px solid var(--ink); }
.size-table tbody tr { transition: background .25s; }
.size-table tbody tr:hover { background: #f5f5f6; }
.faq-list.wide { max-width: 820px; }

/* ============ LOGIN ============ */
.auth { max-width: 520px; display: grid; gap: 20px; }
.auth label { display: block; font-size: 11px; color: var(--muted); }
.auth input { display: block; width: 100%; margin-top: 8px; padding: 15px 14px; border: 1px solid #d5d5d8; font: inherit; font-size: 14px; background: #fff; transition: border-color .3s; }
.auth input:focus { outline: 0; border-color: var(--brown); }
.pw { position: relative; display: block; }
.pw button { position: absolute; right: 10px; top: 50%; transform: translateY(-38%); font-size: 15px; opacity: .6; }
.forgot { justify-self: end; font-size: 11px; text-decoration: underline; margin-top: -8px; }
.auth-foot { text-align: center; font-size: 12px; }
.auth-foot a { text-decoration: underline; }
.auth-msg { text-align: center; font-size: 13px; min-height: 18px; color: #c8312b; }
.auth-msg.is-ok { color: #1f7a3d; }
.page-404 { text-align: center; padding: 60px 0; }
.page-404 .btn-outline { margin-top: 10px; }

/* ============ FOOTER SOCIAL ============ */
.f-social { display: flex; gap: 10px; margin-top: 12px; }
.f-social a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 0; transition: background .3s, color .3s; }
.f-social a:hover { background: #fff; color: var(--ink); transform: none; }
.f-social a::before { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .view-page { padding: calc(var(--header-h) + var(--ticker-h) + 24px) 14px 70px; }
  .pd { grid-template-columns: 1fr; gap: 28px; }
  .pd-gallery { grid-template-columns: 1fr; }
  .pd-thumbs { grid-template-columns: repeat(3, 1fr); order: 2; }
  .size-grid { grid-template-columns: 1fr; }
  .mega-inner { flex-direction: column; }
  .mega-links { flex-wrap: wrap; gap: 18px 30px; }
  .mega-media { display: none; }
}
@media (prefers-reduced-motion: reduce) { .page, .page .card { animation: none; } }
