@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy: #212e4e;
  --navy-dark: #1a243d;
  --navy-light: #2e3e63;
  --accent: #dca337;
  --accent-2: #f2c94c;
  --bg: #fef7e5;
  --text: #212e4e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Public Sans', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

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

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

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(31, 42, 68, 0.08);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--navy);
}

.brand img {
  width: 42px;
  height: 42px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(242, 155, 127, 0.18);
  color: var(--navy);
}

.cta-btn {
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(242, 155, 127, 0.35);
}

section {
  padding: 72px 24px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 48px;
  background: linear-gradient(120deg, rgba(31, 42, 68, 0.92) 0%, rgba(31, 42, 68, 0.82) 45%, rgba(242, 155, 127, 0.28) 100%);
  color: #fff;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.25), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(242, 155, 127, 0.35), transparent 40%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 32px;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 16px;
}

.hero p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.hero-media {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 14px;
  backdrop-filter: blur(6px);
}

.section-title {
  font-size: 32px;
  margin: 0 0 12px;
  color: var(--navy);
}

.section-subtitle {
  margin: 0 0 32px;
  color: #516189;
  font-weight: 500;
  line-height: 1.6;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(31, 42, 68, 0.08);
  border: 1px solid rgba(31, 42, 68, 0.05);
}

.card h3 {
  margin: 12px 0 8px;
}

.card p {
  margin: 0;
  color: #516189;
  line-height: 1.5;
}

.products-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.products-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.products-header .section-subtitle {
  margin-bottom: 0;
}

.products-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.products-search {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 42, 68, 0.12);
  background: #fff;
  font-weight: 600;
  color: var(--navy);
  min-width: min(380px, 100%);
  font-size: 16px; /* Prevent zoom on iOS */
}

.products-search::placeholder {
  color: #9aa7c2;
  font-weight: 500;
}

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

.products-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.products-empty {
  margin-top: 18px;
  margin-bottom: 0;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.product-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(33, 46, 78, 0.08);
  border: 1px solid rgba(33, 46, 78, 0.08);
  scroll-snap-align: start;
  position: relative;
  /* Remove fixed height to allow aspect-ratio to control size */
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

.product-card img {
  width: 100%;
  /* Portrait aspect ratio to fit the bottles */
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.product-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title tag"
    "desc desc";
  gap: 4px 12px;
  align-items: center;
}

/* Fix for certificates images to not take full height/cover */
.certificates .product-card {
  height: auto;
  cursor: default;
}

.certificates .product-card:hover {
  transform: none;
}

.certificates .product-card img {
  height: 180px;
  aspect-ratio: auto;
  object-fit: contain;
  padding: 24px;
  background: #fff;
}

.certificates .product-card:hover img {
  transform: none;
}

.certificates .product-content {
  position: static;
  background: transparent;
  backdrop-filter: none;
  border-top: none;
  display: block;
}

.product-content h4 {
  grid-area: title;
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.3;
}

.product-content p {
  grid-area: desc;
  margin: 4px 0 0;
  color: #516189;
  line-height: 1.5;
  font-size: 14px;
  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag {
  grid-area: tag;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(242, 155, 127, 0.15);
  color: var(--navy);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.stat {
  padding: 14px 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(31, 42, 68, 0.06);
  box-shadow: 0 16px 32px rgba(31, 42, 68, 0.06);
}

.stat strong {
  display: block;
  font-size: 24px;
  color: var(--navy);
}

.contact-section {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 36px rgba(31, 42, 68, 0.08);
  border: 1px solid rgba(31, 42, 68, 0.06);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 42, 68, 0.12);
  background: #f7f9fc;
  font-weight: 700;
  color: var(--navy);
  transition: all 0.2s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.08);
}

.certificates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.footer {
  background: var(--navy-dark);
  color: #dfe6f7;
  padding: 32px 24px;
}

.footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: center;
}

.footer small {
  color: #9fb0d3;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 42, 68, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 900px;
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(31, 42, 68, 0.25);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal:not([hidden]) .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: var(--navy);
  transition: background 0.2s;
}

.modal-close:hover {
  background: #fff;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.modal-image {
  background: var(--bg);
  height: 100%;
  min-height: 400px;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-info h3 {
  font-size: 32px;
  margin: 16px 0;
  color: var(--navy);
}

.modal-info p {
  font-size: 16px;
  line-height: 1.6;
  color: #516189;
  margin: 0 0 24px;
}

/* Header & Mobile Menu */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-only {
  display: none !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.bar {
  width: 100%;
  height: 3px;
  background-color: var(--navy);
  border-radius: 3px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    padding: 80px 24px 24px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1050;
    align-items: flex-start;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid rgba(31, 42, 68, 0.05);
    border-radius: 0;
  }
  
  .nav-links a.cta-btn {
    margin-top: 24px;
    justify-content: center;
    border-bottom: none;
    border-radius: 12px;
  }

  .menu-toggle {
    display: flex;
  }
  
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: inline-flex !important;
  }

  /* Hamburger Animation */
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* Mobile Layout Adjustments */
  section {
    padding: 48px 16px;
  }
  
  .hero {
    padding-top: 24px;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero-media {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .modal {
    padding: 20px !important;
    align-items: center;
  }
  
  .modal-content {
    height: auto;
    max-height: 85vh;
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  }
  
  .modal-body {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    flex: unset;
    overflow-y: visible;
  }
  
  .modal-image {
    min-height: auto;
    height: 240px;
    flex-shrink: 0;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .modal-image img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    padding: 16px;
  }
  
  .modal-info {
    padding: 20px 24px 24px;
    flex: unset;
  }
  
  .modal-info h3 {
    font-size: 22px;
    margin: 8px 0 10px;
  }

  .modal-info p {
    margin-bottom: 20px;
    font-size: 15px;
  }

  .modal-info .tag {
    align-self: flex-start;
    width: fit-content;
  }
  
  .modal-close {
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .product-content h4 {
    font-size: 16px;
  }

  .product-content p {
    font-size: 14px;
    margin-top: 2px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card img {
    aspect-ratio: 5/8; /* Taller on mobile */
  }

  .product-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Reset grid properties */
    grid-template-columns: unset;
    grid-template-areas: unset;
  }
  
  .product-content .tag {
    font-size: 11px;
    padding: 4px 8px;
    margin-bottom: 2px;
  }

  .product-content h4 {
    margin: 0;
  }
}

/* Floating Contact Buttons */
.floating-contact {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 900;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  padding: 10px;
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .floating-contact {
    bottom: 20px;
    right: 16px;
    gap: 12px;
  }

  .float-btn {
    width: 48px;
    height: 48px;
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
