/* css/style.css */
:root {
  --ink: #171717;
  --paper: #f8f7f4;
  --sand: #e9e5dd;
  --line: #dedad2;
  --muted: #6d6a65;
  --accent: #a74831;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: .95rem;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Botones y formularios */
.btn {
  border-radius: 0;
  padding: .78rem 1.1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn-dark {
  border-color: var(--ink);
  background: var(--ink);
}

.btn-dark:hover,
.btn-dark:focus {
  border-color: #353535;
  background: #353535;
}

.form-control,
.form-select {
  border-color: #c9c5bf;
  border-radius: 0;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ink);
  box-shadow: none;
}

/* Header */
.announcement-bar {
  padding: .62rem 1rem;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: "DM Mono", monospace;
  font-size: .66rem;
  letter-spacing: .08em;
  text-align: center;
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-chrome.menu-is-open {
  z-index: 1090;
}

.site-header {
  border-bottom: 1px solid rgba(23, 23, 23, .08);
  background: rgba(248, 247, 244, .95);
  backdrop-filter: blur(12px);
}

.navbar {
  min-height: 76px;
}

.brand-link,
[data-brand] {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1;
}

.brand-logo {
  width: auto;
  max-width: 210px;
  max-height: 42px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.icon-button,
.navbar-toggler {
  display: inline-grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.cart-count {
  position: absolute;
  top: -.15rem;
  right: -.18rem;
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: "DM Mono", monospace;
  font-size: .55rem;
}

.nav-link {
  padding: .35rem 0 !important;
  color: var(--ink) !important;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

/* Elementos editoriales */
.page-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.7rem;
}

.section-heading h2,
.shop-heading h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .65rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.text-link {
  flex: 0 0 auto;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.text-link:hover {
  color: var(--accent);
}

/* Hero */
.hero,
.editorial-video,
.hero-secondary,
.shop-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.hero {
  height: calc(100svh - 106px);
  min-height: 560px;
}

.hero-media,
.hero-secondary-media,
.shop-hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.hero-media video,
.hero-secondary-media img,
.hero-secondary-media video,
.shop-hero-media img,
.shop-hero-media video,
.editorial-video > img,
.editorial-video > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after,
.editorial-video::after,
.hero-secondary::after,
.shop-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .05) 76%);
  content: "";
  pointer-events: none;
}

.hero-content,
.video-copy,
.hero-secondary-copy,
.shop-hero-copy {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  height: 100%;
  align-items: end;
  padding: clamp(1.5rem, 6vw, 6rem);
  padding-bottom: clamp(2.5rem, 8vw, 7rem);
}

.hero-content p {
  margin-bottom: .8rem;
  font-family: "DM Mono", monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 7vw, 6.7rem);
  font-weight: 500;
  line-height: .95;
}

.editorial-video {
  display: flex;
  min-height: clamp(390px, 52vw, 540px);
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  isolation: isolate;
}

.editorial-video > img,
.editorial-video > video {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.editorial-video::after {
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, .13), rgba(0, 0, 0, .4));
}

.video-copy {
  width: min(700px, calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
}

.video-copy h2,
.hero-secondary-copy h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 5vw, 5.3rem);
  font-weight: 500;
  line-height: 1.02;
}

.video-copy .eyebrow,
.video-copy h2 {
  color: var(--white);
}

.hero-secondary {
  display: flex;
  min-height: clamp(580px, 72svh, 760px);
  align-items: center;
}

.hero-secondary::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .1) 78%);
}

.hero-secondary-copy {
  width: min(760px, 100%);
  padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 7vw, 7rem);
}

.hero-secondary-copy > p:not(.eyebrow) {
  max-width: 540px;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, .9);
  line-height: 1.7;
}

.shop-hero {
  display: flex;
  min-height: 390px;
  align-items: end;
  padding: clamp(1.5rem, 6vw, 5rem);
}

.shop-hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  font-weight: 500;
  line-height: 1;
}

