:root {
  --ink: #161412;
  --muted: #6c625b;
  --paper: #f7f1ea;
  --ivory: #fffaf3;
  --line: #ded2c5;
  --navy: #111c31;
  --wine: #7a2634;
  --walnut: #6e4932;
  --shadow: 0 20px 50px rgba(22, 20, 18, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 180ms ease, color 180ms ease;
}

body.cart-open {
  overflow: hidden;
}

body.theme-dark {
  --ink: #f8f1e8;
  --muted: #c7b9aa;
  --paper: #0d0c0b;
  --ivory: #171513;
  --line: #302923;
  --wine: #b54a5d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

button,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 54px);
  color: var(--ivory);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled {
  background: rgba(255, 250, 243, 0.94);
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(22, 20, 18, 0.08);
  backdrop-filter: blur(16px);
}

body.theme-dark .site-header.scrolled {
  background: rgba(13, 12, 11, 0.92);
  color: #fffaf3;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
}

.brand,
.main-nav,
.header-actions,
.hero-actions,
.toolbar,
.cart-header,
.cart-total,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  position: relative;
  gap: 10px;
  width: clamp(132px, 16vw, 210px);
  height: 54px;
}

.brand-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 180ms ease;
}

.brand-logo-dark {
  filter: invert(1);
}

.brand-logo-dark,
.site-header.scrolled .brand-logo-light {
  opacity: 0;
}

.site-header.scrolled .brand-logo-dark {
  opacity: 1;
}

body.theme-dark .site-header.scrolled .brand-logo-light {
  opacity: 1;
}

body.theme-dark .site-header.scrolled .brand-logo-dark {
  opacity: 0;
}

.main-nav {
  gap: clamp(14px, 3vw, 36px);
  font-size: 0.9rem;
  font-weight: 600;
}

.header-actions {
  gap: 10px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wine);
  color: white;
  font-size: 0.72rem;
  line-height: 20px;
}

.bag-icon {
  position: relative;
  width: 18px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.bag-icon::before {
  position: absolute;
  left: 3px;
  top: -8px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.theme-toggle {
  overflow: hidden;
}

.theme-icon {
  position: relative;
  width: 18px;
  height: 18px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.sun-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.sun-icon::before {
  position: absolute;
  inset: -7px;
  background:
    linear-gradient(currentColor, currentColor) center top / 2px 5px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 2px 5px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) left center / 5px 2px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) right center / 5px 2px no-repeat;
  content: "";
}

.sun-icon::after {
  position: absolute;
  inset: -5px;
  border: 2px solid transparent;
  border-left-color: currentColor;
  border-right-color: currentColor;
  border-radius: 50%;
  content: "";
  transform: rotate(45deg);
}

.moon-icon {
  display: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset -7px 0 0 var(--ivory);
}

body.theme-dark .sun-icon {
  display: none;
}

body.theme-dark .moon-icon {
  display: block;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 128px clamp(20px, 6vw, 72px) 92px;
  color: var(--ivory);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(13, 12, 11, 0.76), rgba(13, 12, 11, 0.34) 50%, rgba(13, 12, 11, 0.05)),
    linear-gradient(0deg, rgba(13, 12, 11, 0.62), rgba(13, 12, 11, 0.1) 58%);
}

.hero-content {
  position: relative;
  width: min(620px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e8b3a4;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.96;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4.6rem);
}

.hero-logo {
  display: block;
  width: min(790px, 92vw);
  max-height: clamp(96px, 14vw, 142px);
  margin: 0 0 28px;
  object-fit: contain;
  object-position: left center;
}

