/* ProductDetail Page */
.product-detail-page,
.product-modal-overlay {
  --surface: #ffffff;
  --surface-soft: #faf8f4;
  --ink-strong: #1a120b;
  --ink-body: #6b5d4c;
  --line-subtle: #e8e4da;
  --accent: #b48645;
  --accent-soft: #9c6f35;
  --gold: #d2a54e;
}

.product-detail-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.14), transparent 35%),
    radial-gradient(circle at 85% 90%, rgba(53, 95, 73, 0.2), transparent 45%),
    rgba(14, 18, 16, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.4vw, 30px);
  overflow: hidden;
  animation: modalOverlayIn 0.4s ease-out both;
}

.product-modal-overlay,
.product-modal-shell,
.product-modal-close,
.thumbnail,
.quantity-selector button,
.add-to-cart-btn,
.social-sharing a,
.option-select {
  -webkit-tap-highlight-color: transparent;
}

.product-modal-overlay *,
.product-modal-overlay *::before,
.product-modal-overlay *::after {
  box-sizing: border-box;
}

.product-modal-overlay.is-closing {
  pointer-events: none;
  animation: modalOverlayOut 0.32s ease-in both;
}

.product-modal-shell {
  position: relative;
  width: min(1220px, 100%);
  max-height: min(900px, calc(100dvh - clamp(28px, 4.8vw, 60px)));
  background: linear-gradient(180deg, #ffffff 0%, #fefdfb 100%);
  border: 1px solid rgba(232, 228, 218, 0.9);
  border-radius: 18px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.28),
    0 4px 14px rgba(19, 27, 22, 0.12);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  animation: modalShellIn 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.product-modal-shell.is-closing {
  animation: modalShellOut 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.product-modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(205, 216, 208, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: #1a120b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  flex: 0 0 auto;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.product-modal-close:hover {
  background: #fbf7ef;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(34, 58, 46, 0.18);
}

.product-not-found {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.product-not-found h1 {
  font-size: 32px;
  margin-bottom: 30px;
  font-family: var(--font-display, Georgia, 'Times New Roman', serif);
}

.product-not-found button {
  padding: 12px 30px;
  background: #333;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.product-detail-container {
  flex: 1;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.product-detail-container.modal-layout {
  max-width: 100%;
  clear: both;
  padding: 22px clamp(22px, 3vw, 38px) clamp(26px, 3vw, 38px);
  animation: detailContentIn 0.6s cubic-bezier(0.18, 0.85, 0.28, 1) both;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--ink-body);
  text-decoration: none;
  transition: color 0.25s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span:last-child {
  color: var(--ink-strong);
  font-weight: 500;
}

.product-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

/* Galería de imágenes */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.25;
  background: linear-gradient(160deg, #f8f8f7 0%, #efeee9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line-subtle);
  box-shadow:
    0 14px 30px rgba(23, 32, 27, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.main-image-wrapper .badge-save,
.main-image-wrapper .badge-soldout {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
  animation: imageFadeIn 0.42s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.thumbnails-gallery {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.thumbnail {
  flex: 0 0 auto;
  width: clamp(58px, 6.2vw, 74px);
  height: clamp(58px, 6.2vw, 74px);
  border: 1px solid #d6d9d2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 2px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.active {
  border-color: var(--accent);
  box-shadow: 0 10px 18px rgba(39, 73, 56, 0.16);
}

.thumbnail:hover {
  border-color: #d3b77d;
  transform: translateY(-2px);
}

/* Información del producto */
.product-info {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vw, 20px);
  min-width: 0;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stars {
  display: flex;
  gap: 4px;
  color: var(--gold);
}

.stars i {
  font-size: 14px;
}

.rating-text {
  font-size: 13px;
  color: var(--ink-body);
}

.product-reviews {
  margin-top: clamp(42px, 7vw, 86px);
  padding: clamp(28px, 5vw, 52px) 0 0;
  border-top: 1px solid rgba(107, 79, 42, 0.18);
}

.reviews-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.reviews-heading h2 {
  margin: 0;
  color: #2f2416;
  font: 600 clamp(2rem, 4vw, 3.35rem) / 1 var(--font-display);
}

.reviews-score {
  min-width: 124px;
  text-align: right;
}

.reviews-score strong {
  display: block;
  color: #2f2416;
  font: 700 2.1rem/1 var(--font-display);
}

.reviews-score span {
  color: #77654d;
  font: 700 0.76rem/1.3 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reviews-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
}

.review-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(107, 79, 42, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff8ef 100%);
  box-shadow: 0 18px 34px rgba(35, 23, 12, 0.08);
}

.review-form label {
  display: grid;
  gap: 7px;
  color: #3a2b1b;
  font: 800 0.78rem/1.2 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.review-form input,
.review-form textarea {
  width: 100%;
  border: 1px solid rgba(107, 79, 42, 0.22);
  border-radius: 10px;
  background: #fff;
  color: #2f2416;
  padding: 0.78rem 0.9rem;
  font: 500 0.95rem/1.45 var(--font-sans);
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-form input:focus,
.review-form textarea:focus {
  border-color: #c49a62;
  box-shadow: 0 0 0 3px rgba(196, 154, 98, 0.14);
  outline: 0;
}

.review-form textarea {
  resize: vertical;
  min-height: 118px;
}

.review-star-input {
  display: flex;
  gap: 4px;
}

.review-star-input button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(224, 123, 57, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #e07b39;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.review-star-input button:hover {
  transform: translateY(-1px);
  border-color: rgba(224, 123, 57, 0.45);
  background: #fff7ef;
}

.review-star-input button.is-active i::before {
  content: "\f586";
}

.review-form button[type="submit"] {
  border: 0;
  border-radius: 10px;
  background: #2f2416;
  color: #fffaf0;
  padding: 0.95rem 1rem;
  font: 800 0.78rem/1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.review-form button[type="submit"]:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.review-form button[type="submit"]:disabled {
  opacity: 0.62;
}

.review-notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(74, 124, 89, 0.11);
  color: #4a7c59;
  font: 700 0.85rem/1.45 var(--font-sans);
}

.review-notice.is-error {
  background: rgba(163, 57, 45, 0.12);
  color: #a3392d;
}

.reviews-list {
  display: grid;
  gap: 14px;
}

.review-card {
  padding: 18px;
  border: 1px solid rgba(107, 79, 42, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.95) 0%, rgba(255, 247, 235, 0.92) 100%);
  box-shadow: 0 14px 26px rgba(35, 23, 12, 0.07);
}

.review-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.review-card h3 {
  margin: 0;
  color: #2f2416;
  font: 700 1.02rem/1.25 var(--font-sans);
}

.review-card-stars {
  flex: 0 0 auto;
  color: #e07b39;
  font-size: 0.9rem;
}

.review-card p {
  margin: 0 0 10px;
  color: #5f5140;
  font: 500 0.96rem/1.65 var(--font-sans);
}

.review-card small,
.reviews-empty {
  color: #8b795f;
  font: 700 0.78rem/1.4 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reviews-empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(107, 79, 42, 0.22);
}

@media (max-width: 780px) {
  .reviews-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .reviews-heading,
  .review-card-head {
    align-items: start;
    flex-direction: column;
  }

  .reviews-score {
    text-align: left;
  }
}

.product-title {
  font-size: clamp(2rem, 2vw + 1.2rem, 2.7rem);
  font-family: var(--font-display, Georgia, 'Times New Roman', serif);
  margin: 0;
  line-height: 1.08;
  color: #1a120b;
  overflow-wrap: anywhere;
}

.price-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.price-label {
  font-size: 13px;
  color: var(--ink-body);
  font-weight: 500;
}

.current-price {
  font-size: clamp(1.75rem, 2.2vw, 2.15rem);
  font-weight: 700;
  color: #1a120b;
}

.product-detail-page .original-price {
  font-size: 16px;
  color: #9a8b76;
  text-decoration: line-through;
}

.price-note {
  margin: 0;
  color: #766756;
  font: 500 0.8rem/1.45 var(--font-sans);
  max-width: 46ch;
}

.shipping-info {
  font-size: 13px;
  color: var(--ink-body);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.shipping-info i {
  color: var(--accent);
}

.product-description {
  font-size: 15px;
  line-height: 1.72;
  color: #6b5d4c;
  margin: 0;
}

/* Opciones seleccionables */
.options-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line-subtle);
  border-radius: 14px;
  background: linear-gradient(180deg, #fefcf8 0%, #fbf8f0 100%);
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  font-size: 12px;
  font-weight: 600;
  color: #4f4235;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.option-select {
  padding: 12px;
  border: 1px solid #ded4c5;
  border-radius: 10px;
  font-size: 14px;
  color: #6b5d4c;
  cursor: pointer;
  background-color: #fff;
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

.option-select:hover,
.option-select:focus {
  border-color: #c9a66c;
  box-shadow: 0 0 0 4px rgba(79, 124, 100, 0.12);
  outline: none;
}

/* Sección de cantidad e introducir acción */
.base-preview-card,
.custom-length-box,
.custom-base-box {
  border: 1px solid #e4d8c8;
  border-radius: 12px;
  background: #fffaf3;
  padding: 12px;
}

.base-preview-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.base-preview-card img {
  width: 84px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2d6c6;
}

.base-preview-card strong {
  display: block;
  margin-bottom: 4px;
  color: #241810;
  font: 800 0.9rem/1.2 var(--font-sans);
}

.base-preview-card p,
.custom-size-limits,
.custom-base-upload small,
.custom-base-files span {
  margin: 0;
  color: #766756;
  font: 500 0.8rem/1.45 var(--font-sans);
}

.custom-length-box,
.custom-base-box {
  display: grid;
  gap: 10px;
}

.custom-length-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.custom-length-grid label,
.custom-base-box label:not(.custom-base-upload) {
  display: grid;
  gap: 6px;
}

.custom-length-grid span,
.custom-base-box label span {
  color: #8a6a45;
  font: 800 0.68rem/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-length-grid input,
.custom-base-box textarea {
  width: 100%;
  border: 1px solid #ded4c5;
  border-radius: 10px;
  background: #fff;
  color: #241810;
  padding: 12px;
  font: 500 0.9rem/1.35 var(--font-sans);
}

.custom-size-error {
  color: #b94a20;
  font: 600 0.8rem/1.4 var(--font-sans);
  background: #fff4f0;
  border: 1px solid #f5c4b2;
  border-radius: 8px;
  padding: 8px 12px;
}

.custom-base-upload {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 116px;
  border: 1.5px dashed #cdbb9f;
  border-radius: 10px;
  background: #fbf6ee;
  padding: 18px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
}

.custom-base-upload i {
  color: #b48645;
  font-size: 1.35rem;
}

.custom-base-upload strong {
  color: #241810;
  font: 800 0.9rem/1.2 var(--font-sans);
}

.custom-base-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.custom-base-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-base-files span {
  border: 1px solid #eadfcd;
  border-radius: 999px;
  background: #fff;
  padding: 6px 8px;
}

.action-section {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ded4c5;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
}

.quantity-selector button {
  width: 44px;
  height: 44px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: #4f4235;
  transition: background 0.24s ease, color 0.24s ease;
}

.quantity-selector button:hover {
  background: #fbf7ef;
  color: #7f5728;
}

.quantity-selector input {
  width: 60px;
  border: none;
  border-left: 1px solid #ded4c5;
  border-right: 1px solid #ded4c5;
  text-align: center;
  font-size: 14px;
  color: #4f4235;
}

.quantity-selector input:focus {
  outline: none;
}

.add-to-cart-btn {
  flex: 1;
  padding: 12px 30px;
  background: linear-gradient(120deg, #b48645 0%, #9c6f35 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
  box-shadow: 0 10px 20px rgba(49, 88, 68, 0.25);
}

.add-to-cart-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: saturate(1.07);
  box-shadow: 0 14px 28px rgba(44, 81, 62, 0.3);
}

.add-to-cart-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.add-to-cart-btn i {
  font-size: 16px;
}

.soldout-label {
  padding: 10px;
  background: #f2f3f1;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #5a645f;
  margin: 0;
}

.product-help-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid #ded4c5;
  border-radius: 12px;
  background: #fffaf3;
}

.product-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #eaf5ee;
  color: #0f6b3f;
  font-size: 18px;
}

.product-help-copy {
  min-width: 0;
}

.product-help-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #241810;
  font: 800 0.9rem/1.25 var(--font-sans);
}

.product-help-copy p {
  margin: 0;
  color: #6b5d4c;
  font: 500 0.84rem/1.5 var(--font-sans);
}

.product-help-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-help-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid #d8cbb8;
  border-radius: 999px;
  background: #fff;
  color: #4f4235;
  padding: 8px 12px;
  text-decoration: none;
  font: 800 0.78rem/1 var(--font-sans);
  transition: border-color 0.22s ease, background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.product-help-actions a:hover {
  border-color: #b48645;
  background: #fbf7ef;
  color: #1a120b;
  transform: translateY(-1px);
}

.product-help-actions .product-help-whatsapp {
  border-color: rgba(37, 211, 102, 0.35);
  background: #eefbf3;
  color: #0f6b3f;
}

.product-help-actions .product-help-whatsapp:hover {
  border-color: #25d366;
  background: #25d366;
  color: #fff;
}

/* WhatsApp CTA */
.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  background: #25d366;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
  width: fit-content;
}

.whatsapp-cta:hover {
  background: #1ebe5d;
  color: #fff;
  transform: translateY(-1px);
}

/* Social sharing */
.social-sharing {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #6b5d4c;
}

.social-sharing a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ded4c5;
  border-radius: 10px;
  color: #4f4235;
  text-decoration: none;
  transition: all 0.25s ease;
}

.social-sharing a:hover {
  border-color: #c9a66c;
  background: #fbf7ef;
  transform: translateY(-2px);
}

@media (hover: none), (pointer: coarse) {
  .product-modal-close,
  .thumbnail,
  .add-to-cart-btn,
  .social-sharing a,
  .quantity-selector button {
    transform: none !important;
    box-shadow: none !important;
  }

  .product-modal-close:hover,
  .thumbnail:hover,
  .add-to-cart-btn:hover:not(:disabled),
  .social-sharing a:hover,
  .quantity-selector button:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 1180px) {
  .product-modal-shell {
    width: min(1040px, 100%);
  }

  .product-detail-container.modal-layout {
    padding-inline: 24px;
  }

  .product-detail-content {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
    gap: 30px;
  }

  .main-image-wrapper {
    aspect-ratio: 4 / 3.45;
  }
}

@media (max-width: 980px) {
  .product-modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
  }

  .product-modal-shell {
    max-height: none;
    overflow: visible;
  }

  .product-detail-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .main-image-wrapper {
    aspect-ratio: 16 / 11;
  }

  .product-info {
    max-width: 720px;
  }

  .breadcrumb {
    margin-bottom: 22px;
  }
}

@media (max-width: 780px) {
  /* Overlay: fondo oscuro fijo, sin scroll propio */
  .product-modal-overlay {
    width: 100vw;
    max-width: 100vw;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
    background: rgba(14, 18, 16, 0.72);
  }

  /* Shell: ocupa todo el viewport y es él quien hace scroll */
  .product-modal-shell {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    min-height: unset;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Sin animación con transform para evitar bugs de layout */
    animation: modalOverlayIn 0.28s ease both;
  }

  /* Botón cerrar: sticky en la esquina superior */
  .product-modal-close {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 1300;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  }

  /* Imagen principal: 4/3 sin bordes */
  .main-image-wrapper {
    aspect-ratio: auto;
    height: clamp(290px, 58vh, 520px);
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #f4f3ef;
  }

  .main-image-wrapper .badge-save,
  .main-image-wrapper .badge-soldout {
    top: 16px;
    left: 16px;
  }

  .main-image {
    object-fit: contain;
  }

  /* Galería e info en columna */
  .product-detail-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 0;
    overflow-x: hidden;
  }

  .product-gallery {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .product-info {
    order: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px 16px 0;
    gap: 14px;
  }

  /* Inner padding */
  .product-detail-container.modal-layout {
    padding: 0 0 40px;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .product-info > *,
  .product-gallery > *,
  .price-section,
  .shipping-info,
  .product-description,
  .social-sharing {
    max-width: 100%;
    min-width: 0;
  }

  .product-description,
  .shipping-info,
  .rating-text {
    overflow-wrap: anywhere;
  }

  /* Thumbnails horizontales */
  .thumbnails-gallery {
    overflow-x: auto;
    width: 100%;
    padding: 12px 16px 8px;
    gap: 8px;
  }

  .thumbnail {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
  }

  /* Breadcrumb oculto */
  .breadcrumb {
    display: none;
  }

  /* Tipografía */
  .product-title {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .current-price {
    font-size: 1.4rem;
  }

  /* Opciones */
  .options-section {
    width: 100%;
    min-width: 0;
    padding: 14px;
    gap: 12px;
  }

  .option-group,
  .option-select {
    width: 100%;
    min-width: 0;
  }

  /* Acción: columna, ancho completo */
  .action-section {
    flex-direction: column;
    gap: 10px;
    padding: 0;
    width: 100%;
  }

  .quantity-selector {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: space-between;
    border-radius: 12px;
  }

  .quantity-selector button {
    flex: 1;
    min-width: 0;
    height: 50px;
  }

  .quantity-selector input {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 50px;
    font-size: 1rem;
  }

  .add-to-cart-btn {
    width: 100%;
    min-width: 0;
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: 12px;
  }

  /* Social */
  .social-sharing {
    padding: 0;
  }

  /* Página (no modal) */
  .product-detail-container {
    padding: 16px 14px 32px;
  }
}

@media (max-width: 480px) {
  .product-rating {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .price-section {
    flex-wrap: wrap;
  }

  .main-image-wrapper {
    height: clamp(260px, 54vh, 430px);
  }

  .product-title {
    font-size: 1.35rem;
  }

  .options-section {
    border-radius: 12px;
  }

  .option-select {
    width: 100%;
  }
}

@keyframes modalOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalOverlayOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes modalShellIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalShellOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.986);
  }
}

@keyframes detailContentIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── CART TOAST ── */
.cart-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #b48645;
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font: 600 0.95rem/1 var(--font-sans, sans-serif);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  z-index: 1400;
  white-space: nowrap;
  animation: toastIn 0.3s cubic-bezier(0.22,0.8,0.36,1) both, toastOut 0.3s ease 2.5s both;
}

.cart-toast i {
  font-size: 1.1rem;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(16px); }
}

@keyframes imageFadeIn {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-modal-overlay,
  .product-modal-shell,
  .product-detail-container.modal-layout,
  .main-image,
  .product-modal-close,
  .thumbnail,
  .add-to-cart-btn,
  .social-sharing a,
  .option-select,
  .quantity-selector button {
    animation: none !important;
    transition: none !important;
  }
}

/* Footer — scoped under .product-detail-page to avoid conflicts with App.css */
.product-detail-page .site-footer {
  margin-top: 80px;
  padding: 40px 20px;
  background: #f5f5f5;
  border-top: 1px solid #eee;
  color: inherit;
}

.product-detail-page .footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding-bottom: 0;
}

.product-detail-page .footer-brand-col .footer-brand {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px 0;
  font-family: inherit;
  color: #111;
}

.product-detail-page .footer-brand span {
  color: #b48645;
}

.product-detail-page .footer-tagline {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
  max-width: none;
  margin-bottom: 0;
}

.product-detail-page .footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  color: #111;
  letter-spacing: normal;
}

.product-detail-page .footer-heading {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  color: #111;
  letter-spacing: normal;
  font-family: inherit;
}

.product-detail-page .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-direction: column;
  display: flex;
  gap: 8px;
}

.product-detail-page .footer-links li {
  margin-bottom: 0;
}

.product-detail-page .footer-links a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  font-family: inherit;
}

.product-detail-page .footer-links a:hover {
  color: #333;
}


