/* RICOAID PHARMA styles. Layout utilities come from Tailwind in index.html. */
.banner-slide { opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.banner-slide.is-active { opacity: 1; visibility: visible; }
.banner-title { text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.nav-link.is-active { color: #1B7F37; }
.nav-link.is-active .nav-line { transform: scaleX(1); }
.bottom-link.is-active { color: #1B7F37; font-weight: 600; }
.side-link.is-active { background: #F4F9F4; color: #1B7F37; border-left-color: #39B54A; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
  
/* Contact: the ring from the logo, faint, in the corner of the green panel */
.contact-side::after {
  content: ""; position: absolute; right: -130px; bottom: -110px; width: 340px; height: 260px;
  border: 10px solid #F7941D; border-radius: 50%; opacity: .22; transform: rotate(-16deg); pointer-events: none;
}

/* WhatsApp live chat */
.wa { position: fixed; right: 1rem; bottom: 5rem; z-index: 40; }
@media (min-width: 768px) { .wa { right: 1.5rem; bottom: 1.5rem; } }

.wa-toggle {
  position: relative; display: flex; width: 60px; height: 60px; align-items: center; justify-content: center;
  border-radius: 50%; background: #25D366; color: #fff; box-shadow: 0 10px 24px -6px rgba(7, 94, 84, .6);
  transition: transform .2s ease, background-color .2s ease;
}
.wa-toggle:hover { transform: scale(1.07); }
.wa-toggle:focus-visible { outline: 2px solid #075E54; outline-offset: 3px; }
.wa-toggle[aria-expanded="true"] { background: #075E54; }

.wa-ring { position: absolute; inset: 0; border-radius: 50%; background: #25D366; opacity: 0; z-index: -1; animation: wa-ring 2.6s ease-out infinite; }
.wa-ring-2 { animation-delay: 1.3s; }
.wa-toggle[aria-expanded="true"] .wa-ring { display: none; }
@keyframes wa-ring { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.75); opacity: 0; } }

.wa-icon { position: absolute; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease; }
.wa-icon-chat { width: 32px; height: 32px; animation: wa-nudge 5s ease-in-out 3s infinite; }
.wa-icon-close { width: 26px; height: 26px; opacity: 0; transform: rotate(-90deg) scale(.5); }
.wa-toggle[aria-expanded="true"] .wa-icon-chat { opacity: 0; transform: rotate(90deg) scale(.5); animation: none; }
.wa-toggle[aria-expanded="true"] .wa-icon-close { opacity: 1; transform: none; }
@keyframes wa-nudge {
  0%, 86%, 100% { transform: rotate(0); }
  88% { transform: rotate(-14deg); } 91% { transform: rotate(12deg); } 94% { transform: rotate(-8deg); } 97% { transform: rotate(5deg); }
}

.wa-badge {
  position: absolute; top: -2px; right: -2px; display: flex; width: 21px; height: 21px; align-items: center; justify-content: center;
  border: 2px solid #fff; border-radius: 50%; background: #ED1C24; font-size: 11px; font-weight: 700; line-height: 1;
  animation: wa-pop .45s cubic-bezier(.34, 1.56, .64, 1) 1.2s backwards;
}
.wa-badge[hidden] { display: none; }
@keyframes wa-pop { from { transform: scale(0); } to { transform: scale(1); } }

.wa-teaser {
  position: absolute; right: 72px; bottom: 9px; display: flex; align-items: center; gap: 2px; white-space: nowrap;
  border-radius: 999px; background: #fff; padding: 4px 6px 4px 4px; box-shadow: 0 10px 28px -8px rgba(22, 40, 28, .4);
  opacity: 0; visibility: hidden; transform: translateX(14px) scale(.92); transform-origin: right center;
  transition: opacity .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1), visibility .3s;
}
.wa-teaser.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-teaser-text { border-radius: 999px; padding: 6px 4px 6px 12px; font-size: 14px; color: #16281C; }
.wa-teaser-text strong { font-weight: 600; color: #1B7F37; }
.wa-teaser-close { display: flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; color: #56665B; }
.wa-teaser-close:hover { background: #F4F9F4; }
.wa-teaser button:focus-visible { outline: 2px solid #1B7F37; }

.wa-panel {
  position: absolute; right: 0; bottom: 74px; display: flex; flex-direction: column;
  width: min(360px, calc(100vw - 2rem)); max-height: calc(100vh - 11rem); max-height: calc(100dvh - 11rem);
  overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 28px 60px -14px rgba(22, 40, 28, .5);
  opacity: 0; visibility: hidden; transform: translateY(18px) scale(.7); transform-origin: bottom right;
  transition: opacity .2s ease, transform .35s cubic-bezier(.34, 1.4, .64, 1), visibility .35s;
}
.wa-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.wa-head { display: flex; align-items: center; gap: 12px; background: #075E54; padding: 12px 10px 12px 14px; color: #fff; }
.wa-avatar { display: block; width: 44px; height: 44px; flex-shrink: 0; overflow: hidden; border-radius: 50%; background: #fff; }
.wa-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

.wa-body {
  flex: 1; min-height: 190px; overflow-y: auto; padding: 16px 14px;
  background-color: #ECE5DD; background-image: radial-gradient(rgba(7, 94, 84, .07) 1px, transparent 1px); background-size: 14px 14px;
}
.wa-typing, .wa-bubble { position: relative; width: fit-content; border-radius: 0 10px 10px 10px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
.wa-typing::before, .wa-bubble::before {
  content: ""; position: absolute; top: 0; left: -7px; width: 8px; height: 10px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.wa-typing { display: flex; gap: 4px; padding: 13px 14px; }
.wa-typing[hidden] { display: none; }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8A9A90; animation: wa-dot 1.1s ease-in-out infinite; }
.wa-typing i:nth-child(2) { animation-delay: .15s; }
.wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes wa-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.wa-bubble { max-width: 85%; padding: 8px 12px 6px; font-size: 14px; line-height: 1.5; animation: wa-in .3s ease-out; }
.wa-bubble time { display: block; margin-top: 2px; text-align: right; font-size: 11px; color: #667781; }
.wa-quick { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 12px; }
.wa-quick[hidden] { display: none; }
.wa-quick button {
  border: 1px solid #075E54; border-radius: 999px; background: #fff; padding: 6px 14px; font-size: 13.5px; font-weight: 500; color: #075E54;
  transition: background-color .15s ease, color .15s ease; animation: wa-in .3s ease-out backwards;
}
.wa-quick button:nth-child(2) { animation-delay: .1s; }
.wa-quick button:nth-child(3) { animation-delay: .2s; }
.wa-quick button:hover { background: #075E54; color: #fff; }
.wa-quick button:focus-visible { outline: 2px solid #075E54; outline-offset: 2px; }
@keyframes wa-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Product page gallery */
.gallery-main {
  position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid rgba(22, 40, 28, .12); border-radius: 16px;
  background: #fff; cursor: zoom-in;
}
.gallery-main img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease-out; }
.gallery-main.is-zoomed { cursor: zoom-out; }
@media (hover: hover) { .gallery-main.is-zoomed { cursor: crosshair; } }
.gallery-main.is-zoomed img { transform: scale(2.2); }

.gallery-thumb {
  display: block; overflow: hidden; aspect-ratio: 1; border: 2px solid rgba(22, 40, 28, .12); border-radius: 10px;
  background: #fff; transition: border-color .15s ease;
}
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb:hover { border-color: #39B54A; }
.gallery-thumb[aria-pressed="true"] { border-color: #1B7F37; }
.gallery-thumb:focus-visible { outline: 2px solid #1B7F37; outline-offset: 2px; }

/* Product page details */
.spec-list { overflow: hidden; border: 1px solid rgba(22, 40, 28, .1); border-radius: 16px; background: #F4F9F4; padding: 4px 20px; }
.spec-row { display: grid; grid-template-columns: minmax(150px, 2fr) 3fr; align-items: center; gap: 12px; padding: 12px 0; }
.spec-row + .spec-row { border-top: 1px solid rgba(22, 40, 28, .09); }
.spec-row dt { display: flex; align-items: center; gap: 12px; color: #56665B; }
.spec-row dd { font-weight: 600; line-height: 1.35; color: #16281C; }
.spec-icon { display: flex; width: 32px; height: 32px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #1B7F37; box-shadow: 0 0 0 1px rgba(27, 127, 55, .15); }
.spec-icon svg { width: 17px; height: 17px; }
@media (max-width: 380px) {
  .spec-list { padding: 4px 14px; }
  .spec-row { grid-template-columns: minmax(130px, 1fr) 1fr; }
  .spec-row dt { gap: 8px; font-size: 14px; }
}

/* Who we are page: mission and vision */
.mv-card {
  border: 1px solid rgba(22, 40, 28, .1); border-top: 4px solid #1B7F37; border-radius: 16px;
  background: #fff; padding: 28px 24px 32px; box-shadow: 0 24px 48px -32px rgba(15, 82, 40, .45);
}
.mv-vision { border-top-color: #F7941D; }
.mv-icon { display: flex; width: 56px; height: 56px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: rgba(57, 181, 74, .14); color: #1B7F37; }
.mv-vision .mv-icon { background: rgba(247, 148, 29, .15); color: #B5650A; }
.mv-icon svg { width: 28px; height: 28px; }
@media (min-width: 1024px) { .mv-card { padding: 40px 40px 44px; } }

/* Who we are page: factory video */
.factory-video { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 20px; background: #0F5228; box-shadow: 0 30px 60px -30px rgba(15, 82, 40, .6); }
.factory-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.factory-play {
  position: absolute; inset: 0; display: flex; width: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(rgba(15, 82, 40, .15), rgba(15, 40, 25, .55)); color: #fff;
}
.factory-play[hidden], .factory-soon[hidden] { display: none; }
.factory-play:focus-visible { outline: 3px solid #fff; outline-offset: -8px; border-radius: 20px; }
.factory-play-icon {
  position: relative; display: flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%;
  background: #fff; color: #1B7F37; transition: transform .2s ease;
}
.factory-play-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); z-index: -1; animation: wa-ring 2.6s ease-out infinite; }
.factory-play-icon svg { width: 30px; height: 30px; margin-left: 3px; }
.factory-play:hover .factory-play-icon { transform: scale(1.08); }
.factory-play-label { font-weight: 600; }
.factory-soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; text-align: center; }
.factory-soon img { width: 56px; height: 56px; border-radius: 50%; background: #fff; padding: 4px; }
@media (min-width: 768px) {
  .factory-play-icon { width: 92px; height: 92px; }
  .factory-play-icon svg { width: 42px; height: 42px; }
  .factory-play-label { font-size: 18px; }
  .factory-soon img { width: 72px; height: 72px; }
}
@media (max-width: 480px) {
  .factory-soon p:first-of-type { margin-top: 8px; }
}

/* Our products page: category filter */
.filter-panel { border: 1px solid rgba(22, 40, 28, .12); border-radius: 16px; background: #F4F9F4; padding: 20px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.filter-button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid rgba(22, 40, 28, .14); border-radius: 999px; background: #fff; padding: 8px 14px;
  font-size: 15px; font-weight: 500; color: #16281C; text-align: left; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.filter-button:hover { border-color: #1B7F37; color: #1B7F37; }
.filter-button:focus-visible { outline: 2px solid #1B7F37; outline-offset: 2px; }
.filter-button[aria-pressed="true"] { border-color: #1B7F37; background: #1B7F37; color: #fff; }
.filter-count { display: inline-flex; min-width: 24px; height: 24px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; background: #F4F9F4; font-size: 13px; font-weight: 600; color: #56665B; }
.filter-button[aria-pressed="true"] .filter-count { background: rgba(255, 255, 255, .2); color: #fff; }
@media (min-width: 768px) {
  .filter-panel { position: sticky; top: 120px; padding: 24px; }
  .filter-list { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
  .filter-button { width: 100%; border-radius: 10px; padding: 11px 14px; }
}
