/* ========================================
   HOME PAGE SPECIFIC STYLES - MOBILE FIRST
   ======================================== */

/* Section 1 - Hero Premium Dark */
header .section-1 {
  position: relative;
  background: var(--gradient-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 20px 80px;
  text-align: center;
  overflow: hidden;
}

/* Mobile only: Show carousel instead of static background */
@media (max-width: 767px) {
  header .section-1 {
    background: var(--gradient-primary);
    min-height: 100vh;
    height: 100vh;
    padding: 80px 20px 60px !important;
    margin-top: 0 !important;
  }

  /* Show carousel on mobile */
  header .section-1 .section-1-product-img {
    display: block !important;
    margin-top: 10px;
    max-width: 100%;
  }

  /* Carousel container mobile styles */
  .section-1-div-product-img-1.carousel-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .carousel-slide img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
  }

  /* Ensure text is above */
  header .section-1 .section-1-product-dis {
    position: relative;
    z-index: 2;
    padding: 10px 0;
    max-width: 100%;
  }

  header .section-1 .section-1-product-dis h3 {
    font-size: var(--text-2xl);
    max-width: 100%;
  }

  header .section-1 .section-1-product-dis p {
    font-size: var(--text-base);
    max-width: 100%;
  }

  header .section-1 .section-1-product-dis a {
    padding: 14px 40px;
    font-size: var(--text-sm);
  }
}

header .section-1 .section-1-product-dis {
  color: white;
  z-index: 2;
  max-width: 600px;
}

header .section-1 .section-1-product-dis h3 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 800px;
}

header .section-1 .section-1-product-dis p {
  font-size: var(--text-xl);
  margin-bottom: var(--spacing-2xl);
  opacity: 0.85;
  line-height: 1.6;
  font-weight: var(--font-normal);
  letter-spacing: 0.01em;
  max-width: 600px;
}

header .section-1 .section-1-product-dis a {
  display: inline-block;
  padding: 18px 56px;
  background: var(--header-btnH-color);
  color: white;
  text-decoration: none;
  border-radius: 9999px;
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  letter-spacing: -0.01em;
  border: none;
  backdrop-filter: blur(10px);
}

header .section-1 .section-1-product-dis a:hover {
  background: var(--header-btnH-dark);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

header .section-1 .section-1-product-img {
  display: block;
  margin-top: -20px;
  max-width: 100%;
}

header .section-1 .section-1-div-product-img-1 img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-slow) var(--transition-smooth);
  filter: brightness(1.05);
}

header .section-1 .section-1-div-product-img-1 img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Section 2 - Categorías Premium Dark */
.section-2 {
  padding: var(--spacing-3xl) var(--spacing-md);
  background: var(--main-bg);
}

.section-2 h3 {
  text-align: center;
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xl);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-2 .section-2-product-div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 280px));
  gap: 24px;
  justify-content: center;
  justify-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

/* Mobile: 2x2 grid for categories */
@media (max-width: 767px) {
  .section-2 {
    padding: 40px 20px 30px !important;
  }

  .section-2 h3 {
    font-size: var(--text-base);
    margin-bottom: var(--spacing-xs);
  }

  .section-2 .section-2-product-div {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .category-card {
    min-height: 55px;
  }

  .category-title {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .section-2 h2 {
    font-size: 0.7rem;
    margin-top: var(--spacing-xs);
  }

  /* Section 3 - Destacados mobile */
  .section-3 {
    padding: 50px 20px 40px !important;
    gap: 20px !important;
  }

  .section-3 .section-3-Description-div h3 {
    font-size: var(--text-xl);
  }

  .section-3 .section-3-Description-div p {
    font-size: var(--text-sm);
  }

  .section-3 .section-3-Description-div div {
    margin-top: var(--spacing-sm);
  }

  .section-3 .section-3-Description-div div a {
    padding: 10px 24px;
    font-size: var(--text-sm);
  }

  /* Section 4 - Recién llegados mobile */
  .section-4 {
    padding: 50px 20px 40px !important;
    gap: 20px !important;
    margin: 0 !important;
  }

  .section-4-description h3 {
    font-size: var(--text-xl);
  }

  .section-4-description p {
    font-size: var(--text-sm);
  }
}

.category-card {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  border-radius: 24px;
  text-decoration: none;
  background: #111;
  transition: transform .3s ease;
}

.category-card:hover {
  transform: translateY(-8px);
}

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

.category-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background:
    linear-gradient(
      to top,
      rgba(0,0,0,.9),
      rgba(0,0,0,.45),
      transparent
    );
}

.category-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  color: white;
  font-size: .75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.category-title {
  margin-top: 12px;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
}

/* Section-4 description styles */
.section-4-description {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  padding: 0 var(--page-padding);
}

.section-4-description h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-4-description p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: var(--font-normal);
  line-height: 1.6;
}

/* Legacy styles for backward compatibility */
.section-2 .section-2-product-div a:not(.category-card) {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 240px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-duration) var(--transition-smooth);
}

