/* ======================================================
   SWEETCHEEKS ZA — MOBILE & TABLET ENHANCEMENTS
   sc-mobile.css — loaded on every page
   Breakpoints: ≤1024px tablet-wide, ≤768px tablet,
                ≤640px small tablet, ≤480px phone, ≤380px small phone
   ====================================================== */

/* ────────────────────────────────────────────────────
   1. STICKY CONTACT BAR — fixed bottom, mobile only
   Shows WhatsApp + Request Quote actions at all times.
   ──────────────────────────────────────────────────── */
.sc-sticky-bar {
  display: none;
}

@media (max-width: 767px) {
  .sc-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #fff;
    border-top: 1.5px solid rgba(233, 30, 143, 0.15);
    box-shadow: 0 -4px 24px rgba(45, 10, 48, 0.12);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
    align-items: stretch;
  }

  .sc-sticky-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-height: 48px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.18s, transform 0.18s;
    -webkit-tap-highlight-color: transparent;
  }

  .sc-sticky-bar__btn:active {
    transform: scale(0.96);
    opacity: 0.88;
  }

  .sc-sticky-bar__btn--wa {
    background: #25D366;
    color: #fff;
    flex: 1.1;
  }

  .sc-sticky-bar__btn--quote {
    background: linear-gradient(135deg, #E91E8F 0%, #9B1FA8 100%);
    color: #fff;
    flex: 1;
  }

  .sc-sticky-bar__btn svg,
  .sc-sticky-bar__btn i {
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  /* Push page content up so sticky bar doesn't cover footer links */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

/* ────────────────────────────────────────────────────
   2. TOUCH TARGETS — minimum 44×44px per WCAG 2.5.5
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Header icon buttons */
  .sc-icon-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Hamburger button */
  .sc-hamburger {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }

  /* Mobile nav top-level items */
  .sc-mobile-nav__item > a,
  .sc-mobile-nav__toggle {
    min-height: 52px;
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  /* Mobile sub-menu links */
  .sc-mobile-nav__sub li a {
    min-height: 44px;
    padding: 12px 24px 12px 44px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
  }

  /* Mobile sub-menu section headers */
  .sc-mobile-sub__head {
    padding: 12px 24px 8px 24px;
    font-size: 0.7rem;
  }

  /* General button touch target */
  .sc-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ────────────────────────────────────────────────────
   3. HEADER — mobile optimizations
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Hide "Request a Quote" CTA in header — covered by sticky bar */
  .sc-header__actions .sc-btn--cta {
    display: none !important;
  }

  /* Compact the header inner */
  .sc-header__inner {
    padding: 8px 14px;
    gap: 6px;
  }

  /* Logo: smaller on mobile */
  .sc-logo__img {
    width: 40px;
    height: 40px;
  }

  .sc-logo__text .tagline {
    display: none;
  }

  .sc-logo__text .name {
    font-size: 1rem;
  }
}

/* Service area bar — simplified on small mobile */
@media (max-width: 640px) {
  .sc-service-area__icon,
  .sc-service-area__text {
    display: none;
  }

  .sc-service-area__cities {
    gap: 6px;
  }

  .sc-service-area__city {
    font-size: 0.68rem;
    padding: 2px 8px;
  }
}

@media (max-width: 480px) {
  /* On very small screens, hide the cities list entirely — WhatsApp only */
  .sc-service-area__left {
    display: none;
  }

  .sc-service-area__inner {
    justify-content: center;
  }
}

/* ────────────────────────────────────────────────────
   4. HERO SECTION — compact on mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Reduce hero vertical padding */
  .sc-hero--split,
  section.sc-hero {
    padding-top: 32px !important;
    padding-bottom: 36px !important;
    min-height: auto !important;
  }

  /* Stack columns, content first */
  .sc-hero--split .sc-hero__split-inner {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Hero card: less padding */
  .sc-hero-card {
    padding: 28px 24px !important;
  }

  /* Hero title: readable size */
  .sc-hero__title {
    font-size: clamp(1.8rem, 7vw, 2.6rem) !important;
    line-height: 1.2 !important;
  }

  /* Hero description */
  .sc-hero__desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  /* CTA buttons: full width stack */
  .sc-hero__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 24px !important;
  }

  .sc-hero__actions .sc-btn {
    justify-content: center !important;
    width: 100% !important;
    min-height: 52px !important;
    font-size: 1rem !important;
  }

  /* Trust row: compact */
  .sc-hero__trust-row {
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
  }

  .sc-hero__trust-item {
    font-size: 0.8rem;
  }

  /* Location line */
  .sc-hero__location {
    font-size: 0.78rem;
    margin-top: 12px;
  }

  /* Hide hero visual (large image) on mobile — content loads first */
  .sc-hero__visual {
    display: none !important;
  }
}

/* ────────────────────────────────────────────────────
   5. STATS BAR — horizontal scroll on mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-statsbar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sc-statsbar::-webkit-scrollbar {
    display: none;
  }

  .sc-statsbar__inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 12px;
    min-width: max-content;
  }

  .sc-statsbar__item {
    padding: 16px 20px;
    flex-shrink: 0;
  }

  .sc-statsbar__num {
    font-size: 1.6rem !important;
  }

  .sc-statsbar__label {
    font-size: 0.7rem !important;
    white-space: nowrap;
  }

  .sc-statsbar__sep {
    flex-shrink: 0;
  }
}

/* ────────────────────────────────────────────────────
   6. PRODUCT LISTINGS — homepage grid
   ──────────────────────────────────────────────────── */

/* Tablet: 2-column product grid on homepage */
@media (max-width: 768px) {
  .sc-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .sc-product-card .sc-card__image {
    aspect-ratio: 1 / 1;
  }
}

/* Phone: 1-column product grid on homepage */
@media (max-width: 480px) {
  .sc-products-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* ────────────────────────────────────────────────────
   7. PRODUCT PAGES — WooCommerce single product
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Ensure product summary (name, price, add-to-cart) is above the gallery */
  .woocommerce div.product {
    display: flex;
    flex-direction: column;
  }

  .woocommerce div.product .woocommerce-product-gallery {
    order: 2;
    margin-top: 20px;
  }

  .woocommerce div.product .summary {
    order: 1;
    padding: 0 0 4px;
  }

  /* Product title: readable size */
  .woocommerce div.product h1.product_title,
  .woocommerce div.product .product_title {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
    margin-bottom: 10px !important;
    line-height: 1.25 !important;
  }

  /* Price: prominent */
  .woocommerce div.product p.price,
  .woocommerce div.product span.price {
    font-size: 1.5rem !important;
    margin-bottom: 18px !important;
  }

  /* Quantity + Add to cart: full width */
  .woocommerce div.product form.cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .woocommerce div.product form.cart .qty {
    width: 80px;
    min-height: 48px;
    font-size: 16px !important;
    text-align: center;
    padding: 10px;
    border: 1.5px solid #EDCAE8;
    border-radius: 8px;
  }

  .woocommerce div.product form.cart .single_add_to_cart_button,
  .woocommerce div.product form.cart button[type="submit"] {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 4px;
  }

  /* Short description */
  .woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 18px;
  }

  /* Product tabs: accordion-style touch targets */
  .woocommerce-tabs .tabs li a {
    padding: 12px 16px !important;
    font-size: 0.875rem !important;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .woocommerce-tabs .woocommerce-Tabs-panel {
    padding: 20px 16px !important;
    font-size: 0.9rem;
    line-height: 1.75;
  }

  /* Product gallery: pinch-to-zoom enabled via touch-action */
  .woocommerce-product-gallery__slider {
    touch-action: pan-y pinch-zoom;
  }

  .woocommerce-product-gallery__trigger {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Related products: 2-column on tablet */
  .woocommerce .related ul.products,
  .woocommerce .upsells ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    display: grid !important;
    gap: 16px;
  }

  /* Delivery / meta info near price */
  .product_meta {
    font-size: 0.82rem;
    padding: 12px 0;
    border-top: 1px solid rgba(233, 30, 143, 0.12);
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  /* Related products: 1-column on phone */
  .woocommerce .related ul.products,
  .woocommerce .upsells ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* ────────────────────────────────────────────────────
   8. FORMS — mobile optimization
   Prevents iOS input zoom (requires font-size ≥16px)
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  input[type="date"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Quote form fields: full width */
  .sc-form-row,
  .sc-form .form-row {
    width: 100% !important;
    float: none !important;
  }

  /* Larger submit buttons */
  .sc-form button[type="submit"],
  .sc-form input[type="submit"],
  .sc-quote-form button[type="submit"] {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
  }

  /* Reduce contact form padding on mobile */
  .sc-contact-form-wrap {
    padding: 24px 16px !important;
  }

  /* Radio card options: full width on phone */
  .sc-radio-cards {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .sc-radio-cards {
    grid-template-columns: 1fr !important;
  }
}

/* ────────────────────────────────────────────────────
   9. SECTION PADDING — reduced on mobile for breathing room
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .sc-section-head,
  .sc-section-heading {
    margin-bottom: 28px;
  }

  .sc-section-head h2,
  .sc-section-heading h2 {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
  }

  /* Reduce container side padding on small screens */
  .sc-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 480px) {
  .sc-section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
}

/* ────────────────────────────────────────────────────
   10. SERVICES AND PACKAGE CARDS — responsive grid
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Services: 2-column on tablet */
  .sc-services__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* Package cards: 2-column on tablet */
  .sc-packages__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* Review cards: 1-column on tablet */
  .sc-reviews__grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Service card icon: smaller */
  .sc-service-card__icon {
    font-size: 1.75rem;
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  /* Services: 1-column on phone */
  .sc-services__grid {
    grid-template-columns: 1fr !important;
  }

  /* Package cards: 1-column on phone */
  .sc-packages__grid {
    grid-template-columns: 1fr !important;
  }
}

/* ────────────────────────────────────────────────────
   11. INSTAGRAM / INSTA GRID — responsive
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-insta-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
}

@media (max-width: 480px) {
  .sc-insta-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
}

/* ────────────────────────────────────────────────────
   12. WHY US SECTION — single column on mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-why-us__grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .sc-why-us__image {
    display: none; /* Hide duplicate hero image on mobile */
  }

  .sc-why-us__features {
    gap: 16px;
  }

  .sc-why-us__feature {
    gap: 12px;
  }
}

/* ────────────────────────────────────────────────────
   13. CTA FINAL SECTION — compact on mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-cta-final {
    padding: 48px 0 !important;
  }

  .sc-cta-final__inner {
    padding: 0 16px !important;
    text-align: center;
  }

  .sc-cta-final h2 {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
  }

  .sc-cta-final__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .sc-cta-final__actions .sc-btn {
    justify-content: center !important;
    width: 100% !important;
  }
}

/* ────────────────────────────────────────────────────
   14. TRUST STRIP — horizontal scroll on mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-trust-strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sc-trust-strip::-webkit-scrollbar {
    display: none;
  }

  .sc-trust-strip__inner {
    display: flex;
    flex-wrap: nowrap;
    min-width: max-content;
    gap: 0;
    padding: 0 8px;
  }

  .sc-trust-strip__item {
    padding: 14px 20px;
    flex-shrink: 0;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* ────────────────────────────────────────────────────
   15. FLOATING WHATSAPP BUTTON — repositioned on mobile
   (keep clear of sticky bar)
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* When sticky bar is visible, hide the floating WA button to avoid overlap */
  .sc-whatsapp-float {
    display: none !important;
  }
}

