/* ---------------------------------------------------------------------------
 * Just Juice -- modern overlay
 * Loaded AFTER styles.css so selectors win on equal specificity.
 * Targets new .jj-* classes wherever possible (no theme override), and only
 * tightens type/buttons where the theme's defaults look dated.
 * ------------------------------------------------------------------------- */

:root {
  --jj-green:        #3b7c2c;
  --jj-green-dark:   #2d5f22;
  --jj-green-light:  #9bcf3c;
  --jj-mint:         #eef6e5;
  --jj-ink:          #1f2733;
  --jj-text:         #2e3540;
  --jj-muted:        #6c7686;
  --jj-line:         #e6e9ed;
  --jj-bg:           #fafaf7;
  --jj-card:         #ffffff;
  --jj-shadow-sm:    0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .03);
  --jj-shadow-md:    0 4px 12px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04);
  --jj-shadow-lg:    0 12px 28px rgba(15, 23, 42, .10), 0 4px 8px rgba(15, 23, 42, .04);
  --jj-radius:       10px;
  --jj-radius-sm:    6px;
}

/* --- Sticky footer: make the page fill the viewport so the footer always
       sits at the bottom even when content is short.
       Wrapper -> column flex, <main> grows, footer stays its natural height. --- */
html, body { min-height: 100vh; }
body > .main-wrapper {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}
body > .main-wrapper > main {
  flex: 1 0 auto !important;
}
body > .main-wrapper > footer.jj-footer {
  flex-shrink: 0 !important;
}