/* Carruseles */
.product-rail,
.subcategory-rail {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 .55rem;
  cursor: grab;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.product-rail::-webkit-scrollbar,
.subcategory-rail::-webkit-scrollbar,
.thumbnail-row::-webkit-scrollbar {
  display: none;
}

.product-rail.is-dragging,
.subcategory-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.product-rail img,
.subcategory-rail img {
  -webkit-user-drag: none;
  user-select: none;
}

.product-rail .product-card {
  display: grid;
  flex: 0 0 min(31vw, 420px);
  grid-template-rows: auto 3.25rem;
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.product-rail .product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.product-rail .product-info {
  min-height: 3.25rem;
}

.product-rail .product-name {
  display: block;
  height: 2.7em;
  overflow: hidden;
  line-height: 1.35;
}

.product-rail .product-price {
  white-space: nowrap;
}

.slider-shell {
  position: relative;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 1.8rem;
  margin-top: .85rem;
}

.slider-dash {
  width: 1.55rem;
  height: 2px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(23, 23, 23, .2);
  cursor: pointer;
  transition: width .28s ease, background-color .28s ease;
}

.slider-dash:hover,
.slider-dash:focus-visible {
  background: rgba(23, 23, 23, .55);
}

.slider-dash.is-active {
  width: 2.8rem;
  background: var(--ink);
}

.slider-dash:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* Subcategorías */
.subcategory-rail .subcategory-card {
  position: relative;
  display: block;
  flex: 0 0 min(24vw, 300px);
  width: min(24vw, 300px);
  height: clamp(340px, 31vw, 420px);
  overflow: hidden;
  background: var(--sand);
  scroll-snap-align: start;
}

.subcategory-card::after,
.collage-tile::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .54), transparent 62%);
  content: "";
  pointer-events: none;
}

.subcategory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.subcategory-card:hover img,
.product-card:hover .product-image img {
  transform: scale(1.035);
}

.subcategory-card-copy {
  position: absolute;
  right: 1rem;
  bottom: .9rem;
  left: 1rem;
  z-index: 1;
  min-height: 5.5rem;
  color: var(--white);
}

.subcategory-card-copy h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.subcategory-card-copy p {
  margin: .2rem 0 0;
  font-size: .76rem;
}

/* Productos */
.product-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--sand);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.product-tag {
  position: absolute;
  top: .7rem;
  left: .7rem;
  padding: clamp(.26rem, .45vw, .36rem) clamp(.38rem, .55vw, .52rem);
  background: var(--white);
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: clamp(.47rem, .52vw, .58rem);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.product-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(.45rem, 1vw, .8rem);
  min-height: clamp(3.2rem, 5vw, 4.1rem);
  padding-top: clamp(.65rem, 1vw, .9rem);
}

.product-name,
.product-price {
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.product-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(.65rem, .78vw, .82rem);
  line-height: 1.38;
}

.product-price {
  flex: 0 0 auto;
  padding-top: .05rem;
  font-family: "DM Mono", monospace;
  font-size: clamp(.6rem, .68vw, .72rem);
  line-height: 1.35;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: clamp(2.5rem, 4vw, 3.4rem);
}

/* Lookbook */
.product-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(220px, 27vw));
  gap: .7rem;
}

.collage-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--sand);
  isolation: isolate;
}

.collage-tile:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.collage-tile > .collage-media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.collage-tile .collage-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: opacity .55s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.collage-tile .collage-image-secondary {
  opacity: 0;
  transform: scale(1.06);
}

.collage-tile > span {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 1;
  color: var(--white);
  font-family: "DM Mono", monospace;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .collage-tile:hover .collage-image-primary {
    opacity: 0;
    transform: scale(1.04);
  }

  .collage-tile:hover .collage-image-secondary {
    opacity: 1;
    transform: scale(1);
  }
}

/* Contenido editorial y footer */
.reflection {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--sand);
}

.reflection p {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.15;
}

.reflection span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.manifesto {
  padding: clamp(5rem, 12vw, 10rem) 1rem;
  background: var(--sand);
}

.manifesto h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
}

.manifesto p:not(.eyebrow) {
  max-width: 680px;
  margin: 1.5rem auto;
  color: var(--muted);
  line-height: 1.8;
}

.footer {
  background: var(--ink);
  color: var(--white);
}

.footer-brand {
  color: var(--white);
}

