/* ==========================================
   PATITAS DE ALGODÓN - CUSTOM STYLES
   Following calvy-landing pattern with Bodoni Moda typography
   ========================================== */

/* ========== GOOGLE FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;1,6..96,400;1,6..96,500;1,6..96,600;1,6..96,700&display=swap');

/* ========== MATERIAL SYMBOLS ========== */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* ========== DESIGN TOKENS (CSS Variables) ========== */
:root {
  /* Colors */
  --c-primary: #ba0037;
  --c-secondary: #006874;
  --c-surface: #fff8f7;
  --c-on-surface: #281718;

  /* Shadows */
  --shadow-ambient: 0px 20px 40px rgba(0,0,0,0.04);
  --shadow-ambient-lg: 0px 30px 60px rgba(0,0,0,0.06);

  /* Transitions */
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========== RESET / BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: 'Bodoni Moda', serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-on-surface);
  background-color: var(--c-surface);
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* Critical: Prevent horizontal scroll on mobile */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }

  body {
    width: 100vw !important;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

section {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Mobile-specific overflow prevention */
@media (max-width: 767px) {
  body > * {
    max-width: 100vw;
  }

  section,
  main,
  footer,
  header {
    max-width: 100vw;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  /* Ensure no element causes horizontal scroll */
  .relative,
  .absolute {
    max-width: 100%;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== MATERIAL SYMBOLS CONFIGURATION ========== */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  user-select: none;
}

.badge-icon {
  font-size: 28px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
  color: var(--c-primary);
}

.badge-icon-white {
  font-size: 24px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
  color: #ffffff;
}

@media (min-width: 640px) {
  .badge-icon-white {
    font-size: 28px;
  }
}

.badge-circle {
  background-color: var(--c-primary);
}

.hero-badge-position {
  bottom: -1rem;
  left: 0.25rem;
  right: auto;
}

@media (max-width: 639px) {
  .hero-badge-position {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

@media (min-width: 640px) {
  .hero-badge-position {
    bottom: -1.5rem;
    left: 0.375rem;
    right: auto;
  }
}

.section-spacing-top {
  margin-top: 80px;
}

@media (min-width: 640px) {
  .section-spacing-top {
    margin-top: 100px;
  }
}

@media (min-width: 768px) {
  .section-spacing-top {
    margin-top: 120px;
  }
}

@media (min-width: 1024px) {
  .section-spacing-top {
    margin-top: 140px;
  }
}

.bg-features {
  background-color: #F9F9B5;
}

.features-padding {
  padding-top: 40px;
  padding-bottom: 40px;
}

@media (min-width: 640px) {
  .features-padding {
    padding-top: 50px;
    padding-bottom: 50px;
  }
}

@media (min-width: 768px) {
  .features-padding {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

@media (min-width: 1024px) {
  .features-padding {
    padding-top: 70px;
    padding-bottom: 70px;
  }
}

/* ========== NAVIGATION ========== */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

#main-nav .logo-text {
  color: var(--c-primary);
}

.scrolled-header {
  background-color: rgba(255, 248, 247, 0.95) !important;
  box-shadow: var(--shadow-ambient);
}

.nav-link {
  position: relative;
  padding: 0.75rem 0;
  font-weight: 500;
  font-size: 16px;
  color: var(--c-on-surface);
  transition: color var(--transition-smooth);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-link {
    padding: 0.5rem 0;
  }
}

.nav-link:hover {
  color: var(--c-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--c-primary);
  transition: width var(--transition-smooth);
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--c-primary);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

/* Hamburger menu */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  transition: all var(--transition-smooth);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--c-on-surface);
  transition: all var(--transition-smooth);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
#mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: rgba(255, 248, 247, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(145, 111, 112, 0.1);
  box-shadow: var(--shadow-ambient-lg);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
  width: 100%;
  max-width: 100vw;
}

#mobile-menu.open {
  max-height: 400px;
}

@media (max-width: 767px) {
  #main-nav > div {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Bodoni Moda', serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-spring);
  border: 2px solid transparent;
  text-align: center;
  white-space: normal;
  line-height: 1.3;
}

@media (min-width: 375px) {
  .btn {
    padding: 0.8rem 1.75rem;
    font-size: 15px;
  }
}

@media (min-width: 640px) {
  .btn {
    padding: 0.875rem 2rem;
    font-size: 16px;
    white-space: nowrap;
  }
}

.btn:hover {
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--c-primary);
  color: white;
}

.btn-primary:hover {
  background-color: #e41849;
  box-shadow: 0 8px 24px rgba(186, 0, 55, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}

.btn-outline:hover {
  background-color: var(--c-primary);
  border-color: var(--c-primary);
  color: white;
}

.btn-secondary {
  background-color: var(--c-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #006d79;
  box-shadow: 0 8px 24px rgba(0, 104, 116, 0.3);
}

/* ========== HERO STYLES ========== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, rgba(186, 0, 55, 0.1), rgba(0, 104, 116, 0.1));
  border: 1px solid rgba(186, 0, 55, 0.2);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-primary);
}

.hero-image-wrap {
  position: relative;
  border-radius: 3rem;
  overflow: hidden;
  transition: transform var(--transition-smooth);
  max-width: 100%;
}

@media (max-width: 767px) {
  .hero-image-wrap {
    transform: none !important;
  }
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.hero-image-wrap:hover img {
  transform: scale(1.05);
}

/* ========== CARD STYLES ========== */
.feature-card {
  text-align: center;
  padding: 0.75rem 0.5rem;
  transition: all var(--transition-smooth);
}

@media (min-width: 640px) {
  .feature-card {
    padding: 1rem;
  }
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
}

.feature-card .material-symbols-outlined {
  font-size: 24px;
  color: var(--c-primary);
}

@media (min-width: 640px) {
  .feature-icon-circle {
    width: 52px;
    height: 52px;
    margin-bottom: 0.625rem;
  }

  .feature-card .material-symbols-outlined {
    font-size: 26px;
  }
}

@media (min-width: 768px) {
  .feature-icon-circle {
    width: 56px;
    height: 56px;
    margin-bottom: 0.75rem;
  }

  .feature-card .material-symbols-outlined {
    font-size: 28px;
  }
}

.product-card {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
}

@media (min-width: 640px) {
  .product-overlay {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  }
}

.product-overlay h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-overlay p {
  font-size: 0.8125rem;
  opacity: 0.95;
}

@media (min-width: 640px) {
  .product-overlay h3 {
    font-size: 1rem;
  }

  .product-overlay p {
    font-size: 0.875rem;
    opacity: 0.9;
  }
}

@media (min-width: 768px) {
  .product-overlay h3 {
    font-size: 1.0625rem;
  }

  .product-overlay p {
    font-size: 0.9375rem;
  }
}

.catalog-btn-ver-todo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: gap var(--transition-smooth);
}

@media (min-width: 640px) {
  .catalog-btn-ver-todo {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .catalog-btn-ver-todo {
    font-size: 1.125rem;
  }
}

.catalog-btn-ver-todo:hover {
  gap: 0.75rem;
}

.catalog-btn-ver-todo .material-symbols-outlined {
  font-size: 18px;
}

@media (min-width: 640px) {
  .catalog-btn-ver-todo .material-symbols-outlined {
    font-size: 20px;
  }
}

@media (min-width: 768px) {
  .catalog-btn-ver-todo .material-symbols-outlined {
    font-size: 22px;
  }
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== ORGANIC BLOBS ========== */
.organic-blob {
  position: absolute;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 100%;
  will-change: transform;
}

@media (max-width: 767px) {
  .organic-blob {
    display: none;
  }
}

.bg-blob {
  position: absolute;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.3;
  border-radius: 50%;
}

/* ========== SHADOW UTILITIES ========== */
.soft-shadow {
  box-shadow: var(--shadow-ambient);
}

.ambient-shadow {
  box-shadow: var(--shadow-ambient-lg);
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

.reveal-delay-3 {
  transition-delay: 0.45s;
}

/* Utility transitions */
.scroll-smooth {
  scroll-behavior: smooth;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ========== FOOTER ========== */
footer {
  background-color: var(--c-surface-container-lowest, #ffffff);
  border-top: 1px solid var(--c-outline-variant, #e5bdbe);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

footer a:hover {
  color: var(--c-primary);
  transition: color var(--transition-smooth);
}

/* WhatsApp FAB */
@media (max-width: 767px) {
  a[href*="wa.me"] {
    bottom: 1rem !important;
    right: 1rem !important;
  }
}