/* --- typography polish (non-disruptive) --- */
body, .jj-product-card, .jj-pdp, .jj-footer, .jj-section-head,
.jj-feature, .jj-btn {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* --- buttons --- */
.jj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--jj-radius-sm); border: 1px solid transparent;
  background: var(--jj-green); color: #fff;
  font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.jj-btn:hover  { background: var(--jj-green-dark); color: #fff; text-decoration: none; }
.jj-btn:active { transform: translateY(1px); }
.jj-btn.is-ghost { background: #fff; color: var(--jj-ink); border-color: var(--jj-line); }
.jj-btn.is-ghost:hover { background: var(--jj-bg); color: var(--jj-ink); }
.jj-btn.is-accent { background: var(--jj-green-light); color: var(--jj-ink); }
.jj-btn.is-accent:hover { background: #8bbf2e; color: var(--jj-ink); }
.jj-btn.is-block { width: 100%; }
.jj-btn.is-sm { padding: 8px 14px; font-size: 13px; }

/* --- section heading --- */
.jj-section { padding: 70px 0; }
.jj-section.is-tight { padding: 40px 0; }
.jj-section-head { text-align: center; margin-bottom: 40px; }
.jj-section-head .eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--jj-green); font-weight: 700; margin-bottom: 10px;
}
.jj-section-head h2 { font-size: 32px; margin: 0 0 10px; color: var(--jj-ink); font-weight: 700; line-height: 1.2; }
.jj-section-head p { color: var(--jj-muted); max-width: 560px; margin: 0 auto; font-size: 16px; }

/* --- product card (used on /products grid + related products) --- */
.jj-product-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.jj-product-card {
  background: var(--jj-card); border-radius: var(--jj-radius); overflow: hidden;
  border: 1px solid var(--jj-line); box-shadow: var(--jj-shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.jj-product-card:hover {
  transform: translateY(-3px); border-color: var(--jj-green-light);
  box-shadow: var(--jj-shadow-md);
}
.jj-product-card a.cover {
  display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--jj-bg);
}
.jj-product-card a.cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.jj-product-card:hover a.cover img { transform: scale(1.04); }
.jj-product-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.jj-product-card .size { font-size: 12px; color: var(--jj-muted); letter-spacing: .04em; text-transform: uppercase; }
.jj-product-card .name { font-size: 16px; font-weight: 600; color: var(--jj-ink); margin: 0; line-height: 1.3; }
.jj-product-card .name a { color: inherit; text-decoration: none; }
.jj-product-card .name a:hover { color: var(--jj-green); }
.jj-product-card .price { font-size: 18px; font-weight: 700; color: var(--jj-green); margin: 4px 0 12px; }
.jj-product-card .actions { margin-top: auto; display: flex; gap: 8px; }
.jj-product-card .actions form { flex: 1; margin: 0; }
.jj-product-card .actions .jj-btn { width: 100%; }

/* --- product detail page --- */
.jj-pdp { padding: 60px 0; }
.jj-pdp-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px; align-items: start;
}
@media (max-width: 880px) { .jj-pdp-grid { grid-template-columns: 1fr; gap: 28px; } }

.jj-gallery-main {
  aspect-ratio: 1 / 1; background: var(--jj-card);
  border: 1px solid var(--jj-line); border-radius: var(--jj-radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-in;
  position: relative;
}
.jj-gallery-main img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  padding: 18px;
  box-sizing: border-box;
  transition: opacity .2s ease;
}
.jj-gallery-main::after {
  content: ""; position: absolute; right: 12px; bottom: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(31, 39, 51, .6) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M6 0H1.5A1.5 1.5 0 0 0 0 1.5V6h1V1.5A.5.5 0 0 1 1.5 1H6V0zm4 0v1h4.5a.5.5 0 0 1 .5.5V6h1V1.5A1.5 1.5 0 0 0 14.5 0H10zM0 10v4.5A1.5 1.5 0 0 0 1.5 16H6v-1H1.5a.5.5 0 0 1-.5-.5V10H0zm16 0h-1v4.5a.5.5 0 0 1-.5.5H10v1h4.5a1.5 1.5 0 0 0 1.5-1.5V10z"/></svg>') center no-repeat;
  pointer-events: none; opacity: .85;
}

/* --- Lightbox (vanilla, no jQuery) ---
 * Forced with !important across the board because the underlying theme has
 * very aggressive image + container rules that otherwise win on specificity.
 * The lightbox element is appended to <body> at runtime so no parent
 * grid/flex container can constrain its size.
 */
.jj-lightbox {
  position: fixed !important;
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important;
  z-index: 2147483000 !important;
  margin: 0 !important; padding: 30px !important;
  background: rgba(15, 23, 42, .92) !important;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex !important;
  align-items: center !important; justify-content: center !important;
  cursor: zoom-out !important;
  box-sizing: border-box !important;
}
.jj-lightbox[hidden] { display: none !important; }
.jj-lightbox img {
  max-width: calc(100vw - 60px) !important;
  max-height: calc(100vh - 60px) !important;
  width: auto !important; height: auto !important;
  object-fit: contain !important; display: block !important;
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
  cursor: default;
  margin: 0 auto !important;
}
.jj-lightbox .close {
  position: absolute !important; top: 18px !important; right: 18px !important;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 0; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; padding: 0;
}
.jj-lightbox .close:hover { background: rgba(255,255,255,.25); }
.jj-lightbox .nav-arrow {
  position: absolute !important; top: 50% !important;
  transform: translateY(-50%) !important;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 0; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; padding: 0;
}
.jj-lightbox .nav-arrow:hover { background: rgba(255,255,255,.25); }
.jj-lightbox .nav-arrow.prev { left: 18px !important; }
.jj-lightbox .nav-arrow.next { right: 18px !important; }
.jj-lightbox .counter {
  position: absolute !important; bottom: 18px !important;
  left: 50% !important; transform: translateX(-50%) !important;
  color: rgba(255,255,255,.75); font-size: 13px; letter-spacing: .04em;
}
body.jj-lightbox-open { overflow: hidden !important; }
.jj-gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.jj-gallery-thumb {
  flex: 0 0 auto; padding: 0; background: none; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--jj-radius-sm); overflow: hidden;
  transition: border-color .15s ease;
}
.jj-gallery-thumb img { width: 80px; height: 80px; object-fit: cover; display: block; }
.jj-gallery-thumb:hover { border-color: var(--jj-green-light); }
.jj-gallery-thumb.is-active { border-color: var(--jj-green); }