.hero-kicker {
  margin-bottom: 14px;
  color: #e8b3a4;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-copy {
  max-width: 560px;
  margin-bottom: 14px;
  color: rgba(255, 250, 243, 0.9);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-availability {
  margin-bottom: 28px;
  color: var(--ivory);
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.theme-dark .hero-availability {
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72);
}

.hero-actions,
.toolbar {
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.filter-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.button.primary {
  background: var(--wine);
  color: white;
}

.button.ghost {
  border-color: rgba(255, 250, 243, 0.72);
  color: var(--ivory);
}

body.theme-dark .button.ghost {
  background: rgba(255, 250, 243, 0.12);
  border-color: rgba(255, 250, 243, 0.92);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.button.full {
  width: 100%;
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.intro-band article {
  min-height: 150px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--ivory);
  transition: background 180ms ease, color 180ms ease;
}

.intro-band strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.intro-band span,
.section-heading p,
.fit-copy p,
.order-section p {
  color: var(--muted);
  line-height: 1.7;
}

.collection,
.fit-section,
.order-section {
  padding: clamp(58px, 8vw, 112px) clamp(20px, 6vw, 72px);
}

.collection {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 250, 243, 0.76), rgba(255, 250, 243, 0.9)),
    url("assets/archivio-collection-bg.png") center / cover no-repeat;
}

body.theme-dark .collection {
  background:
    linear-gradient(rgba(13, 12, 11, 0.84), rgba(13, 12, 11, 0.92)),
    url("assets/archivio-collection-bg.png") center / cover no-repeat;
}

.collection-emblem {
  position: absolute;
  top: 42px;
  right: clamp(-90px, -8vw, -28px);
  width: min(34vw, 330px);
  max-height: 440px;
  object-fit: contain;
  opacity: 0.035;
  pointer-events: none;
}

body.theme-dark .collection-emblem {
  filter: invert(1);
  opacity: 0.05;
}

.section-heading {
  position: relative;
  max-width: 820px;
  margin-bottom: 28px;
}

.toolbar {
  position: relative;
  margin-bottom: 28px;
}

.filter-button {
  padding: 0 18px;
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

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

.product-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ivory);
  box-shadow: 0 12px 30px rgba(22, 20, 18, 0.06);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.theme-dark .product-card {
  background: #141210;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.product-visual {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.view-label {

    position:absolute;
    left:14px;
    top:14px;
    min-height:30px;
    padding:0 12px;
    border:1px solid rgba(22,20,18,.12);
    border-radius:999px;
    background:rgba(255,255,255,.86);
    color:#161412;
    font-size:.76rem;
    font-weight:800;
    line-height:30px;
    text-transform:uppercase;

}
.color-label {

    position: absolute;

    left: 14px;

    bottom: 14px;

    padding: 0 12px;

    min-height: 30px;

    border: 1px solid rgba(22,20,18,.12);

    border-radius: 999px;

    background: rgba(255,255,255,.86);

    color: #161412;

    font-size: .76rem;

    font-weight: 800;

    line-height: 30px;

    text-transform: uppercase;

    z-index: 10;

}

.slide-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.slide-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(22, 20, 18, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: #161412;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.slide-button:hover {
  background: #ffffff;
}

.product-info {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.product-title-row h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.price {
  color: var(--wine);
  font-weight: 800;
  white-space: nowrap;
}

.product-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.product-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-options label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-options select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
}

body.theme-dark .product-options select {
  background: #0f0e0d;
  color: var(--ink);
}

.fit-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  background: var(--ink);
  color: var(--ivory);
}

body.theme-dark .fit-section {
  background: #050505;
  color: #fffaf3;
}

.fit-copy p {
  color: rgba(255, 250, 243, 0.72);
}

.fit-emblem {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  top: 50%;
  width: min(30vw, 260px);
  max-height: 72%;
  transform: translateY(-50%);
  object-fit: contain;
  opacity: 0.055;
  pointer-events: none;
}

.size-table {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 243, 0.22);
  border-radius: 8px;
}

.size-table [role="row"] {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr;
}

.size-table span {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 250, 243, 0.16);
}

.size-table [role="row"]:first-child {
  background: rgba(255, 250, 243, 0.08);
  font-weight: 800;
}

.size-table [role="row"]:last-child span {
  border-bottom: 0;
}

.order-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--ivory);
}

.order-section div {
  max-width: 760px;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  width: min(420px, 100vw);
  height: 100vh;
  grid-template-rows: auto 1fr auto;
  transform: translateX(105%);
  background: var(--ivory);
  box-shadow: var(--shadow);
  transition: transform 220ms ease;
}