/* ────────────────────────────────────────────────────
   16. SHOP FILTER BAR — horizontal scroll on mobile
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
  }

  .sc-filters::-webkit-scrollbar {
    display: none;
  }

  .sc-filter-toggle {
    white-space: nowrap;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .sc-filter-group {
    flex-shrink: 0;
  }
}

/* ────────────────────────────────────────────────────
   17. MOBILE MENU — improved spacing & sub-menu max-height
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Allow longer sub-menu lists */
  .sc-mobile-accordion.open .sc-mobile-nav__sub {
    max-height: 1000px !important;
  }

  /* More space between sections in mobile menu */
  .sc-mobile-nav__sep {
    margin: 10px 24px;
  }
}

/* ────────────────────────────────────────────────────
   18. FOOTER — extra bottom padding on mobile for sticky bar
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-footer,
  footer.ast-builder-footer-grid-columns,
  footer#colophon {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ────────────────────────────────────────────────────
   19. HOMEPAGE WATERMARK — 1/4 size on mobile
   Inline style uses 200px × 200px; override to 50px.
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-home-watermark {
    background-size: 50px 50px !important;
  }
}

/* ────────────────────────────────────────────────────
   21. RESPONSIVE IMAGES — prevent layout shift
   ──────────────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
}

/* Hero image: responsive */
.sc-hero__img {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* ────────────────────────────────────────────────────
   20. WC SINGLE PRODUCT — delivery info near price
   Shows a delivery notice below add-to-cart on product pages
   ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-product-delivery-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: #2D0A30;
    margin-top: 12px;
    line-height: 1.5;
  }

  .sc-product-delivery-info i {
    color: #25D366;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
  }
}

/* Also show on desktop but smaller */
.sc-product-delivery-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(37, 211, 102, 0.06);
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #2D0A30;
  margin-top: 10px;
  line-height: 1.5;
}