.jj-pdp-info h1 {
  font-size: 26px; font-weight: 700; color: var(--jj-ink);
  margin: 0 0 12px; line-height: 1.25; letter-spacing: -0.005em;
}
.jj-pdp-info .size-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--jj-mint); color: var(--jj-green); font-size: 12px; font-weight: 600;
  letter-spacing: .02em; margin-bottom: 10px;
}
.jj-pdp-info .price {
  font-size: 28px; font-weight: 700; color: var(--jj-green);
  margin: 4px 0 18px; line-height: 1;
}
.jj-pdp-info .price .currency { font-size: 18px; color: var(--jj-muted); margin-right: 6px; vertical-align: top; line-height: 1.8; font-weight: 500; }
.jj-pdp-info .description { color: var(--jj-text); font-size: 16px; line-height: 1.7; margin: 0 0 24px; }
.jj-pdp-info .cart-form {
  display: flex; gap: 10px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap;
}
.jj-pdp-info .qty-input {
  width: 80px; padding: 10px 12px;
  border: 1px solid var(--jj-line); border-radius: var(--jj-radius-sm);
  font: inherit; text-align: center;
}
.jj-pdp-info .qty-input:focus { border-color: var(--jj-green); outline: 0; box-shadow: 0 0 0 3px rgba(59,124,44,.15); }
.jj-pdp-info .cart-form { margin-bottom: 12px; }
.jj-pdp-info .cart-form .jj-btn { flex: 1; min-width: 180px; }
.jj-pdp-info .jj-btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-bottom: 24px;
  padding: 14px 20px;
  background: #25D366; color: #fff;
  border: 0; border-radius: var(--jj-radius-sm);
  font-weight: 600; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.jj-pdp-info .jj-btn-whatsapp:hover { background: #1ebe57; color: #fff; text-decoration: none; transform: translateY(-1px); }
.jj-pdp-info .jj-btn-whatsapp i { font-size: 18px; }
.jj-pdp-info .meta-row { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--jj-line); color: var(--jj-muted); font-size: 14px; }
.jj-pdp-info .meta-row strong { color: var(--jj-ink); font-weight: 600; }
.jj-pdp-info .share { margin-top: 18px; display: flex; gap: 10px; align-items: center; color: var(--jj-muted); font-size: 14px; }
.jj-pdp-info .share a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--jj-bg); color: var(--jj-ink); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.jj-pdp-info .share a:hover { background: var(--jj-green); color: #fff; }

.jj-pdp-info .wholesale-cta {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--jj-mint, #eaf6e2);
  border-left: 4px solid var(--jj-green);
  border-radius: 6px;
  font-size: 14px;
  color: var(--jj-ink);
}
.jj-pdp-info .wholesale-cta strong { display: block; margin-bottom: 4px; font-weight: 600; color: var(--jj-green-dark, #2c5e1f); }
.jj-pdp-info .wholesale-cta p { margin: 0; line-height: 1.5; }
.jj-pdp-info .wholesale-cta a { color: var(--jj-green); text-decoration: none; font-weight: 600; }
.jj-pdp-info .wholesale-cta a:hover { text-decoration: underline; }

/* --- product detail: structured long description --- */
.jj-pdp-details { padding: 0 0 70px; }
.jj-pdp-details-card {
  max-width: 880px; margin: 0 auto;
  background: var(--jj-card); border: 1px solid var(--jj-line);
  border-radius: var(--jj-radius); padding: 36px 44px;
  box-shadow: var(--jj-shadow-sm);
}
@media (max-width: 640px) { .jj-pdp-details-card { padding: 24px 22px; } }
.jj-pdp-details-title {
  font-size: 20px; font-weight: 700; color: var(--jj-ink);
  margin: 0 0 18px; padding-bottom: 14px;
  border-bottom: 2px solid var(--jj-mint);
}
.jj-pdp-details-body { color: var(--jj-text); font-size: 16px; line-height: 1.75; }
.jj-pdp-details-body .jj-md-p   { margin: 0 0 16px; }
.jj-pdp-details-body .jj-md-p:last-child { margin-bottom: 0; }
.jj-pdp-details-body .jj-md-h   {
  font-size: 16px; font-weight: 700; color: var(--jj-ink);
  letter-spacing: .02em; text-transform: uppercase;
  margin: 26px 0 10px;
}
.jj-pdp-details-body .jj-md-h:first-child { margin-top: 0; }
.jj-pdp-details-body .jj-md-ul {
  margin: 0 0 16px; padding: 0; list-style: none;
}
.jj-pdp-details-body .jj-md-ul li {
  position: relative; padding: 4px 0 4px 22px;
}
.jj-pdp-details-body .jj-md-ul li::before {
  content: ""; position: absolute; left: 4px; top: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--jj-green-light);
}
.jj-pdp-details-body strong { color: var(--jj-ink); }
.jj-pdp-details-body em     { font-style: italic; color: var(--jj-text); }

/* --- footer --- */
.jj-footer {
  background: var(--jj-ink); color: #c5cbd6;
  padding: 60px 0 0; margin-top: 80px;
}
.jj-footer a { color: #c5cbd6; text-decoration: none; transition: color .15s; }
.jj-footer a:hover { color: var(--jj-green-light); text-decoration: none; }
.jj-footer-grid {
  display: grid; gap: 36px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  padding-bottom: 40px;
}
@media (max-width: 880px)  { .jj-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px)  { .jj-footer-grid { grid-template-columns: 1fr; } }
.jj-footer h4 {
  color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  margin: 0 0 18px;
}
.jj-footer-brand img { max-width: 140px; margin-bottom: 16px; height: auto; }
.jj-footer-brand p   { font-size: 14px; line-height: 1.7; color: #8a93a3; margin: 0 0 18px; max-width: 320px; }
.jj-footer-social { display: flex; gap: 10px; }
.jj-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: #2a3342;
}
.jj-footer-social a:hover { background: var(--jj-green); color: #fff; }
.jj-footer-nav { display: block; }
.jj-footer-nav ul { list-style: none; padding: 0; margin: 0; display: block; }
.jj-footer-nav li { margin-bottom: 9px; font-size: 14px; display: block; }
.jj-footer-contact p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; }
.jj-footer-contact .label { color: #8a93a3; display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
.jj-footer-bottom {
  border-top: 1px solid #2a3342;
  padding: 20px 0; font-size: 13px; color: #8a93a3;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.jj-footer-bottom .signature { color: #8a93a3; }
.jj-footer-bottom .signature .heart { color: #e74c3c; }

/* --- feature strip (used on home + other landing pages) --- */
.jj-features {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 30px 0 0;
}
.jj-feature {
  background: var(--jj-card); border: 1px solid var(--jj-line);
  border-radius: var(--jj-radius); padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, transform .15s ease;
}
.jj-feature:hover { border-color: var(--jj-green-light); transform: translateY(-2px); }
.jj-feature .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--jj-mint); color: var(--jj-green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 6px; font-size: 20px;
}
.jj-feature h3 { font-size: 16px; font-weight: 600; color: var(--jj-ink); margin: 0; }
.jj-feature p  { font-size: 14px; color: var(--jj-muted); margin: 0; line-height: 1.6; }

/* --- home hero slide caption overlay ---
   Used by Revolution Slider's tp-caption layer system. Bottom-left,
   white text on a soft scrim, brand-green accent bar. #}                 */
.jj-slide-caption.tp-caption {
  color: #fff !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
  padding: 18px 24px 20px 28px;
  background: linear-gradient(135deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.15) 100%);
  border-left: 4px solid var(--jj-green-light);
  border-radius: 0 4px 4px 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  max-width: 90vw;
}

/* --- Add-to-cart toast (top-right popup, slides in on AJAX add) --- */
.jj-cart-toast {
  position: fixed; top: 90px; right: 20px;
  z-index: 9998; max-width: 360px; width: calc(100vw - 40px);
  pointer-events: none;
}
.jj-cart-toast[hidden] { display: none; }
.jj-toast-card {
  background: #fff; border: 1px solid var(--jj-line);
  border-radius: var(--jj-radius); box-shadow: var(--jj-shadow-lg);
  padding: 16px 18px 14px 56px;
  position: relative; pointer-events: auto;
  transform: translateY(-14px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.jj-cart-toast.is-visible .jj-toast-card { transform: translateY(0); opacity: 1; }
.jj-cart-toast.is-error  .jj-toast-card { border-color: #f1bdb6; }
.jj-toast-icon {
  position: absolute; left: 14px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--jj-mint); color: var(--jj-green);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.jj-cart-toast.is-error .jj-toast-icon { background: #fae3e0; color: #c0392b; }
.jj-toast-title { display: block; font-weight: 600; color: var(--jj-ink); font-size: 14px; }
.jj-toast-meta  { display: block; color: var(--jj-muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.jj-toast-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: 0; color: var(--jj-muted);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 6px;
}
.jj-toast-close:hover { color: var(--jj-ink); }
.jj-toast-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.jj-toast-actions .jj-btn { flex: 1; padding: 8px 12px; font-size: 13px; }

/* --- home page gallery (admin-managed via /admin/images) --- */
.jj-home-gallery {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.jj-home-gallery-item {
  margin: 0; position: relative; overflow: hidden;
  border-radius: var(--jj-radius); background: var(--jj-bg);
  box-shadow: var(--jj-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.jj-home-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--jj-shadow-md);
}
.jj-home-gallery-item img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.jj-home-gallery-item:hover img { transform: scale(1.06); }
.jj-home-gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px 12px;
  background: linear-gradient(to top, rgba(15,23,42,.78), rgba(15,23,42,0));
  color: #fff; font-size: 13px; line-height: 1.4; font-weight: 500;
  opacity: 0; transition: opacity .25s ease;
}
.jj-home-gallery-item:hover figcaption,
.jj-home-gallery-item:focus-within figcaption {
  opacity: 1;
}
@media (hover: none) {
  /* On touch devices captions are always visible since hover isn't reliable. */
  .jj-home-gallery-item figcaption { opacity: 1; }
}

/* --- container helper (the theme uses .container; we provide one for new sections) --- */
.jj-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* --- chip / tag --- */
.jj-chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--jj-mint); color: var(--jj-green);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
