/* polish.css - small visual improvements (hero overlay, header scrolled state, product card lift, modal animation, footer gradient, transitions) */

/* Hero overlay for subtle depth */
.hero { position: relative; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(246,139,30,0.03) 50%, rgba(0,0,0,0.06) 100%);
  pointer-events: none;
  border-radius: 0 0 0 60px;
  z-index: 1;
}

/* Header scrolled state for subtle elevation */
.site-header.scrolled {
  backdrop-filter: blur(6px) saturate(120%);
  background-color: rgba(255,255,255,0.92);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Product card polish */
.product-card { transition: transform 0.28s cubic-bezier(.2,.9,.3,1), box-shadow 0.28s cubic-bezier(.2,.9,.3,1); }
.product-card:hover, .product-card:focus-within {
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  transform: translateY(-8px) scale(1.02);
}

/* Footer gradient and polish */
footer { background: linear-gradient(180deg, #3a2a2a 0%, #1a0f0f 100%); color: #fff; }
footer a { color: #fff; }
footer .footer-container { padding: 42px 0; }

/* Modal entrance animation and visible class */
.request-modal-panel { transform: translateY(18px) scale(0.995); opacity: 0; transition: transform 320ms cubic-bezier(.2,.9,.3,1), opacity 280ms ease; }
.request-modal.show .request-modal-panel, .request-modal-panel.show { transform: translateY(0) scale(1); opacity: 1; }

/* Smooth global transitions (lightweight) */
html, body, * { transition: background-color 160ms ease, color 160ms ease; }

/* Small polish for modal action buttons */
.modal-actions .btn { box-shadow: 0 6px 18px rgba(246,139,30,0.12); }

@media (max-width: 420px) {
  .modal-actions .btn { min-width: 100%; }
}

/* Subtle focus styles for accessibility */
.btn:focus { outline: 3px solid rgba(246,139,30,0.18); outline-offset: 2px; }

/* Responsive payment logos */
.payment-logos { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.payment-logos img { max-width:100%; height:auto; display:block; width:72px; }
.payment-badges-row img { max-width:120px; height:auto; display:inline-block; }

@media (max-width:480px) {
  .payment-logos img { width:56px; }
  .payment-badges-row img { max-width:90px; }
}

/* Disabled shipping method look */
.shipping-method.disabled { opacity: 0.48; pointer-events: none; }
.shipping-method.disabled .method-name, .shipping-method.disabled .method-price, .shipping-method.disabled .method-time { color: #666; }

/* Skip-to-content link visible style (when focused) */
.skip-to-content:focus {
  position: fixed !important;
  left: 12px !important;
  top: 12px !important;
  width: auto !important;
  height: auto !important;
  padding: 8px 12px !important;
  background: #ffffff !important;
  color: #222 !important;
  z-index: 99999 !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14) !important;
}

/* Floating action buttons (scroll-to-top and WhatsApp) */
.fab-container { position: fixed; right: 18px; bottom: 18px; display:flex; flex-direction:column; gap:12px; z-index:99998; }
.fab { display:inline-flex; align-items:center; justify-content:center; width:54px; height:54px; border-radius:50%; background:#f68b1e; color:#fff; box-shadow:0 10px 30px rgba(0,0,0,0.12); border:none; cursor:pointer; transition:transform 160ms ease, opacity 160ms ease; }
.fab:active { transform:scale(.96); }
.fab.small { width:44px; height:44px; }
.fab.hidden { opacity:0; pointer-events:none; transform:translateY(8px) scale(.98); }
.fab .fab-icon { font-size:20px; }
.fab-whatsapp { background:#25D366; }
.fab-tooltip { position:absolute; right:64px; bottom:0; transform:translateY(-50%); background:#111; color:#fff; padding:6px 10px; border-radius:6px; font-size:13px; white-space:nowrap; display:none; }
.fab:hover + .fab-tooltip, .fab:focus + .fab-tooltip { display:block; }

@media (max-width:480px) {
  .fab-container { right:12px; bottom:12px; gap:10px; }
  .fab { width:48px; height:48px; }
}

/* About page specific styles */
.about-hero { position:relative; display:flex; align-items:center; min-height:340px; color:#fff; }
.about-hero-bg { position:absolute; inset:0; background-size:cover; background-position:center; filter:brightness(0.62); z-index:0; }
.about-hero-content { position:relative; z-index:2; padding:4rem 1rem; }
.about-hero-title { font-size:2.2rem; margin-bottom:0.5rem; color:#fff; }
.about-hero-subtitle { color:rgba(255,255,255,0.92); max-width:720px; }

.about-story-modern-inner { display:flex; gap:2rem; align-items:center; }
.about-story-modern-img img { width:100%; height:auto; border-radius:10px; display:block; }

.about-values-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; }
.about-value-card { background:rgba(255,255,255,0.03); padding:1rem;border-radius:8px;text-align:center; }

.about-team-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  gap:1rem;
  justify-content:center; /* center the cards horizontally */
  align-items:start;
}
.about-team-card {
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:1rem;
  background: rgba(255,255,255,0.02);
  border-radius:10px;
  max-height:360px; /* reduce visual height */
  overflow:hidden;
}
.about-team-img { width:100%; height:160px; object-fit:cover; border-radius:8px; display:block; }
.about-team-name { margin-top:0.8rem; font-weight:600; }
.about-team-role { font-size:0.95rem; color:rgba(255,255,255,0.8); margin-bottom:0.6rem; }
.about-team-bio { font-size:0.95rem; color:rgba(255,255,255,0.86); margin-top:0.4rem; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; }
/* Standard clamp fallback for modern browsers */
.about-team-bio {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Attempt to use the modern line-clamp where supported */
.about-team-bio { line-clamp: 3; }

.about-contact-cta .btn { background:var(--primary); color:#fff; padding:0.8rem 1.2rem; border-radius:8px; }

@media (max-width:980px) {
  .about-story-modern-inner { flex-direction:column; }
  .about-values-grid { grid-template-columns:repeat(2,1fr); }
  .about-team-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:640px) {
  .about-hero { min-height:260px; }
  .about-hero-title { font-size:1.6rem; }
  .about-values-grid { grid-template-columns:repeat(1,1fr); }
  .about-team-grid { grid-template-columns:repeat(1,1fr); }
}

/* Mobile: stack floating cart above WhatsApp FAB to avoid overlap */
@media (max-width:640px) {
  /* push the cart slightly higher and ensure it stacks above */
  .floating-cart {
    position: fixed !important;
    right: 18px !important;
    bottom: 92px !important; /* sits above the WhatsApp FAB */
    z-index: 100000 !important;
  }

  /* WhatsApp FAB remains lower */
  .fab-container {
    right: 18px !important;
    bottom: 18px !important;
    z-index: 99999 !important;
  }

  /* Slightly reduce cart button on very small screens to avoid visual overlap */
  .floating-cart .cart-btn {
    width: 48px !important;
    height: 48px !important;
  }
}

/* Ensure the back-to-top button (.fab-top) is visible on small screens
   Override the injected 'hidden' class so users can see and tap it immediately. */
@media (max-width:640px) {
  .fab-top { margin-bottom: 8px; }
  .fab-top.hidden {
    display: inline-flex !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }
}

/* Make back-to-top visible on desktop as well and ensure it stacks above the floating cart.
   - On mobile it sits above the cart + WhatsApp stack.
   - On desktop it stays near the bottom-right but above other FABs. */
.fab-top {
  position: fixed !important;
  right: 18px !important;
  z-index: 100002 !important; /* above floating-cart (100000) and fab-container (99999) */
}

@media (max-width:640px) {
  /* place back-to-top above the cart and whatsapp on narrow screens */
  .fab-top { bottom: 148px !important; }
}

@media (min-width:641px) {
  /* desktop/tablet: keep it low but above other FABs */
  /* move higher on desktop so it doesn't overlap WhatsApp/floating cart */
  .fab-top { bottom: 92px !important; }
}

/* Ensure the 'hidden' class doesn't permanently hide the button when we want it visible */
.fab-top.hidden {
  display: inline-flex !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* Ensure WhatsApp FAB uses brand color and white icon */
.fab.fab-whatsapp, .fab-whatsapp {
  background: #25D366 !important; /* WhatsApp green */
  color: #fff !important;
}
.fab.fab-whatsapp .fab-icon, .fab-whatsapp .fab-icon { color: #fff !important; }

/* Styling for the prominent Contact CTA added above the footer */
.about-footer-cta .container {
  max-width: 1100px;
  margin: 0 auto;
}
.about-footer-cta { padding: 2rem 0; }
.about-footer-cta .btn {
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(16,24,40,0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.about-footer-cta .btn:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(16,24,40,0.12); }

/* WhatsApp CTA style (keeps brand color and contrast) */
.about-footer-cta .btn.whatsapp-cta, .about-footer-cta a[style*="#25D366"] {
  background: #25D366 !important;
  color: #fff !important;
  border: none;
}

/* Responsive stack for small screens */
@media (max-width:640px) {
  .about-footer-cta .container { padding: 1rem; }
  .about-footer-cta .btn { width: 100%; display:block; margin: 0.35rem 0; }
  .about-footer-cta .btn + .btn { margin-left: 0; }
}