body.theme-dark .cart-panel {
  background: #141210;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-header,
.cart-footer {
  padding: 22px;
}

.cart-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin-bottom: 0;
  font-size: 2.3rem;
}

.cart-items {
  overflow: auto;
  padding: 10px 22px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.remove-item {
  border: 0;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
}

.cart-footer {
  border-top: 1px solid var(--line);
}

.cart-total {
  justify-content: space-between;
  margin-bottom: 16px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: rgba(22, 20, 18, 0.38);
  opacity: 0;
  transition: opacity 220ms ease;
}

.overlay.open {
  pointer-events: auto;
  opacity: 1;
}

.site-footer {
  justify-content: space-between;
  padding: 28px clamp(20px, 6vw, 72px);
  background: var(--ink);
  color: var(--ivory);
}

body.theme-dark .site-footer {
  background: #050505;
  color: #fffaf3;
}

.site-footer span {
  font-weight: 800;
  letter-spacing: 0.14em;
}

.site-footer img {
  width: min(190px, 48vw);
  height: 46px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding-bottom: 72px;
  }

  .intro-band,
  .product-grid,
  .fit-section {
    grid-template-columns: 1fr;
  }

  .order-section {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand {
    font-size: 0.88rem;
  }

  .hero {
    min-height: 84vh;
    padding: 106px 18px 56px;
  }

  .hero-image {
    object-position: 58% center;
  }

  .hero-actions .button {
    width: 100%;
  }

  .product-options {
    grid-template-columns: 1fr;
  }

  .size-table span {
    padding: 14px 10px;
    font-size: 0.88rem;
  }
}
.product-visual {
    overflow: hidden;
    position: relative;
}

.product-visual img {
    transition:
        transform .25s ease,
        transform-origin .1s linear;
    cursor: zoom-in;
    will-change: transform;
}
/*==========================
  FLY TO CART
==========================*/

.flying-product{

    position:fixed;

    z-index:9999;

    pointer-events:none;

    border-radius:10px;

    box-shadow:0 18px 40px rgba(0,0,0,.22);

    transition:
        transform .75s cubic-bezier(.22,1,.36,1),
        opacity .75s;

    will-change:transform,opacity;

}


/*==========================
  REBOTE DEL CARRITO
==========================*/

.cart-bounce{

    animation:cartBounce .45s ease;

}

@keyframes cartBounce{

    0%{
        transform:scale(1);
    }

    35%{
        transform:scale(1.18);
    }

    60%{
        transform:scale(.93);
    }

    100%{
        transform:scale(1);
    }

}


/*==========================
  CONTADOR
==========================*/

.count-pop{

    animation:countPop .35s ease;

}

@keyframes countPop{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.35);
    }

    100%{
        transform:scale(1);
    }

}
.cart-flash{

    animation:
        cartFlash .55s ease;

}

@keyframes cartFlash{

    0%{

        box-shadow:
            0 0 0 rgba(122,38,52,0);

    }

    35%{

        box-shadow:
            0 0 0 12px rgba(122,38,52,.20);

    }

    100%{

        box-shadow:
            0 0 0 rgba(122,38,52,0);

    }

}
.product-status{

    min-height:18px;

    margin-top:4px;

    font-size:.82rem;

    font-weight:600;

    color:#2E7D32;

    opacity:0;

    transform:translateY(-4px);

    transition:all .25s ease;

}

.product-status.active{

    opacity:1;

    transform:translateY(0);

}
/* ===== IMAGE VIEWER ===== */

.image-viewer{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.88);

    display:flex;
    align-items:center;
    justify-content:center;

    opacity:0;
    visibility:hidden;

    transition:
        opacity .28s ease,
        visibility .28s ease;

    z-index:9999;

    backdrop-filter:blur(10px);
}

.image-viewer.open{
    opacity:1;
    visibility:visible;
}

.viewer-image{
    max-width:90vw;
    max-height:88vh;

    object-fit:contain;

    transform:scale(.92);

    transition:transform .28s ease;

    user-select:none;
    pointer-events:none;
}

