/* =================================================================
   Skyline Ceramics — Mobile UX Polish
   Targets: max-width: 768px (tablet/phone) and max-width: 576px (phone)
   ================================================================= */

/* ── 1. GLOBAL TOUCH TARGETS & FONT FLOOR ──────────────────────── */
@media (max-width: 768px) {

  /* Ensure no text is smaller than 14px */
  body { font-size: 15px; }

  p, li, td, th, label, input, textarea, select, .woocommerce-message,
  .woocommerce-error, .woocommerce-info, .wc-block-components-notice {
    font-size: max(14px, 0.875rem);
  }

  small, .text-xs, .card__meta, .shop-breadcrumb, .sp-breadcrumb,
  .topbar-item, .footer-bottom__copy { font-size: 13px; }

  /* Headings scale down gracefully */
  h1 { font-size: clamp(26px, 7vw, 42px); }
  h2 { font-size: clamp(22px, 5.5vw, 34px); }
  h3 { font-size: clamp(18px, 4.5vw, 26px); }
  h4 { font-size: clamp(16px, 4vw, 20px); }

  /* Global min touch target for all interactive elements */
  a, button, [role="button"], input[type="submit"],
  input[type="button"], input[type="checkbox"], input[type="radio"],
  select, label[for] {
    min-height: 44px;
  }

  /* Buttons get explicit padding to meet 44px */
  .btn, .button, input[type="submit"], input[type="button"],
  .woocommerce button.button, .woocommerce a.button,
  .woocommerce input.button {
    min-height: 44px;
    padding-block: 12px;
    font-size: 15px;
  }

  /* Nav links */
  .nav-link, .mobile-nav a, .mobile-nav .mobile-nav__toggle {
    min-height: 44px;
    padding-block: 12px;
  }

  /* Header actions */
  .header-action {
    width: 44px;
    height: 44px;
  }

  /* Prevent horizontal scroll globally */
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .container, .header-inner, .footer-inner, .topbar-inner {
    padding-inline: 16px;
  }

  /* All sections clip overflow */
  section, .site-section, .hero, .shop-page, .sp-page,
  .ab-page, .gallery-section, .cats-section {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Tables scroll horizontally inside a wrapper rather than breaking layout */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ── Lazy-load placeholder: maintain aspect ratio while loading ── */
  /* Exclude .custom-logo so LiteSpeed-lazy-loaded logos don't show a gray box */
  img[loading="lazy"]:not(.custom-logo) {
    background: #f0f0f0;
    min-height: 1px;
  }
}

/* ── 2. HAMBURGER → X ANIMATION ───────────────────────────────── */
@media (max-width: 768px) {
  .header-action--hamburger {
    width: 44px;
    height: 44px;
    position: relative;
  }

  .hamburger-bar {
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
  }

  /* Default 3-bar positions */
  .hamburger-bar:nth-child(1) { top: 16px; }
  .hamburger-bar:nth-child(2) { top: 22px; }
  .hamburger-bar:nth-child(3) { top: 28px; }

  /* X state when drawer is open */
  .js-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    top: 22px;
    transform: rotate(45deg);
  }
  .js-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .js-hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    top: 22px;
    transform: rotate(-45deg);
  }
}

/* ── 3. MOBILE DRAWER REFINEMENTS ─────────────────────────────── */
@media (max-width: 768px) {
  .mobile-drawer__panel {
    width: min(85vw, 340px);
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }

  /* Drawer header: keep logo from pushing close button off-screen */
  .mobile-drawer__header {
    padding: 12px 16px;
    gap: 8px;
  }
  .mobile-drawer__header .custom-logo-link,
  .mobile-drawer__header a {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  .mobile-drawer__header .custom-logo,
  .mobile-drawer__header img {
    max-height: 36px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
  }
  .mobile-drawer__close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    color: #374151;
    background: rgba(0,0,0,0.06);
  }

  /* Nav: don't stretch - push footer to bottom with margin instead */
  .mobile-nav {
    flex: 0 0 auto;
  }
  .mobile-drawer__footer {
    margin-top: auto;
  }

  .mobile-nav a,
  .mobile-nav .mobile-nav__toggle {
    min-height: 52px;
    padding: 14px 20px;
    font-size: 16px;
  }

  .mobile-nav__sub a {
    min-height: 44px;
    padding: 10px 20px 10px 36px;
    font-size: 14px;
  }

  .mobile-drawer__footer .btn {
    min-height: 52px;
    font-size: 16px;
  }
}

