/* =====================================================
   Yerogu — public site stylesheet
   ===================================================== */

:root {
  --cream: #F8F0DD;
  --offwhite: #F6F3EB;
  --brown: #9C8064;
  --teal: #378275;
  --teal-hover: #2a6b5e;
  --dark: #2a2118;
  --text: #3d2f22;
  --shadow: rgba(60, 40, 20, 0.12);

  --whatsapp: #25D366;
  --whatsapp-hover: #1da851;
  --red: #c0392b;
  --red-hover: #a93226;
  --success-bg: #eafaf1;
  --success-text: #1e8449;
  --error-bg: #fdedec;
  --error-text: #922b21;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--offwhite);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

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

/* ---------------- Loading overlay ---------------- */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .4s ease, visibility .4s ease;
}
#loading-overlay img { width: 90px; height: 90px; object-fit: contain; animation: pulse 1.2s ease-in-out infinite; }
#loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .7; } }

/* ---------------- Header ---------------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--brown);
  position: sticky;
  top: 0;
  z-index: 500;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-link { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-img {
  width: 44px; height: 44px;
  object-fit: contain;
  background: var(--brown);
  border-radius: 10px;
  padding: 4px;
}
.logo-text { font-weight: 700; font-size: 1.25rem; color: var(--dark); }

.main-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.main-nav a {
  color: var(--brown);
  font-weight: 600;
  font-size: .95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.main-nav a:hover { color: var(--teal); }
.main-nav a.active { color: var(--teal); border-bottom-color: var(--teal); }

.lang-toggle { display: flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--brown); }
.lang-toggle a { color: var(--brown); font-weight: 700; }
.lang-toggle a.active { color: var(--teal); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; color: var(--dark); display: flex; }
.cart-badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--teal); color: #fff;
  font-size: .68rem; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span { width: 24px; height: 2px; background: var(--dark); border-radius: 2px; }

/* ---------------- Hero ---------------- */
.hero {
  background: var(--cream);
  padding: 60px 20px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.hero-content { max-width: 560px; }
.hero-content h1 {
  color: var(--dark);
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 16px;
}
.hero-content p { color: var(--text); font-size: 1.05rem; margin: 0 auto 26px; max-width: 480px; }

/* Hero visual: carousel images orbit around the centered logo badge in a
   ring, dimming into the background at one fixed point of the rotation
   instead of running as a separate linear section. */
.hero-visual {
  position: relative;
  width: 500px;
  height: 500px;
  flex: 0 0 auto;
}

/* Non-rotating wrapper: the dim wedge (mask) stays fixed in place here
   while the ring of images spins underneath it. */
.hero-orbit-ring {
  position: absolute;
  inset: 0;
  -webkit-mask-image: conic-gradient(black 0deg 140deg, transparent 180deg, black 220deg 360deg);
  mask-image: conic-gradient(black 0deg 140deg, transparent 180deg, black 220deg 360deg);
}

/* Rotates the whole ring of orbit items together. */
.hero-orbit-spin {
  position: absolute;
  inset: 0;
  animation: hero-orbit-rotate var(--orbit-duration, 20s) linear infinite;
}
@keyframes hero-orbit-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Each item gets a fixed static angle offset (inline style), placing it
   evenly around the ring; being nested inside .hero-orbit-spin, this angle
   composes automatically with the parent's rotation animation. */
.hero-orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}
.hero-orbit-radius {
  position: absolute;
  transform: translateX(190px);
}

/* Counter-rotates at the same speed so the thumbnail itself stays upright
   while its position travels around the circle. */
.hero-orbit-img {
  position: absolute;
  width: 84px;
  height: 84px;
  margin-top: -42px;
  margin-left: -42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px var(--shadow);
  animation: hero-orbit-counter-rotate var(--orbit-duration, 20s) linear infinite;
}
@keyframes hero-orbit-counter-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