.image-viewer.open .viewer-image{
    transform:scale(1);
}

.viewer-close{
    position:absolute;

    top:24px;
    right:24px;

    width:48px;
    height:48px;

    border:none;
    border-radius:50%;

    cursor:pointer;

    font-size:22px;

    background:white;
    color:black;

    transition:transform .2s ease;
}

.viewer-close:hover{
    transform:scale(1.08);
}
/* ===== LIGHTBOX ===== */

/* ===== LIGHTBOX ===== */

.lightbox{
    position:fixed;
    inset:0;

    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(5,5,5,.88);
    backdrop-filter:blur(14px);

    opacity:0;
    visibility:hidden;

    transition:
        opacity .35s ease,
        visibility .35s ease;

    z-index:9999;
}

.lightbox.open{
    opacity:1;
    visibility:visible;
}

.lightbox-content{
    display:flex;
    justify-content:center;
    align-items:center;

    max-width:90vw;
    max-height:90vh;

    perspective:1400px;
    transform-style:preserve-3d;
}

.lightbox-content img{

    max-width:92vw;
    max-height:90vh;

    object-fit:contain;

    transform:
        translateY(20px)
        scale(.92);
transform-style: preserve-3d;
will-change: transform;
backface-visibility: hidden;
cursor: grab;
    opacity:0;

    transition:
        transform .45s cubic-bezier(.22,1,.36,1),
        opacity .35s ease;
}

.lightbox.open .lightbox-content img{

    transform:
        translateY(0)
        scale(1);

    opacity:1;

    animation:
        artworkFloat .9s cubic-bezier(.22,1,.36,1);
}

.lightbox-close{

    position:absolute;

    top:24px;
    right:24px;

    width:48px;
    height:48px;

    border:none;
    border-radius:50%;

    cursor:pointer;

    background:white;
    color:black;

    font-size:28px;

    transition:
        transform .25s ease,
        opacity .25s ease;
}

.lightbox-close:hover{

    transform:scale(1.12);

}
@keyframes artworkFloat{

    0%{

        transform:
            translateY(24px)
            scale(.92)
            rotateX(-4deg);

    }

    35%{

        transform:
            translateY(-6px)
            scale(1.02)
            rotateX(2deg);

    }

    60%{

        transform:
            translateY(3px)
            scale(.995)
            rotateX(-1deg);

    }

    100%{

        transform:
            translateY(0)
            scale(1)
            rotateX(0deg);

    }

}
/* ===== GYRO INTRO ===== */

.gyro-intro{

    position:absolute;
    inset:0;

    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(5,5,5,.92);
    backdrop-filter:blur(14px);

    opacity:0;
    visibility:hidden;

    transition:.35s ease;

    z-index:30;

}

.gyro-intro.show{

    opacity:1;
    visibility:visible;

}

.gyro-card{

    width:min(420px,90vw);

    text-align:center;

    color:white;

    animation:gyroCard .6s cubic-bezier(.22,1,.36,1);

}

.gyro-label{

    display:block;

    font-size:.8rem;

    letter-spacing:.35em;

    color:#999;

    margin-bottom:18px;

    text-transform:uppercase;

}

.gyro-card h2{

    font-size:2rem;

    font-weight:500;

    margin-bottom:14px;

}

.gyro-card p{

    color:#bdbdbd;

    line-height:1.8;

    margin-bottom:35px;

}

.gyro-icon{

    font-size:58px;

    margin-bottom:35px;

    animation:gyroPhone 2.2s ease-in-out infinite;

}

.gyro-button{

    background:white;

    color:black;

    border:none;

    padding:14px 34px;

    border-radius:999px;

    font-size:15px;

    cursor:pointer;

    transition:.25s;

}

.gyro-button:hover{

    transform:translateY(-2px);

}

@keyframes gyroPhone{

    0%{transform:rotate(0deg);}
    25%{transform:rotate(-12deg);}
    50%{transform:rotate(12deg);}
    75%{transform:rotate(-8deg);}
    100%{transform:rotate(0deg);}

}

@keyframes gyroCard{

    from{

        opacity:0;
        transform:translateY(20px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}