/* ── 4. HEADER LAYOUT (mobile) ─────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    height: 64px;
    padding-inline: 16px;
    gap: 8px;
  }

  .header-logo img,
  .header-logo .custom-logo {
    max-height: 38px;
  }

  /* Hide quote text label, keep WhatsApp icon */
  .header-action--quote { display: none; }
}

/* ── 5. SHOP: FILTER STICKY BAR + MODAL SHEET ─────────────────── */
@media (max-width: 768px) {

  /* Hide the desktop sidebar filter */
  .shop-sidebar,
  .shop-layout__sidebar,
  .woocommerce-widget-layered-nav,
  .widget_price_filter { display: none; }

  /* Full-width product grid area */
  .shop-layout,
  .shop-layout__main { width: 100%; }

  /* Sticky filter/sort bar at bottom of screen */
  .mobile-filter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-white);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    display: flex;
    gap: 10px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  }

  .mobile-filter-bar__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
  }

  .mobile-filter-bar__btn--sort {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
  }

  .mobile-filter-bar__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  /* Add bottom padding so last product card isn't hidden behind the bar */
  .shop-page { padding-bottom: calc(var(--space-3xl) + 70px); }

  /* Filter modal sheet (slides from bottom) */
  .mobile-filter-sheet {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .mobile-filter-sheet[hidden] { display: none !important; }

  .mobile-filter-sheet__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
  }

  .mobile-filter-sheet__panel {
    position: relative;
    background: var(--color-white);
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 calc(20px + env(safe-area-inset-bottom));
    animation: sheetUp 0.3s ease;
  }

  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .mobile-filter-sheet__handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 0;
  }

  .mobile-filter-sheet__handle::before {
    content: '';
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #d1d5db;
  }

  .mobile-filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    border-bottom: 1px solid var(--color-bg);
  }

  .mobile-filter-sheet__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
  }

  .mobile-filter-sheet__close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
  }

  .mobile-filter-sheet__body {
    padding: 20px;
  }

  .mobile-filter-sheet__section {
    margin-bottom: 24px;
  }

  .mobile-filter-sheet__section-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 12px;
  }

  /* Sort radio pills */
  .mobile-sort-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-sort-pill {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid rgba(0,0,0,0.15);
    background: var(--color-white);
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-sort-pill.is-active,
  .mobile-sort-pill:hover {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
  }

  /* Category filter checkboxes */
  .mobile-filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-bg);
    cursor: pointer;
  }

  .mobile-filter-option:last-child { border-bottom: none; }

  .mobile-filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
  }

  .mobile-filter-option__label {
    font-size: 15px;
    color: var(--color-dark);
    font-weight: 500;
    flex: 1;
  }

  .mobile-filter-option__count {
    font-size: 13px;
    color: var(--color-muted);
  }

  /* Apply button */
  .mobile-filter-sheet__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-bg);
    position: sticky;
    bottom: 0;
    background: var(--color-white);
  }

  .mobile-filter-sheet__apply {
    width: 100%;
    min-height: 52px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
  }

  .mobile-filter-sheet__apply:hover { background: var(--color-dark); }
}

/* ── 6. PRODUCT CARDS: 2-COLUMN GRID ──────────────────────────── */
@media (max-width: 768px) {
  /* WooCommerce default grid */
  .woocommerce ul.products,
  .products-grid,
  .wc-block-grid__products {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .woocommerce ul.products li.product,
  .products-grid__item,
  .wc-block-grid__product {
    margin: 0 !important;
    width: auto !important;
  }

  /* Product card image ratio */
  .woocommerce ul.products li.product a img {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
  }

  /* Product title smaller on mobile */
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    line-height: 1.35;
  }

  /* Price */
  .woocommerce ul.products li.product .price {
    font-size: 14px !important;
  }

  /* WhatsApp button: always visible (not hover-only) */
  .product-card__wa,
  .prod-wa-btn,
  .wc-product-wa-btn {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* On desktop these are hover-reveal; on mobile always show */
  .woocommerce ul.products li.product .button,
  .woocommerce ul.products li.product .add_to_cart_button {
    font-size: 12px !important;
    padding: 8px 10px !important;
    min-height: 36px;
  }

  /* Skyline custom product card WhatsApp button */
  .prod-card__wa {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    display: flex !important;
    margin-top: 6px;
  }
}

@media (max-width: 576px) {
  /* Single column if very narrow */
  .woocommerce ul.products,
  .products-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 12px !important;
  }
}