.section-2 .section-2-product-div a:not(.category-card) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.section-2 .section-2-product-div a:not(.category-card):hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.section-2 .section-2-product-div a:not(.category-card):hover img {
  transform: scale(1.1);
}

.section-2 .section-2-product-div a:not(.category-card) p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  margin: 0;
  color: white;
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0) 100%);
  letter-spacing: 0.01em;
}

.section-2 h2 {
  text-align: center;
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-top: var(--spacing-2xl);
  line-height: var(--leading-relaxed);
  padding: 0 var(--spacing-md);
  font-weight: var(--font-normal);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.8;
}

/* Section 3 - Destacados (usar estilos originales de layout.css) */
/* Hacer las cards de destacados completamente clickeables */
.section-3-product-div > a,
.section-3-product-div-1,
.section-3-product-div-2,
.section-3-product-div-3 {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.section-3-product-div > a:hover,
.section-3-product-div-1:hover,
.section-3-product-div-2:hover,
.section-3-product-div-3:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Section 4 - Últimos (usar estilos originales de layout.css) */

/* Tablet (768px+) */
@media (min-width: 768px) {
  header .section-1 {
    flex-direction: row;
    justify-content: space-between;
    padding: 80px 12%;
    text-align: left;
    min-height: 100vh;
  }

  header .section-1 .section-1-product-dis {
    flex: 1;
    padding-right: 40px;
  }

  header .section-1 .section-1-product-img {
    display: block;
    flex: 1;
  }

  header .section-1 .section-1-div-product-img-1 img {
    width: 100%;
    height: auto;
    border-radius: 20px;
  }

  .section-2 .section-2-product-div {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    gap: 24px;
  }

  .category-card {
    height: 380px;
  }

  .category-title {
    font-size: 1.75rem;
  }

  .section-2 .section-2-product-div a:not(.category-card) {
    height: 200px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  header .section-1 .section-1-product-dis h3 {
    font-size: 4.5rem;
    letter-spacing: -0.04em;
  }

  header .section-1 .section-1-product-dis p {
    font-size: var(--text-2xl);
  }

  .section-2 h3 {
    font-size: 3.5rem;
  }

  .category-card {
    height: 480px;
  }

  .category-title {
    font-size: 2rem;
  }

  .category-badge {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .category-card-overlay {
    padding: 32px;
  }

  .section-2 .section-2-product-div a:not(.category-card) {
    height: 240px;
  }
}

/* Mobile-First Breakpoints Premium */
@media (max-width: 430px) {
  header .section-1 {
    padding: 100px 20px 60px;
  }

  header .section-1 .section-1-product-dis h3 {
    font-size: 2rem;
    letter-spacing: -0.02em;
  }

  .category-card {
    height: 280px;
  }

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

  .category-badge {
    font-size: 0.65rem;
    padding: 5px 12px;
  }

  .category-card-overlay {
    padding: 20px;
  }

  header .section-1 .section-1-product-dis p {
    font-size: var(--text-base);
  }

  header .section-1 .section-1-product-dis a {
    padding: 14px 40px;
    font-size: var(--text-sm);
  }

  header .section-1 .section-1-div-product-img-1 img {
    max-width: 320px;
  }

  .section-2 h3 {
    font-size: var(--text-2xl);
  }

  .section-2 .section-2-product-div {
    gap: 12px;
  }

  .section-2 .section-2-product-div a:not(.category-card) {
    height: 140px;
  }

  .category-card {
    height: 260px !important;
  }
}

@media (max-width: 390px) {
  header .section-1 .section-1-product-dis h3 {
    font-size: var(--text-xl);
  }

  header .section-1 .section-1-product-dis p {
    font-size: var(--text-sm);
  }

  header .section-1 .section-1-product-dis a {
    padding: 12px 36px;
  }

  header .section-1 .section-1-div-product-img-1 img {
    max-width: 280px;
  }

  .section-2 h3 {
    font-size: var(--text-lg);
  }
}

@media (max-width: 375px) {
  header .section-1 .section-1-product-dis h3 {
    font-size: var(--text-lg);
  }

  header .section-1 .section-1-product-dis p {
    font-size: var(--text-sm);
  }

  header .section-1 .section-1-product-dis a {
    padding: 12px 32px;
  }

  header .section-1 .section-1-div-product-img-1 img {
    max-width: 260px;
  }
}

@media (max-width: 320px) {
  header .section-1 .section-1-product-dis h3 {
    font-size: var(--text-base);
  }

  header .section-1 .section-1-product-dis p {
    font-size: var(--text-xs);
  }

  header .section-1 .section-1-product-dis a {
    padding: 10px 28px;
    font-size: var(--text-xs);
  }

  header .section-1 .section-1-div-product-img-1 img {
    max-width: 220px;
  }

  .section-2 h3 {
    font-size: var(--text-base);
  }

  .section-2 .section-2-product-div a p {
    font-size: var(--text-sm);
  }
}
