.wine-detail-page {
  --wine-accent: #7b1c2c;
  --wine-copper: #c07b46;
  --wine-ink: #241817;
  --wine-muted: #6e625c;
  --wine-soft: #f8efe6;
  position: relative;
  isolation: isolate;
  padding: 148px 6% 110px;
  background:
    linear-gradient(180deg, rgba(251, 248, 242, 0.88) 0%, rgba(247, 240, 231, 0.8) 24%, rgba(239, 227, 212, 0.84) 100%),
    radial-gradient(circle at top left, rgba(192, 123, 70, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(123, 28, 44, 0.12), transparent 30%),
    url("Vinos/pedroheras-galgo-artistico.jpg") center top / cover fixed no-repeat;
}

.wine-detail-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.28), transparent 26%),
    radial-gradient(circle at 84% 74%, rgba(123, 28, 44, 0.08), transparent 24%);
}

.wine-detail-shell {
  max-width: 1340px;
  margin: 0 auto;
}

.wine-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--wine-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.wine-back-link::before {
  content: "<";
  font-size: 14px;
}

.wine-detail-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
  align-items: stretch;
}

.wine-visual-card,
.wine-copy-card,
.wine-panel {
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(123, 28, 44, 0.08);
  box-shadow: 0 24px 58px rgba(36, 21, 19, 0.1);
  backdrop-filter: blur(12px);
}

.wine-visual-card {
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 640px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(192, 123, 70, 0.18), transparent 34%),
    linear-gradient(180deg, #fffefb 0%, #f3e7d8 100%);
}

.wine-visual-card img {
  display: block;
  width: 100%;
  max-width: 380px;
  max-height: 560px;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(36, 21, 19, 0.2));
  transform-origin: center center;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.wine-visual-card:hover img {
  transform: scale(1.28);
  filter: drop-shadow(0 32px 52px rgba(36, 21, 19, 0.28));
}

.wine-visual-card {
  cursor: zoom-in;
}

.wine-copy-card {
  padding: 38px 38px 40px;
}