/* ── 7. SINGLE PRODUCT: STICKY ACTION BAR ──────────────────────── */
@media (max-width: 768px) {

  /* Stack layout on mobile */
  .sp-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Gallery no longer sticky on mobile */
  .sp-gallery { position: static; }

  /* Swipeable carousel for product gallery */
  .sp-gallery__thumbs-wrap {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .sp-gallery__thumbs-wrap::-webkit-scrollbar { display: none; }

  .sp-gallery__thumb {
    scroll-snap-align: start;
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
  }

  /* Main image swipeable (treat as horizontal scroll of images) */
  .sp-gallery__images-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 16px;
  }

  .sp-gallery__images-strip::-webkit-scrollbar { display: none; }

  .sp-gallery__images-strip .sp-gallery__zoom-wrap {
    flex: 0 0 100%;
    scroll-snap-align: start;
    border-radius: 0;
  }

  /* Single-product sticky action bar at the bottom */
  .sp-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--color-white);
    border-top: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .sp-sticky-bar .single_add_to_cart_button,
  .sp-sticky-bar .woocommerce-variation-add-to-cart .button {
    flex: 1;
    min-height: 52px !important;
    font-size: 15px !important;
    border-radius: var(--radius-md) !important;
  }

  .sp-sticky-bar .sp-wa-btn {
    min-height: 52px;
    min-width: 52px;
    width: 52px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #fff;
    text-decoration: none;
  }

  .sp-sticky-bar .sp-wa-btn svg {
    width: 24px;
    height: 24px;
  }

  /* Add bottom padding to sp-page so content doesn't hide behind sticky bar */
  .sp-page {
    padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
  }

  /* Hide the inline add-to-cart on mobile (it's in the sticky bar) */
  .sp-actions--inline {
    display: none;
  }

  /* Qty selector touch-friendly */
  .sp-qty, .quantity input,
  .woocommerce .quantity input[type="number"] {
    min-height: 44px;
    font-size: 16px !important;
    width: 64px !important;
  }
}

/* ── 8. SHOP PAGE — HEADER + LAYOUT ───────────────────────────── */
@media (max-width: 768px) {
  .shop-header { padding-top: 16px; padding-bottom: 12px; }
  .shop-header__title { font-size: clamp(22px, 6vw, 32px); }

  .shop-subcats {
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .shop-subcats::-webkit-scrollbar { display: none; }

  .shop-subcat-pill {
    flex-shrink: 0;
    padding: 8px 14px;
    min-height: 36px;
    font-size: 13px;
  }

  /* Toolbar (result count + sort) */
  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-block: 12px;
  }
}

/* ── 9. HOMEPAGE MOBILE ────────────────────────────────────────── */
@media (max-width: 768px) {

  .hero {
    min-height: 100svh;
    padding-inline: 16px;
  }

  .hero__split { flex-direction: column; gap: 32px; }
  .hero__content { max-width: 100%; padding-block: 60px 20px; }

  .hero__title { font-size: clamp(28px, 8vw, 44px); }
  .hero__kicker { font-size: 12px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; min-height: 52px; }

  /* Category grid: 2 cols on tablet, 2 cols on phone */
  .cats-grid,
  .section-categories .categories-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Why-us grid: stack */
  .why-grid { grid-template-columns: 1fr !important; }

  /* How it works: stack */
  .hiw-steps { grid-template-columns: 1fr !important; gap: 24px; }

  /* Intro strip: wrap */
  .intro-strip__inner { flex-wrap: wrap; gap: 16px; }
  .intro-strip__stat { flex: 1 0 40%; text-align: center; }

  /* Gallery strip: scroll, not overflow-clip */
  .gallery-strip__track {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* CTA visit: stack */
  .cta-visit__grid { grid-template-columns: 1fr !important; gap: 24px; }
}

/* ── 10. ABOUT PAGE MOBILE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .ab-hero { padding-block: 56px 48px; }
  .ab-story__layout { grid-template-columns: 1fr; gap: 32px; }
  .ab-mission__grid { grid-template-columns: 1fr; gap: 16px; }
  .ab-story { padding-block: 64px; }
  .ab-mission { padding-block: 64px; }
  .ab-products { padding-block: 64px; }
  .ab-serve { padding-block: 64px; }
  .ab-cta { padding-block: 64px; }
}

/* ── 11. GALLERY PAGE MOBILE ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Filter tabs: scrollable row */
  .gallery-filters {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    gap: 8px;
    scrollbar-width: none;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

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

  .gallery-filter-btn {
    flex-shrink: 0;
    min-height: 40px;
    font-size: 13px;
    padding: 8px 14px;
  }

  /* Masonry becomes 2-col */
  .gallery-grid {
    columns: 2 !important;
    column-gap: 8px;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1 !important; }
}

/* ── 12. CONTACT PAGE MOBILE ───────────────────────────────────── */
@media (max-width: 768px) {
  .contact-layout,
  .contact-grid { grid-template-columns: 1fr !important; gap: 32px; }

  /* CF7 inputs full width */
  .wpcf7-form input:not([type="submit"]),
  .wpcf7-form textarea,
  .wpcf7-form select {
    width: 100% !important;
    min-height: 44px;
    font-size: 16px !important; /* prevents iOS zoom on focus */
  }
}

/* ── 13. FOOTER MOBILE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col { padding-block: 20px; border-bottom: 1px solid #1a3a7a; }
  .footer-col:last-child { border-bottom: none; }
  .footer-bottom__inner { flex-direction: column; text-align: center; gap: 8px; }
}

/* ── 14. CART MINI-DRAWER (slide from right) ──────────────────── */
@media (max-width: 768px) {

  .mini-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 9000);
    display: flex;
    justify-content: flex-end;
  }

  .mini-cart-drawer[hidden] { display: none !important; }

  .mini-cart-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
  }

  .mini-cart-drawer__panel {
    position: relative;
    width: min(85vw, 380px);
    height: 100%;
    background: var(--color-white);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    animation: cartDrawerIn 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  }

  @keyframes cartDrawerIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }

  .mini-cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-bg);
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 1;
  }

  .mini-cart-drawer__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
  }

  .mini-cart-drawer__close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
  }

  .mini-cart-drawer__body {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
  }

  .mini-cart-drawer__footer {
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mini-cart-drawer__checkout {
    width: 100%;
    min-height: 52px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
  }

  .mini-cart-drawer__checkout:hover { background: var(--color-dark); color: var(--color-white); }

  /* Cart icon opens mini drawer instead of navigating on mobile */
  .header-action--cart { cursor: pointer; }
}

