/* ==========================================================================
   El Rey del Amaranto - Master CSS Stylesheet
   Estilos modernos, responsivos y de alta calidad estética.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables & Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --color-primary: #FF9D3B;
  --color-primary-dark: #E88320;
  --color-accent: #FF6100;
  --color-amber-gold: #FFC63B;
  --color-earth-dark: #4B2E17;
  --color-earth-deeper: #361F0E;
  --color-cream-light: #FFF6E0;
  --color-bg-light: #FBF9F5;
  --color-white: #FFFFFF;
  --color-text-dark: #0D141A;
  --color-text-muted: #56585E;
  --color-gray-light: #F2F3F6;
  --color-gray-border: #E0E2E7;

  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.14);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  font-size: 16px;
  scroll-behavior: smooth;
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation (Sticky & Responsive Drawer)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-logo img {
  height: 65px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.brand-logo:hover img {
  transform: scale(1.03);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--color-text-dark);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-dark);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.cart-icon-btn:hover {
  background-color: var(--color-gray-light);
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--color-text-dark);
  transition: var(--transition-fast);
}

/* --------------------------------------------------------------------------
   4. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  gap: 8px;
}

.btn-primary {
  background-color: var(--color-white);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-gray-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-earth {
  background-color: var(--color-earth-dark);
  color: var(--color-white);
}

.btn-earth:hover {
  background-color: var(--color-earth-deeper);
  box-shadow: var(--shadow-md);
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   5. Hero Sections
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 80px 24px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(75, 46, 23, 0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 20px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  max-width: 720px;
  margin: 0 auto 32px;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   6. General Section Layouts & Grid Cards
   -------------------------------------------------------------------------- */
.section {
  padding: 80px 24px;
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* Warm Gradient Section Background */
.bg-warm-amber {
  background: linear-gradient(135deg, #FFDC83 0%, #FF9D3B 50%, #C97D36 100%);
  color: var(--color-text-dark);
}

.bg-amber-soft {
  background: linear-gradient(180deg, #FFF6E0 0%, #FFF8E2 100%);
}

.bg-white {
  background-color: var(--color-white);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  align-items: stretch;
}

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-gray-light);
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
  transform: scale(1.06);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-dark);
}

.card-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Product Catalog Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-border);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: #F8F6F0;
  cursor: pointer;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex-grow: 1;
  margin-bottom: 16px;
}

.product-btn-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: var(--color-earth-dark);
  color: var(--color-white);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

.product-btn-order:hover {
  background-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   7. Contact & Map Page
   -------------------------------------------------------------------------- */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
  align-items: start;
}

.contact-info-box {
  background: var(--color-white);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-border);
}

.contact-item {
  margin-bottom: 24px;
}

.contact-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-earth-dark);
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-border);
  min-height: 420px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: none;
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg, var(--color-earth-dark) 0%, var(--color-earth-deeper) 100%);
  color: var(--color-white);
  padding: 60px 24px 30px;
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-amber-gold);
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.85;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-amber-gold);
}

.footer-section p, .footer-section a {
  font-size: 0.92rem;
  opacity: 0.85;
  line-height: 1.8;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--color-primary);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: all var(--transition-fast);
}

.social-icon-btn:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   9. Floating WhatsApp Widget
   -------------------------------------------------------------------------- */
.whatsapp-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
}

.whatsapp-btn {
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulse-ring 2s infinite ease-out;
  opacity: 0.6;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* --------------------------------------------------------------------------
   10. Lightbox Modal
   -------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 24px;
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   11. Media Queries & Responsive Specs
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .nav-menu {
    position: fixed;
    top: 89px;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    flex-direction: column;
    padding: 32px 24px;
    box-shadow: var(--shadow-md);
    gap: 20px;
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 48px 16px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