.footer a:not(.brand-link) {
  display: block;
  width: fit-content;
  margin: .5rem 0;
  color: rgba(255, 255, 255, .75);
  font-size: .82rem;
}

.footer a:not(.brand-link):hover {
  color: var(--white);
}

.footer-title {
  margin-bottom: .75rem;
  font-family: "DM Mono", monospace;
  font-size: .63rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .17);
  color: rgba(255, 255, 255, .6);
  font-family: "DM Mono", monospace;
  font-size: .61rem;
  letter-spacing: .06em;
}

/* Catálogo y filtros */
.shop-heading {
  max-width: 680px;
  margin-bottom: 2rem;
}

.shop-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  column-gap: .65rem;
  row-gap: 1rem;
}

.filter-tabs button {
  padding: clamp(.48rem, .7vw, .58rem) clamp(.62rem, .9vw, .82rem);
  border: 1px solid #c8c3bb;
  background: transparent;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: clamp(.56rem, .62vw, .67rem);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.filter-tabs button:hover,
.filter-tabs button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.sort-select {
  width: auto;
  min-width: 180px;
  font-size: .74rem;
}

/* Modal y galería de producto */
.product-gallery-main {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--sand);
  touch-action: pan-y;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(92, 92, 92, .56);
  opacity: 1;
  outline: 0;
  transform: translateY(-50%);
  -webkit-tap-highlight-color: transparent;
}

.gallery-control svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.gallery-control:hover,
.gallery-control:focus,
.gallery-control:focus-visible,
.gallery-control:active {
  border: 0;
  background: transparent;
  color: rgba(92, 92, 92, .56);
  outline: 0;
  box-shadow: none;
  transform: translateY(-50%);
}

.gallery-control--previous {
  left: .8rem;
}

.gallery-control--next {
  right: .8rem;
}

.gallery-control span {
  display: block;
  margin-top: -.18rem;
}

.thumbnail-row {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  margin-top: .5rem;
  padding-bottom: .2rem;
}

.thumbnail-row button {
  flex: 0 0 auto;
  width: 64px;
  height: 84px;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
}

.thumbnail-row button.active {
  border-color: var(--ink);
}

.thumbnail-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal-info {
  padding: 1.5rem;
}

.product-modal-info h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 500;
}

