﻿/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 0 100px;
  background: var(--bg-dark);
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.6s ease, transform 6s ease-out;
}
.hero-slide.active { opacity: 1; transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0.6), rgba(0,0,0,0.28) 62%), linear-gradient(180deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.72) 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.12;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 3;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-eyebrow {
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.7s ease forwards;
  animation-delay: 0.1s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.75), 0 4px 18px rgba(0,0,0,0.55);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  margin-bottom: 24px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.55), 0 8px 30px rgba(0,0,0,0.45);
}
.hero h1 em {
  color: var(--gold-light);
  font-style: italic;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7), 0 8px 30px rgba(0,0,0,0.55);
}
.hero h1 .word {
  display: inline-block;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
  animation: heroWordReveal 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes heroWordReveal {
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

.hero-subtitle {
  color: rgba(255,255,255,0.92);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 40px;
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.7s ease forwards;
  animation-delay: 0.9s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6), 0 4px 18px rgba(0,0,0,0.4);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.7s ease forwards;
  animation-delay: 1.1s;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  opacity: 0;
  animation: scrollIndicatorFadeUp 0.7s ease forwards;
  animation-delay: 1.3s;
  z-index: 3;
}
/* Own keyframes (not heroFadeUp): that shared animation's `transform: translateY(0)`
   end state would overwrite the translateX(-50%) centering above and knock the
   indicator off-center once the fade-in finishes. */
@keyframes scrollIndicatorFadeUp {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.scroll-indicator span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.scroll-indicator svg {
  width: 18px;
  height: 18px;
  animation: bounceArrow 1.8s ease-in-out infinite;
}
@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero h1 .word, .hero-subtitle, .hero-buttons {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  /* .scroll-indicator keeps its own rule (not the shared transform:none reset
     above) since it still needs translateX(-50%) to stay centered. */
  .scroll-indicator {
    animation: none !important;
    opacity: 1 !important;
    transform: translateX(-50%) !important;
    clip-path: none !important;
  }
  .scroll-indicator svg { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none !important; transform: none !important; }
}

/* ===== Beneficios ===== */
.benefits-strip {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.benefit-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--gold-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-icon svg { width: 20px; height: 20px; stroke: var(--gold); }
.benefit-item h4 {
  font-family: 'Lato', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.benefit-item p { color: var(--text-secondary); font-size: 0.8rem; }

@media (max-width: 900px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 420px) {
  .benefit-item { gap: 10px; }
  .benefit-icon { width: 38px; height: 38px; min-width: 38px; }
}

/* ===== Banda editorial ===== */
.editorial-band {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-dark);
}
.editorial-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.editorial-band .editorial-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,8,6,0.92) 0%, rgba(10,8,6,0.74) 55%, rgba(10,8,6,0.4) 100%);
}
.editorial-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
  color: #fff;
  padding: 60px 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6), 0 6px 22px rgba(0,0,0,0.4);
}
.editorial-content .eyebrow { color: var(--gold-light); }
.editorial-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 18px;
}
.editorial-content p {
  color: rgba(255,255,255,0.88);
  font-size: 1.02rem;
  margin-bottom: 28px;
  max-width: 400px;
}

@media (max-width: 768px) {
  .editorial-band { min-height: 480px; }
  .editorial-band .editorial-overlay {
    background: linear-gradient(180deg, rgba(10,8,6,0.45) 0%, rgba(10,8,6,0.92) 68%);
  }
  .editorial-content { max-width: none; padding: 0 0 44px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 480px; }
}

/* ===== Categorías destacadas ===== */
.categories-section { background: radial-gradient(circle at 50% 40%, rgba(224,189,115,0.03), transparent 60%), var(--bg); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 210px;
  gap: 20px;
}
.category-card:nth-child(1) { grid-row: span 2; }

.category-card {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
  color: #fff;
}
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.category-card .category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.85) 100%);
  transition: background 0.4s ease;
}
.category-card:hover img { transform: scale(1.05); }
.category-card:hover .category-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.14) 15%, rgba(0,0,0,0.78) 100%); }

.category-card-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.35);
}
.category-card-content h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.category-card-content p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .category-card:nth-child(1) { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .categories-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .category-card:nth-child(1) { grid-column: span 1; }
}

/* ===== Destacados (carrusel) ===== */
.featured-section { background: radial-gradient(circle at 50% 40%, rgba(224,189,115,0.03), transparent 60%), var(--bg); }

.carousel {
  position: relative;
}
.carousel-viewport {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-out;
  will-change: transform;
}
.carousel-track .product-card {
  flex: 0 0 calc((100% - 3 * 24px) / 4);
  margin-right: 24px;
  transition: box-shadow 0.3s ease, transform 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.5s ease;
}
.carousel-track .product-card:last-child { margin-right: 0; }

.carousel-track .product-card.carousel-card-focus { transform: scale(1.05); opacity: 1; z-index: 2; }
.carousel-track .product-card.carousel-card-side { opacity: 0.7; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}
.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  color: var(--text);
}
.carousel-btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.carousel-btn svg { width: 18px; height: 18px; }

.carousel-dots { display: flex; gap: 4px; }
.carousel-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  position: relative;
}
.carousel-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot.active::before { background: var(--gold); transform: translate(-50%, -50%) scale(1.3); }

