/* ==========================================================================
   FLIX CYCLE — mobile-ux.css
   Global mobile polish. Native app feel. iOS + Android standard.
   Loaded site-wide. Zero impact on desktop unless noted.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. iOS / Android Native Fundamentals
   -------------------------------------------------------------------------- */

/* Safe-area insets for notch devices */
body {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent text scaling on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth scrolling & momentum on iOS */
html, body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Tap highlight removal for native feel */
* {
  -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   2. Touch Targets — 44px minimum (Apple HIG / Android Material)
   -------------------------------------------------------------------------- */
.fc-btn,
.button,
input[type="submit"],
input[type="button"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce-MyAccount-navigation a,
nav a,
.fc-nav__link,
.fc-cart-icon,
.fc-wishlist-btn,
.fc-search-toggle {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   3. Typography — Mobile-first scale corrections
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  h3 { font-size: clamp(1.25rem, 5vw, 1.75rem); }
  h4 { font-size: 1.1rem; }
  p, li, span, label { font-size: 1rem; line-height: 1.6; }
  /* No sub-12px text ever */
  small, .small, figcaption, .woocommerce-breadcrumb { font-size: 0.8rem !important; }
}

/* --------------------------------------------------------------------------
   4. Global Card Consistency — 12px radius everywhere
   -------------------------------------------------------------------------- */
.fc-card,
.fc-product-card,
.fc-scanner-card,
.woocommerce-cart-form,
#order_review,
.woocommerce-order-details,
.woocommerce-customer-details,
.fc-checkout-summary-sticky,
.woocommerce-MyAccount-content,
.product,
#review_form_wrapper {
  border-radius: 12px;
}

/* --------------------------------------------------------------------------
   5. Focus Rings — Accessible & visible on all elements
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--fc-purple, #3D2B8E);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   6. Hover Lift on Cards
   -------------------------------------------------------------------------- */
.fc-product-card,
.fc-scanner-card,
.fc-account-tile {
  transition: transform 0.2s var(--fc-ease, ease), box-shadow 0.2s var(--fc-ease, ease);
}
.fc-product-card:hover,
.fc-scanner-card:hover,
.fc-account-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(23, 21, 28, 0.12);
}

/* --------------------------------------------------------------------------
   7. Toast Notification System
   -------------------------------------------------------------------------- */
#fc-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.fc-toast {
  background: var(--fc-ink, #17151C);
  color: #fff;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans, 'Inter', sans-serif);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  pointer-events: auto;
  white-space: nowrap;
  animation: fc-toast-in 0.35s var(--fc-ease, ease) forwards;
  max-width: 90vw;
}
.fc-toast.is-success { background: #14532d; }
.fc-toast.is-error   { background: #7f1d1d; }
.fc-toast.is-leaving {
  animation: fc-toast-out 0.3s ease forwards;
}
.fc-toast__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

@keyframes fc-toast-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fc-toast-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.9); }
}

/* --------------------------------------------------------------------------
   8. Flying Cart Particle Animation
   -------------------------------------------------------------------------- */