.product-description {
  color: var(--muted);
  line-height: 1.75;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.size-btn {
  min-width: 46px;
  padding: .54rem;
  border: 1px solid #bab5ad;
  background: transparent;
  color: var(--ink);
}

.size-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

/* Carrito y búsqueda */
.checkout-vendor {
  margin-bottom: 1rem;
  padding: .85rem;
  border: 1px solid var(--line);
  background: #f0ede7;
}

.checkout-vendor label {
  display: block;
  margin-bottom: .45rem;
  font-family: "DM Mono", monospace;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.checkout-vendor small {
  display: block;
  margin-top: .45rem;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: .75rem;
  margin-bottom: 1rem;
}

.cart-item img {
  width: 64px;
  height: 82px;
  object-fit: cover;
}

.cart-item h6 {
  margin: 0 0 .25rem;
  font-size: .73rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.quantity-btn,
.remove-btn {
  padding: .15rem;
  border: 0;
  background: transparent;
}

.remove-btn {
  color: var(--muted);
  font-size: .7rem;
  text-decoration: underline;
}

.search-dialog {
  max-width: min(1180px, 94vw);
}

.search-results {
  min-height: 120px;
}

.search-results.search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: clamp(2.25rem, 3.5vw, 3rem);
}

.search-results.search-grid .product-card {
  width: 100%;
}

.search-results.search-grid .product-info {
  padding-top: .5rem;
}

.search-results.search-grid .product-name {
  font-size: .64rem;
}

.search-results.search-grid .product-price {
  font-size: .58rem;
}

.search-results.search-single {
  max-width: 340px;
  margin-bottom: 2rem;
}

.search-results.search-single .product-card {
  width: 100%;
}

.empty-state {
  padding: 2rem 0;
  color: var(--muted);
}

/* Administrador */
.admin-body {
  min-height: 100vh;
}

.admin-nav {
  background: var(--ink);
  color: var(--white);
}

.admin-main {
  max-width: 1200px;
}

.login-card {
  max-width: 440px;
  padding: 2rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.login-card h1 {
  margin: 0 0 .5rem;
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
}

.admin-card {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  transition: background-color .2s ease, color .2s ease;
}

.admin-card--dark {
  border-color: #d9d4cb;
  background: #efede8;
}

.admin-card h2 {
  margin-bottom: 1rem;
  font-size: .87rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-input-label {
  display: block;
  margin-bottom: .4rem;
  font-family: "DM Mono", monospace;
  font-size: .63rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 0;
  border-top: 1px solid #ebe8e2;
}

.admin-card--dark .admin-list-item {
  border-top-color: #d9d4cb;
}

.admin-list-item img {
  width: 48px;
  height: 62px;
  object-fit: cover;
}

.admin-list-thumbnail {
  flex: 0 0 58px;
  width: 58px !important;
  height: 72px !important;
  border: 1px solid var(--line);
  background: var(--sand);
  object-fit: cover;
}

.admin-media-preview {
  display: block;
  width: 100%;
  max-width: 170px;
  height: 128px;
  margin-top: .65rem;
  border: 1px solid var(--line);
  background: var(--sand);
  object-fit: cover;
}

.admin-product-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .6rem;
  margin-top: .8rem;
}

.admin-product-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: var(--sand);
}

.admin-product-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-product-preview span {
  position: absolute;
  right: .35rem;
  bottom: .35rem;
  padding: .2rem .35rem;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: .55rem;
}

.admin-image-details {
  margin-top: .8rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
}

.admin-card--dark .admin-image-details {
  border-top-color: #d9d4cb;
}

.admin-image-details summary,
.admin-url-details summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-family: "DM Mono", monospace;
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.admin-url-details {
  margin-top: .65rem;
}

.admin-url-details input,
.admin-url-details textarea,
.admin-url-input,
[data-banner-url],
.admin-url-textarea {
  max-width: min(100%, 25rem);
  margin-top: .65rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .72rem;
}

.admin-url-input,
[data-banner-url] {
  opacity: .82;
}

.admin-url-input:focus,
[data-banner-url]:focus {
  opacity: 1;
}

.category-banner-admin {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #faf9f6;
}

.category-banner-admin__image {
  width: 100%;
  height: 160px;
  background: var(--sand);
  object-fit: cover;
}

.category-banner-admin__body {
  padding: 1rem;
}

.admin-section-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.admin-card--dark .admin-section-actions {
  border-top-color: #d9d4cb;
}

.admin-section-actions .btn {
  min-width: 190px;
}

.admin-repeater-card {
  height: 100%;
  padding: .85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .5);
}

.admin-card--dark .admin-repeater-card {
  border-color: #d9d4cb;
  background: rgba(255, 255, 255, .42);
}

.admin-remove-item {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
}

.admin-remove-item:hover {
  color: var(--accent);
}

#productList {
  max-height: 520px;
  overflow-y: auto;
  padding-right: .45rem;
  scrollbar-width: thin;
}

/* Menú móvil */
.offcanvas {
  z-index: 1080;
}

.offcanvas-backdrop {
  z-index: 1070 !important;
}

#mainMenu {
  z-index: 1080;
}

@media (min-width: 992px) {
  .offcanvas.offcanvas-lg {
    position: static;
    display: block;
    width: auto;
    height: auto;
    visibility: visible !important;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none !important;
  }

  .offcanvas.offcanvas-lg .offcanvas-header {
    display: none;
  }

  .desktop-navigation {
    margin-left: auto;
  }

  .desktop-navigation .navbar-nav {
    display: flex;
  }
}