.hero-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px; height: 220px;
  border-radius: 50%;
  z-index: 2;
  background: radial-gradient(circle at 35% 30%, var(--teal), var(--teal-hover));
  display: flex; align-items: center; justify-content: center;
}
.hero-badge img { width: 55%; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  border: none;
  transition: background .2s ease, transform .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #443626; }
.btn-outline { background: transparent; color: var(--brown); border: 1px solid var(--brown); }
.btn-outline:hover { color: var(--teal); border-color: var(--teal); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-hover); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ---------------- Section headings ---------------- */
.section { padding: 56px 20px; }
.section-title {
  color: var(--dark);
  font-size: 1.7rem;
  margin: 0 0 28px;
  text-align: center;
}

/* ---------------- News / Deals ---------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
}
.news-card {
  background: var(--cream);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px var(--shadow);
}
.news-card img { width: 100%; height: 160px; object-fit: cover; background: var(--offwhite); }
.news-card-body { padding: 16px 18px 20px; }
.news-card-body h3 { margin: 0 0 8px; color: var(--dark); font-size: 1.05rem; }
.news-card-body p { margin: 0; color: var(--brown); font-size: .88rem; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------------- Product grid & cards ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
}
.product-card {
  background: var(--cream);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: 0 10px 24px var(--shadow); transform: translateY(-2px); }
.product-image-wrap { position: relative; background: var(--offwhite); }
.product-image-wrap img { width: 100%; height: 190px; object-fit: cover; background: var(--offwhite); }
.product-badge { position: absolute; top: 10px; left: 10px; }
.add-to-cart-btn {
  position: absolute;
  bottom: -18px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px var(--shadow);
  transition: background .2s ease;
}
.add-to-cart-btn:hover { background: var(--teal-hover); }
.product-info { padding: 26px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-category { color: var(--brown); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 4px; }
.product-name { color: var(--dark); font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.product-price { color: var(--teal); font-weight: 700; font-size: 1.1rem; margin: 0 0 14px; }
.product-order-btn {
  margin-top: auto;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  font-size: .85rem;
  transition: background .2s ease;
}
.product-order-btn:hover { background: #443626; }

/* ---------------- Catalog filters ---------------- */
.catalog-toolbar {
  max-width: 1200px;
  margin: 0 auto 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn {
  background: transparent;
  border: 1px solid var(--brown);
  color: var(--brown);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s ease;
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }

.search-input {
  background: var(--offwhite);
  border: 1px solid var(--brown);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: .9rem;
  color: var(--text);
  min-width: 220px;
}
.search-input:focus { outline: none; border-color: var(--teal); }

/* ---------------- Forms (shared) ---------------- */
input, textarea, select {
  background: var(--offwhite);
  border: 1px solid var(--brown);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .92rem;
  color: var(--text);
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); }
label { font-size: .85rem; color: var(--brown); font-weight: 600; display: block; margin-bottom: 6px; }

/* ---------------- About Us ---------------- */
.about-section { background: var(--cream); }
.about-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-inner p { color: var(--text); font-size: 1.02rem; line-height: 1.7; }

/* ---------------- Product detail page ---------------- */
.product-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}
.product-detail-image { background: var(--offwhite); border-radius: 16px; overflow: hidden; }
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.product-detail-info h1 { color: var(--dark); font-size: 1.7rem; margin: 6px 0 14px; }
.product-detail-price { color: var(--teal); font-size: 1.6rem; font-weight: 700; margin: 0 0 18px; }
.product-detail-desc { color: var(--text); margin: 0 0 26px; line-height: 1.7; }
.qty-selector { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-selector button {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--brown);
  background: var(--offwhite); color: var(--dark); font-size: 1.1rem;
}
.qty-selector span { font-weight: 700; min-width: 20px; text-align: center; }

/* ---------------- Cart page ---------------- */
.cart-page { max-width: 900px; margin: 0 auto; padding: 50px 20px; }
.cart-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--cream);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; background: var(--offwhite); }
.cart-item-info { flex: 1; }
.cart-item-info h4 { margin: 0 0 4px; color: var(--dark); }
.cart-item-info .price { color: var(--teal); font-weight: 700; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; }
.cart-item-qty button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brown);
  background: var(--offwhite); color: var(--dark);
}
.cart-item-remove { color: var(--red); font-size: .8rem; font-weight: 600; background: none; border: none; }
.cart-item-remove:hover { color: var(--red-hover); }
.cart-summary {
  background: var(--cream);
  border-radius: 14px;
  padding: 24px;
  margin-top: 24px;
}
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--text); }
.cart-summary-row.total { font-weight: 700; font-size: 1.2rem; color: var(--dark); border-top: 1px solid var(--brown); padding-top: 14px; margin-top: 14px; }
.cart-summary-row.total .amount { color: var(--teal); }
.cart-empty-state { text-align: center; padding: 60px 20px; color: var(--brown); }

/* ---------------- Contact page ---------------- */
.contact-page { max-width: 800px; margin: 0 auto; padding: 50px 20px; }
.contact-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 34px;
  display: grid;
  gap: 18px;
}
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-row .label { color: var(--brown); font-weight: 700; min-width: 110px; }
.contact-row .value { color: var(--text); }
.contact-social { display: flex; gap: 16px; margin-top: 10px; }
.contact-social a { color: var(--teal); font-weight: 700; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--dark); color: #f0e8d8; padding: 46px 20px 26px; margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; background: var(--brown); border-radius: 10px; padding: 4px; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: #f0e8d8; opacity: .85; font-size: .9rem; }
.footer-links a:hover { opacity: 1; color: var(--teal); }
.footer-social { display: flex; justify-content: center; gap: 18px; margin-bottom: 18px; font-size: .85rem; }
.footer-social a { opacity: .85; }
.footer-social a:hover { opacity: 1; color: var(--teal); }
.footer-copy { font-size: .78rem; opacity: .6; margin: 0; }

/* ---------------- WhatsApp floating button ---------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--shadow);
  z-index: 800;
  transition: background .2s ease, transform .15s ease;
}
.whatsapp-float:hover { background: var(--whatsapp-hover); transform: scale(1.06); }

/* ---------------- Toasts ---------------- */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: .88rem;
  box-shadow: 0 4px 12px var(--shadow);
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.alert { padding: 14px 18px; border-radius: 8px; font-size: .9rem; margin-bottom: 18px; }
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 78%;
    max-width: 300px;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 28px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -6px 0 20px var(--shadow);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.05rem; }
  .lang-toggle { margin-top: 10px; }

  .hero { padding: 40px 16px; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-visual { width: 300px; height: 300px; }
  .hero-orbit-radius { transform: translateX(115px); }
  .hero-orbit-img { width: 50px; height: 50px; margin-top: -25px; margin-left: -25px; }
  .hero-badge { width: 135px; height: 135px; }

  .section { padding: 40px 16px; }

  .product-grid, .news-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .product-info { padding: 22px 12px 12px; }
  .product-name { font-size: .9rem; }

  .cart-item { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .product-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { padding: 12px 16px; }
  .logo-text { display: none; }
}