.fc-fly-particle {
  position: fixed;
  width: 14px;
  height: 14px;
  background: var(--fc-purple, #3D2B8E);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  animation: fc-fly-to-cart 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes fc-fly-to-cart {
  0%   { transform: scale(1); opacity: 1; }
  60%  { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(0.1); opacity: 0; }
}

/* --------------------------------------------------------------------------
   9. Skeleton Loaders
   -------------------------------------------------------------------------- */
.fc-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes fc-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   10. Sticky Add-to-Cart Bar (Product Page — appears on scroll)
   -------------------------------------------------------------------------- */
.fc-sticky-atc-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(23, 21, 28, 0.1);
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s var(--fc-ease, ease);
}
.fc-sticky-atc-bar.is-visible {
  transform: translateY(0);
}
.fc-sticky-atc-bar__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.fc-sticky-atc-bar__info {
  flex: 1;
  min-width: 0;
}
.fc-sticky-atc-bar__name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fc-ink, #17151C);
}
.fc-sticky-atc-bar__price {
  font-size: 0.85rem;
  color: var(--fc-ink-50, rgba(23,21,28,0.5));
}
.fc-sticky-atc-bar__btn {
  background: var(--fc-purple, #3D2B8E);
  color: #fff;
  border-radius: 99px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.fc-sticky-atc-bar__btn:hover { background: var(--fc-purple-dark, #2A1E6A); }

@media (min-width: 900px) {
  /* On desktop the sticky bar is less needed but stays for UX continuity */
  .fc-sticky-atc-bar {
    max-width: 800px;
    left: 50%;
    right: auto;
    transform: translate(-50%, 100%);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.1);
  }
  .fc-sticky-atc-bar.is-visible {
    transform: translate(-50%, 0);
  }
}

/* --- 12. Quantity Buttons — Premium animated +/-
   -------------------------------------------------------------------------- */
.fc-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--fc-ink-20, rgba(23,21,28,0.2));
  border-radius: 99px;
  overflow: hidden;
  height: 44px;
}
.fc-qty__btn {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  color: var(--fc-ink, #17151C);
}
.fc-qty__btn:active {
  transform: scale(0.85);
  background: var(--fc-ink-08, rgba(23,21,28,0.08));
}
.fc-qty__input {
  width: 48px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  -moz-appearance: textfield;
}
.fc-qty__input::-webkit-outer-spin-button,
.fc-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* --------------------------------------------------------------------------
   13. Glassmorphism Header on Scroll
   -------------------------------------------------------------------------- */
.fc-header.is-scrolled {
  background: rgba(250, 248, 245, 0.9) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 1px 0 rgba(23,21,28,0.08) !important;
}

/* --------------------------------------------------------------------------
   14. Premium Form Inputs (global override of WC defaults)
   -------------------------------------------------------------------------- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea,
.woocommerce .woocommerce-Input,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce input[type="password"] {
  height: 48px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 1rem;
  background: #fff;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce input[type="text"]:focus,
.woocommerce input[type="email"]:focus,
.woocommerce input[type="tel"]:focus,
.woocommerce input[type="number"]:focus,
.woocommerce input[type="password"]:focus {
  border-color: var(--fc-purple, #3D2B8E);
  box-shadow: 0 0 0 3px rgba(61, 43, 142, 0.12);
  outline: none;
}
.woocommerce form .form-row label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}
.woocommerce form .form-row textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 16px;
}

/* --------------------------------------------------------------------------
   15. Buttons — Mobile CTA overrides
   -------------------------------------------------------------------------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce #content input.button,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button {
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 13px 24px;
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  transform: scale(1.02);
}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background: var(--fc-purple, #3D2B8E);
  color: #fff;
}
.woocommerce a.button.alt:hover {
  background: var(--fc-purple-dark, #2A1E6A);
}

/* --------------------------------------------------------------------------
   16. 404 Page — Premium redesign
   -------------------------------------------------------------------------- */
.error404 .fc-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 40px 20px;
}
.fc-404-content {
  max-width: 520px;
}
.fc-404-content__code {
  font-family: var(--font-serif, serif);
  font-size: clamp(6rem, 20vw, 12rem);
  line-height: 1;
  color: var(--fc-ink-08, rgba(23,21,28,0.08));
  display: block;
  margin-bottom: -1rem;
}
.fc-404-content h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 16px;
}
.fc-404-content p {
  color: var(--fc-ink-50, rgba(23,21,28,0.5));
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.fc-404-content__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   17. Search Page — Premium empty state
   -------------------------------------------------------------------------- */
.search-no-results .fc-main,
.woocommerce-no-products-found {
  text-align: center;
  padding: 80px 20px;
}
.fc-no-results__icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.3;
}
.fc-no-results h2 {
  margin-bottom: 12px;
}
.fc-no-results p {
  color: var(--fc-ink-50, rgba(23,21,28,0.5));
  margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   18. WooCommerce Notice Polish
   -------------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: 10px;
  border-left-width: 4px;
  padding: 14px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
}
.woocommerce-message::before { content: '✓'; color: #22c55e; font-size: 1.1rem; flex-shrink: 0; }
.woocommerce-info::before    { content: 'ℹ'; color: #3b82f6; font-size: 1.1rem; flex-shrink: 0; }
.woocommerce-error::before   { content: '!'; color: #ef4444; font-size: 1.1rem; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   19. Delivery Estimate Badge (injected via JS on product pages)
   -------------------------------------------------------------------------- */
.fc-delivery-estimate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #166534;
  margin-top: 12px;
}
.fc-delivery-estimate svg { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   20. Loading Spinners on Buttons
   -------------------------------------------------------------------------- */
.fc-btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.fc-btn-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fc-spin 0.7s linear infinite;
}
@keyframes fc-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   21. Responsive Table — WooCommerce tables on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .shop_table thead { display: none; }
  .shop_table tbody tr {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid var(--fc-ink-08, rgba(23,21,28,0.08));
  }
  .shop_table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border: none;
    font-size: 0.9rem;
  }
  .shop_table tbody td::before {
    content: attr(data-title);
    font-weight: 600;
    color: var(--fc-ink-50, rgba(23,21,28,0.5));
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .woocommerce-cart-form .shop_table tbody td.product-remove { justify-content: flex-end; }
  .woocommerce-cart-form .shop_table tbody td.product-remove::before { display: none; }
}

/* --------------------------------------------------------------------------
   22. Undo Remove Snackbar
   -------------------------------------------------------------------------- */
.fc-undo-snack {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--fc-ink, #17151C);
  color: #fff;
  border-radius: 99px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 99996;
  opacity: 0;
  transition: all 0.3s var(--fc-ease, ease);
  pointer-events: none;
  white-space: nowrap;
}
.fc-undo-snack.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}
.fc-undo-snack__btn {
  font-weight: 700;
  color: var(--fc-gold, #C6A87C);
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}

/* --------------------------------------------------------------------------
   23. Order Status Colour System
   -------------------------------------------------------------------------- */
.fc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fc-status-badge--pending    { background: #fef3c7; color: #92400e; }
.fc-status-badge--processing { background: #dbeafe; color: #1e40af; }
.fc-status-badge--shipped    { background: #e0e7ff; color: #3730a3; }
.fc-status-badge--delivered  { background: #dcfce7; color: #166534; }
.fc-status-badge--cancelled  { background: #fee2e2; color: #991b1b; }
.fc-status-badge--on-hold    { background: #f3f4f6; color: #374151; }
.fc-status-badge--refunded   { background: #fce7f3; color: #831843; }


/* ==========================================================================
   FLIX CYCLE - iOS/ANDROID APP FEEL OVERRIDES
   ========================================================================== */
/* Smooth Checkout & My Account Forms */
.woocommerce form .form-row {
    margin-bottom: 20px;
}
.woocommerce form .form-row label {
    display: none !important; /* Hide labels for app-like placeholder focus */
}
.woocommerce form .form-row.create-account label {
    display: inline-block !important; /* Keep the checkbox label visible */
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea,
.woocommerce .woocommerce-Input,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce input[type="password"] {
    background: #f7f7f7 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 12px !important;
    height: 54px !important; /* Larger touch target */
    padding: 0 16px !important;
    font-size: 16px !important; /* Prevent iOS zoom */
    color: #111 !important;
    box-shadow: none !important;
    transition: all 0.25s ease !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce input[type="text"]:focus,
.woocommerce input[type="email"]:focus,
.woocommerce input[type="tel"]:focus,
.woocommerce input[type="number"]:focus,
.woocommerce input[type="password"]:focus {
    background: #ffffff !important;
    border-color: #111 !important;
    box-shadow: 0 0 0 1px #111 !important;
}
.woocommerce form .form-row textarea {
    height: auto !important;
    min-height: 120px !important;
    padding: 16px !important;
}

/* My Account "Save Option Easily" - Better Buttons */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    flex-shrink: 0;
    list-style: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    background: #f7f7f7;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Address Box in My Account */
.woocommerce-Address {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ebebeb;
}
.woocommerce-Address-title h3 {
    margin-top: 0;
    font-size: 18px;
}
.woocommerce-Address .edit {
    display: inline-block;
    margin-top: 12px;
    background: #111;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}


.woocommerce form .form-row.terms label, .woocommerce-form__label-for-checkbox { display: inline-block !important; }

/* ── WHATSAPP FAB — fix overlap on mobile shop page ── */
@media (max-width: 768px) {
    /* On shop/archive pages, move WA button so it doesn't block product cards */
    .post-type-archive-product .fc-whatsapp-fab,
    .woocommerce-shop .fc-whatsapp-fab,
    .tax-product_cat .fc-whatsapp-fab {
        display: none !important; /* Hide on shop to prevent blocking product grid */
    }
    /* Also hide on search results */
    .search-results .fc-whatsapp-fab {
        display: none !important;
    }
}

/* ── MOBILE PRODUCT GRID — prevent right card from being cut off ── */
@media (max-width: 768px) {
    /* Removed harmful overflow: visible override */
    .woocommerce ul.products li.product,
    .fc-product-card {
        width: calc(50% - 8px) !important;
        margin: 0 0 16px 0 !important;
    }
}

/* --- MOBILE PRODUCT CARDS OPTIMIZATION --- */
.products.columns-2 .product { width: calc(50% - 6px) !important; margin: 0 12px 16px 0 !important; padding: 8px !important; border-radius: 12px !important; box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important; border: 1px solid #f0f0f0 !important; display: flex !important; flex-direction: column !important; }
.products.columns-2 .product:nth-child(2n) { margin-right: 0 !important; }
.products .product .woocommerce-LoopProduct-link { flex-grow: 1; display: flex; flex-direction: column; }
.products .product img { border-radius: 8px !important; margin-bottom: 8px !important; aspect-ratio: 1/1 !important; object-fit: cover !important; }
.products .product .woocommerce-loop-product__title { font-size: 13px !important; line-height: 1.3 !important; font-weight: 600 !important; margin-bottom: 4px !important; }
.products .product .price { font-size: 14px !important; font-weight: 700 !important; margin-bottom: 10px !important; }
.products .product .button { font-size: 12px !important; padding: 8px !important; margin-top: auto !important; height: auto !important; min-height: 36px !important; border-radius: 6px !important; }
.yith-wcwl-add-to-wishlist { position: absolute !important; top: 12px !important; right: 12px !important; margin: 0 !important; }
.yith-wcwl-add-to-wishlist span.feedback { display: none !important; }
.yith-wcwl-add-to-wishlist a span { display: none !important; } /* Hide text, keep icon */
.yith-wcwl-add-button > a i { margin: 0 !important; font-size: 18px !important; color: #fff !important; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