@media (max-width: 991.98px) {
  .navbar {
    min-height: 66px;
    flex-wrap: nowrap;
  }

  .navbar-brand {
    order: 1;
    margin-right: 0;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .navbar-toggler {
    order: 3;
    margin-left: .35rem;
  }

  .navbar-collapse {
    order: 4;
  }

  .offcanvas.offcanvas-lg {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    display: flex !important;
    width: 75vw !important;
    min-width: 280px;
    max-width: 430px !important;
    height: 100svh !important;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-left: 1px solid var(--line);
    background: var(--paper) !important;
    box-shadow: -14px 0 40px rgba(0, 0, 0, .14);
    overscroll-behavior: contain;
  }

  .offcanvas.offcanvas-lg .offcanvas-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 1.2rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .offcanvas.offcanvas-lg .offcanvas-body {
    display: block;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 1.2rem 1.5rem;
    background: var(--paper);
    overscroll-behavior: contain;
  }

  .offcanvas.offcanvas-lg .navbar-nav {
    width: 100%;
    margin: 0;
  }

  .offcanvas.offcanvas-lg .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .offcanvas.offcanvas-lg .nav-link {
    display: block;
    width: 100%;
    padding: 1rem 0 !important;
    color: var(--ink) !important;
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .offcanvas.offcanvas-lg .nav-link.active,
  .offcanvas.offcanvas-lg .nav-link:hover {
    color: var(--accent) !important;
  }

  .offcanvas.offcanvas-lg .btn-close {
    width: 2.5rem;
    height: 2.5rem;
    opacity: 1;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .85rem;
    row-gap: 2.5rem;
  }

  .product-rail .product-card {
    flex-basis: min(46vw, 360px);
  }

  .subcategory-rail .subcategory-card {
    flex-basis: min(36vw, 285px);
    width: min(36vw, 285px);
    height: 360px;
  }

  .search-results.search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .85rem;
    row-gap: 2.35rem;
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: .91rem;
  }

  .container-fluid {
    --bs-gutter-x: 1rem;
  }

  .announcement-bar {
    font-size: .57rem;
    letter-spacing: .04em;
  }

  .brand-link,
  [data-brand] {
    font-size: 1rem;
    letter-spacing: .12em;
  }

  .brand-logo {
    max-width: 150px;
    max-height: 32px;
  }

  .page-section {
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
  }

  .section-heading {
    align-items: start;
    margin-bottom: 1.25rem;
  }

  .text-link {
    padding-top: .35rem;
    font-size: .6rem;
  }

  .hero {
    height: calc(100svh - 92px);
    min-height: 470px;
  }

  .hero::after,
  .hero-secondary::after,
  .shop-hero::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .04) 76%);
  }

  .hero-content {
    padding: 1.5rem;
    padding-bottom: 3rem;
  }

  .hero-content h1 {
    font-size: clamp(2.9rem, 14vw, 4.3rem);
  }

  .editorial-video {
    min-height: 420px;
    padding: 1.5rem 1rem;
  }

  .video-copy {
    width: min(100%, 520px);
  }

  .video-copy h2 {
    font-size: clamp(2.35rem, 11vw, 3.8rem);
  }

  .hero-secondary {
    min-height: 610px;
  }

  .hero-secondary-copy {
    padding: 5.5rem 1.4rem;
  }

  .hero-secondary-copy h2 {
    font-size: clamp(3rem, 13vw, 4.5rem);
  }

  .shop-hero {
    min-height: 330px;
    padding: 1.5rem;
  }

  .product-rail,
  .subcategory-rail {
    gap: .65rem;
  }

  .product-rail .product-card {
    flex-basis: 78%;
    grid-template-rows: auto 3.25rem;
  }

  .subcategory-rail .subcategory-card {
    flex-basis: 72%;
    width: 72%;
    height: 320px;
  }

  .slider-controls {
    margin-top: .65rem;
  }

  .slider-dash {
    width: 1.25rem;
  }

  .slider-dash.is-active {
    width: 2.2rem;
  }

  .product-collage {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, minmax(145px, 43vw));
    gap: .4rem;
  }

  .product-collage .collage-tile:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .collage-tile > span {
    bottom: .65rem;
    left: .65rem;
    font-size: .55rem;
  }

  .reflection {
    min-height: 190px;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-select {
    width: 100%;
  }

  .filter-tabs {
    row-gap: .85rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: .7rem;
    row-gap: 2.65rem;
  }

  .product-info {
    min-height: 3.35rem;
    gap: .4rem;
  }

  .product-name {
    font-size: clamp(.62rem, 2.5vw, .7rem);
    line-height: 1.4;
  }

  .product-price {
    font-size: clamp(.56rem, 2.15vw, .63rem);
  }

  .product-tag {
    top: .5rem;
    left: .5rem;
  }

  .gallery-control {
    width: 2.25rem;
    height: 2.25rem;
    opacity: .8;
  }

  .gallery-control svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .product-modal-info {
    padding: 1.25rem;
  }

  .cart-item {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .cart-item img {
    width: 56px;
    height: 72px;
  }

  .search-dialog {
    max-width: 100%;
    min-height: 100%;
    margin: 0;
  }

  .search-dialog .modal-content {
    min-height: 100svh;
  }

  .search-results.search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: .7rem;
    row-gap: 2.35rem;
  }

  .search-results.search-single {
    max-width: min(100%, 340px);
  }

  .admin-card,
  .login-card {
    padding: 1rem;
  }

  .admin-list-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-list-item .flex-grow-1 {
    min-width: calc(100% - 72px);
  }

  .admin-list-item .btn {
    flex: 1 1 auto;
  }

  .admin-media-preview {
    max-width: 140px;
    height: 106px;
  }

  .admin-product-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-section-actions .btn {
    width: 100%;
  }

  #productList {
    max-height: 430px;
  }

  .offcanvas.offcanvas-lg {
    width: 75vw !important;
    min-width: 270px;
  }
}