@media (max-width: 900px) {
  .carousel-track .product-card { flex: 0 0 calc((100% - 24px) / 2); }
}
@media (max-width: 560px) {
  .carousel-track .product-card { flex: 0 0 100%; margin-right: 0; }
}

/* ===== Banner de marca ===== */
.brand-banner {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.brand-banner .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.brand-banner h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 20px;
}
.brand-banner p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 440px;
}
.brand-banner-image {
  height: 360px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
  border: 1px solid var(--border);
}
@media (hover: hover) and (pointer: fine) {
  .brand-banner-image { transition: transform 0.6s ease; }
  .brand-banner-image:hover { transform: translateY(-5px); }
}
.parallax-layer {
  position: absolute;
  inset: -40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  will-change: transform;
}
.brand-banner-image .parallax-layer svg { width: 110px; height: 110px; opacity: 0.6; }
.parallax-layer img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 768px) {
  .brand-banner .container { grid-template-columns: 1fr; gap: 36px; }
  .brand-banner-image { height: 240px; }
}

/* ===== Servicios ===== */
.servicios { background: var(--bg-surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.service-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: left;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.service-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--gold-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-item:hover .service-icon { background: var(--gold); }
.service-item:hover .service-icon svg { stroke: #fff; }
.service-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--gold);
  transition: stroke 0.3s ease;
}
.service-icon svg path,
.service-icon svg circle,
.service-icon svg rect {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  transition: stroke-dashoffset 1.1s ease;
}
.service-item.revealed .service-icon svg path,
.service-item.revealed .service-icon svg circle,
.service-item.revealed .service-icon svg rect {
  stroke-dashoffset: 0;
}

.service-item h3 { font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }
.service-item p { color: var(--text-secondary); font-size: 0.92rem; }

@media (prefers-reduced-motion: reduce) {
  .service-icon svg path, .service-icon svg circle, .service-icon svg rect {
    stroke-dashoffset: 0 !important;
  }
}

/* ===== Secciones alternadas imagen+texto (Reparaciones / Confección a medida) ===== */
.alt-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 460px;
  background: var(--bg);
}
.alt-section-media {
  position: relative;
  overflow: hidden;
}
.alt-section-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
@media (hover: hover) and (pointer: fine) {
  .alt-section-media:hover img { transform: scale(1.03) translateY(-5px); }
}
.alt-section-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 64px;
}
.alt-section-text .eyebrow { color: var(--gold); }
.alt-section-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  color: var(--text);
}
.alt-section-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 440px;
  margin-bottom: 28px;
}
.alt-section-text .btn { align-self: flex-start; }

.alt-section.reverse .alt-section-media { order: 2; }
.alt-section.reverse .alt-section-text { order: 1; }

.section-divider { padding: 44px 0; background: var(--bg); }

@media (max-width: 900px) {
  .alt-section { grid-template-columns: 1fr; min-height: 0; }
  .alt-section-media { height: 300px; order: 0 !important; }
  .alt-section-text { padding: 48px 24px; order: 0 !important; }
}

/* ===== Nosotros ===== */
#nosotros { background: radial-gradient(circle at 50% 35%, rgba(184,150,12,0.04), transparent 60%), var(--bg-elevated); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  height: 420px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s ease, transform 0.6s ease;
}
.about-image.revealed { clip-path: inset(0 0 0 0); }
.about-image svg { width: 96px; height: 96px; }

@media (hover: hover) and (pointer: fine) {
  .about-image:hover { transform: translateY(-5px); }
}

.about-text p { color: var(--text-secondary); margin-bottom: 20px; font-size: 1rem; }

.stats-row {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat h4 { font-size: 2rem; color: var(--gold); margin-bottom: 4px; }
.stat p { color: var(--text-secondary); font-size: 0.88rem; }

.stat h4.count-flash { animation: statFlash 0.5s ease; }
@keyframes statFlash {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 20px var(--gold); }
}

@media (prefers-reduced-motion: reduce) {
  .about-image { clip-path: inset(0 0 0 0) !important; }
  .stat h4.count-flash { animation: none !important; }
}

/* ===== Promo ===== */
.promo {
  background: radial-gradient(circle at 50% 40%, rgba(184,134,11,0.16), transparent 60%), var(--bg-dark);
  color: #fff;
  text-align: center;
}
.promo .eyebrow { color: var(--gold-light); }
.promo h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  max-width: 700px;
  margin: 0 auto 20px;
  animation: promoPulse 3.2s ease-in-out infinite;
}
.promo p.promo-text {
  color: #b8b8b8;
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
}
@keyframes promoPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .promo h2 { animation: none; }
}

/* ===== Contacto ===== */
#contacto { background: radial-gradient(circle at 50% 30%, rgba(184,150,12,0.03), transparent 60%), var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-item { display: flex; gap: 18px; margin-bottom: 28px; }

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  background: var(--gold-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-icon svg { width: 22px; height: 22px; stroke: var(--gold); }

.contact-item h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  font-family: 'Lato', sans-serif;
  font-weight: 500;
}
.contact-item p, .contact-item a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  display: block;
  transition: color 0.2s ease;
}
.contact-item a:hover { color: var(--gold); }

.contact-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 340px;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { height: 280px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero { padding: 120px 0 90px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .stats-row { gap: 24px; }
}
