:root {
  --bg: #f6f0e6;
  --card: #fffaf2;
  --ink: #211a15;
  --muted: #6b5d51;
  --accent: #bf4f2f;
  --line: #dac8b6;
  --shadow: 0 12px 40px rgba(33, 26, 21, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #f7f1e8, #f2e7d8);
  position: relative;
  overflow-x: hidden;
}

.music-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.music-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.85);
}

.music-toggle.is-on {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-color: rgba(255, 255, 255, 0.95);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
}

h1,
h2 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1;
}
/* --- Banner de Galería Virtual --- */
.vr-banner {
  display: block;
  width: 100%;
  background-color: #1a1a1a; /* Puedes cambiar este color para que combine con tu paleta */
  color: #ffffff;
  text-align: center;
  padding: 12px 20px;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  z-index: 100;
  position: relative;
}

.vr-banner:hover,
.vr-banner:focus {
  background-color: #333333;
  opacity: 0.9;
}

.hero-section {
  width: 100vw;
  height: 100vh;
  background-image: url('bg-foto-pinturas-desktop.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.hero-logo {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(320px, 100%);
  height: auto;
  object-fit: contain;
}

.slideshow-section {
  width: 100vw;
  height: 100vh;
  background: #f0e8dd;
  position: relative;
  display: grid;
  place-items: center;
}

.slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f0e8dd;
}

.slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

.slideshow img.slide-current {
  transform: translateX(0);
  z-index: 2;
}

.slideshow img.slide-exit-left {
  transform: translateX(-100%);
  z-index: 1;
}

.slideshow img.slide-enter-right {
  transform: translateX(100%);
  z-index: 2;
}

.slide-meta {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: min(560px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(23, 19, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(2px);
  z-index: 10;
}

.slide-id,
.slide-title,
.slide-line,
.slide-alert {
  margin: 0;
}

.slide-id {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.slide-title {
  margin-top: 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
  line-height: 1.05;
}

.slide-line {
  margin-top: 5px;
  font-size: 0.89rem;
  line-height: 1.3;
}

.slide-alert {
  margin-top: 8px;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(191, 79, 47, 0.95);
  font-size: 0.78rem;
  font-weight: 700;
}

.catalog-section {
  width: min(1120px, 92vw);
  margin: 44px auto 52px;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.catalog-head-stacked {
  align-items: flex-start;
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}

#catalogCount {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.project-link-wrap {
  margin: 8px 0 0;
}

.project-link,
.project-backlink {
  color: #5a2d1f;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(90, 45, 31, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-link:hover,
.project-backlink:hover {
  color: #bf4f2f;
  border-color: #bf4f2f;
}

.project-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.project-note {
  margin: 0 0 16px;
  color: var(--muted);
}

.project-backlink-wrap {
  margin: 20px 0 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(33, 26, 21, 0.07);
  animation: slideUp 420ms ease both;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(33, 26, 21, 0.12);
  border-color: rgba(191, 79, 47, 0.3);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 9px 10px 12px;
}

.card-id {
  font-weight: 700;
  font-size: 0.93rem;
  color: #402c1f;
}

.card-title {
  margin: 5px 0 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.card-meta {
  margin: 7px 0 0;
  padding-left: 15px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.card-price {
  margin: 10px 0 0;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(191, 79, 47, 0.12), rgba(191, 79, 47, 0.08));
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.card-alert {
  margin: 7px 0 0;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #bf4f2f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-footer {
  width: min(1120px, 92vw);
  margin-inline: auto;
  padding: 4px 0 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fadeIn {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 740px) {
  .hero-section {
    background-image: url('bg-foto-pinturasa-mobile.jpg');
  }

  .catalog-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .slide-meta {
    left: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    padding: 10px 11px;
  }

  .slide-title {
    font-size: 1.25rem;
  }

  .slide-line {
    font-size: 0.8rem;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card img {
    height: auto;
    max-height: 400px;
  }
}

/* Modal de compra */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: min(900px, 100%);
  max-height: 90vh;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  max-height: 500px;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
}

.modal-meta {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-meta p {
  margin: 6px 0;
}

.modal-price-section {
  margin-top: 12px;
  padding: 16px;
  background: rgba(191, 79, 47, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(191, 79, 47, 0.2);
}

.modal-price-label {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.modal-price {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.whatsapp-link:hover {
  opacity: 0.7;
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
  fill: #25D366;
}

.btn-share {
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: #333;
  border: 2px solid #ddd;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-share:hover {
  border-color: #009ee3;
  color: #009ee3;
  background: rgba(0, 158, 227, 0.05);
  transform: translateY(-1px);
}

.btn-share:active {
  transform: translateY(0);
}

.btn-share svg {
  flex-shrink: 0;
}

.btn-buy {
  width: 100%;
  padding: 16px 24px;
  background: #009ee3;
  color: #fff;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-buy:hover {
  background: #0084c2;
  transform: translateY(-1px);
}

.btn-buy:active {
  transform: translateY(0);
}

.btn-buy:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.purchase-feedback {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  display: none;
}

.purchase-feedback.is-visible {
  display: block;
}

.purchase-feedback.is-error {
  background: rgba(244, 67, 54, 0.1);
  color: #c62828;
}

@media (max-width: 740px) {
  .modal-body {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .modal-image {
    max-height: 300px;
  }

  .modal-title {
    font-size: 1.6rem;
  }

  .modal-price {
    font-size: 2rem;
  }
}