/* ── 15. HOMEPAGE — FEATURED PRODUCTS & STATS (responsive fixes) ── */

/* Stats: allow grid cells to shrink below their content width */
.stat-card { min-width: 0; }

@media (max-width: 768px) {

  /* Stats: 2-column grid, tighter padding, smaller numbers */
  .stat-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stat-card { min-width: 0; }

  .stat-card__inner {
    padding: 1.25rem 0.75rem 1rem;
  }

  .stat-card__number {
    font-size: clamp(1.25rem, 5vw, 2rem);
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
  }

  .stat-card__label {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  /* Featured products: 2-column grid instead of horizontal scroll strip */
  .fp-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    gap: 12px !important;
  }

  .fp-card {
    flex: none !important;
    max-width: none !important;
    width: 100% !important;
    scroll-snap-align: none !important;
  }

  /* Card body: tighter padding */
  .fp-card__body { padding: 10px 12px 14px; }
  .fp-card__name { font-size: 13px; line-height: 1.3; }
  .fp-card__price { font-size: 13px; }

  /* Category badge: smaller on phone */
  .fp-card__badge { font-size: 0.6rem; padding: 3px 7px; }

  /* Action buttons always visible on touch (no hover state on phones) */
  .fp-card__actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 1 !important;
    transform: none !important;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    padding: 8px;
    display: flex;
    gap: 6px;
  }

  .fp-card__btn {
    min-height: 36px;
    min-width: 36px;
    font-size: 11px;
    padding: 6px 10px;
  }
}

/* ── 15. WOOCOMMERCE GLOBAL MOBILE FIXES ──────────────────────── */
@media (max-width: 768px) {
  /* Cart and checkout pages */
  .woocommerce table.cart,
  .woocommerce-cart table.cart { width: 100%; font-size: 14px; }

  .woocommerce-cart table.cart td.product-name a { font-size: 14px; }
  .woocommerce-cart table.cart td.product-price { font-size: 14px; }

  /* Prevent WooCommerce from adding overflow-hidden that breaks the sticky bar */
  .woocommerce div.product { overflow: visible !important; }

  /* Form fields */
  .woocommerce form .form-row input.input-text,
  .woocommerce form .form-row textarea,
  .woocommerce form .form-row select {
    font-size: 16px !important; /* prevents iOS auto-zoom */
    min-height: 44px;
  }

  /* Tabs on single product */
  .woocommerce div.product .woocommerce-tabs ul.tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    gap: 0;
    padding-bottom: 0;
  }

  .woocommerce div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }

  .woocommerce div.product .woocommerce-tabs ul.tabs li {
    flex-shrink: 0;
  }

  .woocommerce div.product .woocommerce-tabs ul.tabs li a {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
}