.wine-kicker {
  margin: 0 0 18px;
  color: var(--wine-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wine-topline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.wine-category,
.wine-stock,
.wine-highlight,
.wine-meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wine-category {
  background: rgba(123, 28, 44, 0.08);
  color: var(--wine-accent);
}

.wine-stock {
  background: rgba(154, 32, 54, 0.12);
  color: var(--wine-accent);
}

.wine-stock.is-empty {
  background: rgba(123, 28, 44, 0.14);
  color: #ffffff;
}

.wine-copy-card h1 {
  margin: 0 0 12px;
  color: var(--wine-ink);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
}

.wine-subtitle {
  margin: 0 0 14px;
  color: var(--wine-muted);
  font-size: 18px;
  line-height: 1.7;
}

.wine-price {
  margin: 0 0 22px;
  color: var(--wine-accent);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1;
}

.wine-highlight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.wine-highlight,
.wine-meta-pill {
  background: rgba(36, 24, 23, 0.05);
  color: #534640;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
  font-weight: 700;
}

.wine-description-text {
  margin: 0 0 28px;
  color: var(--wine-muted);
  font-size: 17px;
  line-height: 1.9;
}

.wine-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wine-add-cart,
.wine-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.wine-add-cart {
  border: 0;
  background: linear-gradient(135deg, #7b1c2c, #9c2f44);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(123, 28, 44, 0.24);
}

.wine-add-cart:hover,
.wine-secondary-link:hover {
  transform: translateY(-3px);
}

.wine-add-cart.is-added {
  background: linear-gradient(135deg, #3c7c4b, #4e9460);
  box-shadow: 0 18px 34px rgba(60, 124, 75, 0.24);
}

.wine-add-cart:disabled {
  background: linear-gradient(135deg, #c5b5ae, #b3a39b);
  cursor: not-allowed;
  box-shadow: none;
}

.wine-secondary-link {
  background: rgba(123, 28, 44, 0.08);
  color: var(--wine-accent);
}

.wine-detail-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.wine-panel {
  padding: 28px;
}

.wine-panel h2 {
  margin: 0 0 20px;
  color: var(--wine-ink);
  font-size: 24px;
  line-height: 1.2;
}

.wine-panel p {
  margin: 0 0 14px;
  color: var(--wine-muted);
  font-size: 16px;
  line-height: 1.9;
}

.wine-panel p:last-child {
  margin-bottom: 0;
}

.wine-wide-panel {
  grid-column: span 12;
}

.wine-specs-panel {
  grid-column: span 5;
}

.wine-notes-panel {
  grid-column: span 7;
}

.wine-pairing-panel,
.wine-story-panel {
  grid-column: span 6;
}

.wine-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.wine-related-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 18px;
  border-radius: 24px;
  background: rgba(250, 244, 238, 0.92);
  border: 1px solid rgba(123, 28, 44, 0.08);
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.wine-related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(36, 21, 19, 0.1);
}

.wine-related-media {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid rgba(123, 28, 44, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  background:
    radial-gradient(circle at top, rgba(192, 123, 70, 0.14), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #f5ede2 100%);
}

.wine-related-media img {
  display: block;
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
  padding: 8px;
  border-radius: 16px;
  filter: drop-shadow(0 14px 24px rgba(36, 21, 19, 0.14));
}

.wine-related-category {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(123, 28, 44, 0.08);
  color: var(--wine-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wine-related-card h3 {
  margin: 0;
  color: var(--wine-ink);
  font-size: 18px;
  line-height: 1.3;
  min-height: calc(18px * 1.3 * 2);
}

.wine-related-price {
  margin: 0;
  color: var(--wine-accent);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  min-height: 22px;
}

.wine-related-copy {
  margin: 4px 0 0;
  color: var(--wine-muted);
  font-size: 14px;
  line-height: 1.7;
}

.wine-shipping-copy h3 {
  margin: 24px 0 10px;
  color: var(--wine-ink);
  font-size: 18px;
  line-height: 1.3;
}

.wine-shipping-copy h3:first-child {
  margin-top: 0;
}

.wine-shipping-copy ul {
  margin: 0;
  padding-left: 20px;
  color: var(--wine-muted);
}

.wine-shipping-copy li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.wine-shipping-copy li:last-child {
  margin-bottom: 0;
}

.wine-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wine-spec-card,
.wine-note-card {
  border-radius: 24px;
  background: rgba(250, 244, 238, 0.92);
  border: 1px solid rgba(123, 28, 44, 0.08);
}

.wine-spec-card {
  padding: 20px;
}

.wine-spec-icon,
.wine-note-icon,
.wine-pairing-icon {
  width: 28px;
  height: 28px;
  padding: 4px;
  border: 1px solid rgba(123, 28, 44, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  object-fit: contain;
}

.wine-spec-label {
  margin: 14px 0 8px;
  color: var(--wine-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wine-spec-value {
  margin: 0;
  color: var(--wine-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.wine-note-stack {
  display: grid;
  gap: 14px;
}

.wine-note-card {
  padding: 18px 18px 18px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
}

.wine-note-card p {
  margin: 0;
}

.wine-pairing-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.wine-pairing-head h2 {
  margin: 0;
}

.wine-empty-state {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 40px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(123, 28, 44, 0.08);
  box-shadow: 0 20px 50px rgba(36, 21, 19, 0.08);
  text-align: center;
}

.wine-empty-state h1 {
  margin: 0 0 16px;
  color: var(--wine-ink);
}

.wine-empty-state p {
  margin: 0;
  color: var(--wine-muted);
  line-height: 1.8;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.36);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 950;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-toggle {
  width: 34px;
  height: 26px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2000;
  padding: 0;
  border-radius: 999px;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: #222;
  border-radius: 0;
  transition: 0.35s ease;
}

.menu-toggle:hover {
  transform: none;
}

.menu-toggle.active span:nth-child(1) {
  width: 100%;
  transform: none;
}

.menu-toggle.active span:nth-child(2) {
  opacity: 1;
  transform: none;
}

.menu-toggle.active span:nth-child(3) {
  width: 100%;
  transform: none;
}

@media (max-width: 1180px) {
  .wine-detail-hero {
    grid-template-columns: 1fr;
  }

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

  .wine-specs-panel,
  .wine-notes-panel,
  .wine-pairing-panel,
  .wine-story-panel,
  .wine-wide-panel {
    grid-column: span 2;
  }

  .wine-visual-card {
    min-height: 520px;
  }

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

@media (max-width: 1100px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 18px;
    right: 18px;
    width: min(360px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    padding: 86px 26px 32px;
    background: #fffdf8;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 22px;
    border: 1px solid rgba(114, 47, 55, 0.08);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(33, 18, 12, 0.16);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(18px) scale(0.98);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
    z-index: 1500;
  }

  .main-nav.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }

  .main-nav a {
    width: 100%;
    padding: 10px 0;
    font-size: 20px;
    border-bottom: 1px solid rgba(114, 47, 55, 0.08);
  }
}

@media (max-width: 992px) {
  .site-header {
    height: 74px;
  }

  .header-inner {
    padding: 0 24px;
  }

  .logo img {
    width: 115px;
  }

  .main-nav {
    gap: 16px;
  }

  .main-nav a {
    font-size: 18px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }
}

@media (max-width: 760px) {
  .wine-detail-page {
    padding: 130px 5% 92px;
    background:
      linear-gradient(180deg, rgba(251, 248, 242, 0.92) 0%, rgba(247, 240, 231, 0.88) 24%, rgba(239, 227, 212, 0.9) 100%),
      radial-gradient(circle at top left, rgba(192, 123, 70, 0.12), transparent 28%),
      radial-gradient(circle at top right, rgba(123, 28, 44, 0.12), transparent 30%),
      url("Vinos/pedroheras-galgo-artistico.jpg") center 180px / 165% auto no-repeat scroll;
  }

  .site-header {
    height: 68px;
  }

  .header-inner {
    padding: 0 18px;
  }

  .logo img {
    width: 100px;
  }

  .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    margin-right: 14px;
    background: #722f37;
    border: 1px solid rgba(114, 47, 55, 0.18);
    border-radius: 50%;
    box-shadow: 0 12px 24px rgba(114, 47, 55, 0.18);
    z-index: 3000;
  }

  .menu-toggle span {
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
  }

  .menu-toggle.active span:nth-child(1) {
    width: 18px;
    background: #fff;
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.3);
  }

  .menu-toggle.active span:nth-child(3) {
    width: 18px;
    background: #fff;
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-nav {
    top: 68px;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 68px);
    gap: 14px;
    padding: 20px 22px 28px;
    background: #fff;
    border: none;
    border-top: 1px solid rgba(114, 47, 55, 0.08);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 20px 35px rgba(33, 18, 12, 0.08);
    transform: translateY(-12px);
  }

  .main-nav a {
    position: relative;
    padding: 10px 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #2b201d;
  }

  .main-nav a::after {
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #722f37;
    transform: none;
  }

  .cart {
    font-size: 14px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo-link {
    justify-content: center;
  }

  .footer-socials {
    align-items: center;
  }

  .footer-country {
    justify-content: center;
  }

  .wine-copy-card,
  .wine-panel,
  .wine-visual-card {
    padding: 24px;
    border-radius: 28px;
  }

  .wine-visual-card {
    min-height: 420px;
  }

  .wine-detail-grid {
    grid-template-columns: 1fr;
  }

  .wine-specs-panel,
  .wine-notes-panel,
  .wine-pairing-panel,
  .wine-story-panel,
  .wine-wide-panel {
    grid-column: span 1;
  }

  .wine-spec-grid {
    grid-template-columns: 1fr;
  }

  .wine-related-grid {
    grid-template-columns: 1fr;
  }

  .wine-copy-card h1 {
    font-size: clamp(32px, 9vw, 48px);
  }

  .wine-subtitle,
  .wine-description-text,
  .wine-panel p {
    font-size: 15px;
  }

  .age-box {
    width: 92%;
    padding: 38px 24px;
  }

  .age-box img {
    width: 140px;
  }

  .age-box p {
    font-size: 17px;
  }

  .age-buttons {
    flex-direction: column;
  }

  .age-buttons button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .footer-legal {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .wine-detail-page {
    background:
      linear-gradient(180deg, rgba(251, 248, 242, 0.94) 0%, rgba(247, 240, 231, 0.9) 24%, rgba(239, 227, 212, 0.92) 100%),
      radial-gradient(circle at top left, rgba(192, 123, 70, 0.12), transparent 28%),
      radial-gradient(circle at top right, rgba(123, 28, 44, 0.12), transparent 30%),
      url("Vinos/pedroheras-galgo-artistico.jpg") center 220px / 210% auto no-repeat scroll;
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 92px;
  }

  .cart {
    font-size: 13px;
  }

  .cart-icon {
    width: 30px;
    height: 30px;
  }

  .main-nav {
    top: 68px;
    right: 0;
    width: 100%;
    padding: 18px 16px 24px;
  }

  .menu-toggle {
    margin-right: 10px;
  }

  .main-nav a {
    font-size: 16px;
  }
}