@media (max-width: 374px) {
  .header-actions {
    gap: .35rem;
  }

  .icon-button,
  .navbar-toggler {
    width: 2rem;
  }

  .brand-link,
  [data-brand] {
    max-width: 142px;
    overflow: hidden;
    font-size: .87rem;
    letter-spacing: .08em;
    white-space: nowrap;
  }
}

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

/* Espaciado visual uniforme entre secciones consecutivas */
.page-section--before-next {
  padding-bottom: clamp(2.4rem, 3.5vw, 3.2rem);
}

.page-section--after-slider {
  padding-top: clamp(2.7rem, 3.8vw, 3.5rem);
}

.page-section--before-catalog {
  padding-bottom: clamp(2.8rem, 4vw, 3.6rem);
}

/* Header que se oculta al bajar y vuelve al subir */
.site-chrome {
  will-change: transform;
  transition: transform .28s ease;
}

.site-chrome.header-is-hidden {
  transform: translateY(calc(-100% - 1px));
}

/* Panel de control del administrador */
.admin-dashboard {
  margin-bottom: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  background: #f0ede7;
}

.admin-dashboard__intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-dashboard h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
}

.admin-dashboard__intro > div > p:last-child {
  max-width: 620px;
  margin: .7rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin-top: 1.5rem;
}

.admin-stat {
  display: grid;
  gap: .25rem;
  min-height: 104px;
  align-content: center;
  padding: .9rem;
  border: 1px solid #d5d0c6;
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  text-align: left;
  transition: background-color .2s ease, transform .2s ease;
}

.admin-stat:hover,
.admin-stat:focus-visible {
  background: var(--white);
  transform: translateY(-2px);
}

.admin-stat strong {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.admin-stat span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .61rem;
  letter-spacing: .04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.admin-dashboard__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.2rem;
}

.admin-dashboard__backup {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.2rem;
}

.admin-dashboard__backup .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.admin-dashboard__nav button {
  padding: .55rem .7rem;
  border: 1px solid #d5d0c6;
  background: transparent;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: .62rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-dashboard__nav button:hover,
.admin-dashboard__nav button:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.admin-card {
  scroll-margin-top: 1.25rem;
}

@media (max-width: 767.98px) {
  .admin-dashboard__intro {
    flex-direction: column;
  }

  .admin-dashboard__intro .btn {
    width: 100%;
  }

  .admin-dashboard__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard__nav button {
    min-height: 3rem;
  }

  .page-section--before-next {
    padding-bottom: 2.2rem;
  }

  .page-section--after-slider {
    padding-top: 2.45rem;
  }

  .page-section--before-catalog {
    padding-bottom: 2.7rem;
  }
}


.media-opens-product { cursor: pointer; }
.media-opens-product:focus-visible { outline: 2px solid currentColor; outline-offset: -8px; }
