/* Mobile component owner. Desktop (1024px+) keeps the approved UI layout.
   Keep the breakpoint in sync with fc-mobile.js; no user-agent/cache variants. */
.fc-mobile-details-toggle,
.fc-mobile-coupon-toggle,
.fc-mobile-express-status,
.fc-mobile-cart-confirmation,
.fc-collection-thumbnail { display: none; }

@media (max-width: 1023px) {
  body {
    --fc-mobile-field: #302340;
    --fc-mobile-border: #89779e;
    --fc-mobile-muted: #c8bfd6;
  }
  /* Homepage: merchandise is visible before the first scroll. */
  .fc-home .fc-shell { width: calc(100% - 28px); }
  .fc-home .fc-hero { min-height: 0; padding: 22px 0 24px; }
  .fc-home .fc-hero-grid { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
  .fc-home .fc-copy { display: contents; }
  .fc-home .fc-kicker { order: 1; margin: 0; font-size: 10px; letter-spacing: .12em; }
  .fc-home .fc-hero h1 { order: 2; margin: 0; font-size: clamp(28px, 7.8vw, 38px); line-height: 1.03; letter-spacing: -.025em; }
  .fc-home .fc-hero .fc-copy > p { display: none; }
  .fc-home .fc-hero-visual { order: 3; display: block; min-height: 0; width: 100%; max-width: 520px; align-self: center; }
  .fc-home .fc-hero-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 0; }
  .fc-home .fc-hero-media::before { display: none; }
  .fc-home .fc-hero-media-card { aspect-ratio: 1.12; min-height: 0; border-radius: 12px; transform: none; }
  .fc-home .fc-hero-media-card:nth-child(n+3) { display: none; }
  .fc-home .fc-hero-media-img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; transform: none; }
  .fc-home .fc-hero-media-card span { left: 10px; bottom: 10px; padding: 6px 9px; font-size: 11px; }
  .fc-home .fc-buttons { order: 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
  .fc-home .fc-buttons .fc-btn { width: 100%; min-height: 44px; padding: 10px 8px; font-size: 12px; }
  .fc-home .fc-buttons .fc-btn:first-child { grid-column: 1 / -1; }
  .fc-home .fc-trust { padding: 0; }
  .fc-home .fc-trust-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .fc-home .fc-trust-item { display: block; padding: 12px 8px; border: 0; min-width: 0; }
  .fc-home .fc-trust-item:nth-child(n+3) { display: none; }
  .fc-home .fc-trust-item .fc-icon { display: none; }
  .fc-home .fc-trust-item strong { font-size: 12px; margin: 0 0 3px; }
  .fc-home .fc-trust-item p { font-size: 11px; margin: 0; }
  .fc-home .fc-section { padding: 32px 0; }
  .fc-home .fc-section-head { margin-bottom: 16px; gap: 12px; }
  .fc-home .fc-section-head h2 { font-size: 25px; line-height: 1.12; margin: 0; }
  .fc-home .fc-section-head > div > span { display: none; }
  .fc-home .fc-section-head p { display: none; }
  .fc-home .fc-section-head > div { min-width: 0; }

  /* One card rhythm across homepage, archives and related products. */
  .fc-home .fc-product-grid,
  body.woocommerce ul.products,
  body.woocommerce .related ul.products,
  .fc-archive-main ul.products {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 12px !important; align-items: stretch;
  }
  .fc-home .fc-product-card,
  body.woocommerce ul.products li.product { min-width: 0; border-radius: 12px; }
  .fc-home .fc-product-body { padding: 12px 10px 14px; gap: 0; }
  .fc-home .fc-product-body h3,
  body:is(.woocommerce-archive,.single-product) :is(.fc-archive-products,.related.products,.upsells.products) ul.products li.product :is(.woocommerce-loop-product__title,.entry-title) {
    min-height: 0; margin: 0 0 8px; font-size: 14px; line-height: 1.35; letter-spacing: 0;
    overflow-wrap: anywhere; font-weight: 650;
  }
  .fc-home .fc-product-body h3 a,
  body.woocommerce ul.products li.product .woocommerce-loop-product__title a { color: #f8f5fc; }
  .fc-home .fc-product-price,
  body:is(.woocommerce-archive,.single-product) :is(.fc-archive-products,.related.products,.upsells.products) ul.products li.product .price { display: block; margin: auto 0 0; padding: 0; min-height: 0; font-size: 14px; line-height: 1.4; font-weight: 750; }
  .fc-home .fc-product-cta,
  body.woocommerce ul.products li.product .ct-woo-card-actions { display: none; }
  body.woocommerce ul.products li.product { padding-bottom: 14px; }
  body:is(.woocommerce-archive,.single-product) :is(.fc-archive-products,.related.products,.upsells.products) ul.products li.product :is(.woocommerce-loop-product__title,.entry-title) { padding: 12px 10px 0; }
  body:is(.woocommerce-archive,.single-product) :is(.fc-archive-products,.related.products,.upsells.products) ul.products li.product > .price { margin-inline: 10px; }
  body.single-product .related.products { padding: 16px; margin-top: 28px; border-radius: 12px; }
  body.single-product .related.products > h2 { margin-bottom: 16px; font-size: 24px; line-height: 1.2; }
  body.single-product .related.products ul.products > li:nth-child(n+7) { display: none; }

  /* Product: a compact buying block and useful details immediately after it. */
  body.single-product .ct-container-full[data-vertical-spacing] { padding-top: 20px; padding-bottom: 32px; }
  body.single-product div.product .summary { padding: 16px; }
  body.single-product div.product .product_title { font-size: 28px; line-height: 1.15; }
  body.single-product .entry-summary .ct-product-divider { margin: 16px 0; }
  body.single-product div.product form.cart { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
  body.single-product div.product form.cart > .variations,
  body.single-product div.product form.cart > .single_variation_wrap,
  body.single-product div.product form.cart > .alg-product-input-fields-table { flex: 0 0 100%; min-width: 0; margin: 0; }
  body.single-product div.product form.cart .variations { margin-bottom: 0; }
  body.single-product div.product form.cart .variations tr { margin-bottom: 0; }
  body.single-product div.product form.cart .variations td { padding-bottom: 0; }
  body.single-product div.product form.cart .variations label { font-size: 14px; }
  body.single-product div.product form.cart .variations label::after { display: none; }
  body.single-product div.product form.cart select,
  body.single-product div.product form.cart input[type="text"],
  body.single-product div.product form.cart textarea {
    min-height: 48px; font-size: 16px; color: #fff;
    background-color: var(--fc-mobile-field); border: 1px solid var(--fc-mobile-border); border-radius: 8px;
  }
  body.single-product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
  body.single-product div.product form.cart .quantity,
  body.woocommerce-cart .product-mobile-actions .quantity {
    flex: 0 0 132px; width: 132px; min-width: 132px; height: 48px; --quantity-height: 48px;
    grid-template-columns: 44px minmax(0,1fr) 44px; margin: 0; background: var(--fc-mobile-field); border-color: var(--fc-mobile-border);
  }
  body.single-product div.product form.cart .quantity .ct-increase,
  body.single-product div.product form.cart .quantity .ct-decrease,
  body.woocommerce-cart .product-mobile-actions .quantity .ct-increase,
  body.woocommerce-cart .product-mobile-actions .quantity .ct-decrease { width: 44px !important; height: 48px !important; }
  body.single-product div.product .single_add_to_cart_button { flex: 1 1 120px; width: auto; min-height: 48px; margin: 0; padding: 12px; font-size: 13px; transform: none; }
  body.single-product div.product .added_to_cart { flex: 0 0 100%; width: 100%; margin: 0; }
  body.single-product form.cart .alg-product-input-fields-table:empty { display: none; }
  body.single-product .fc-product-trust { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 16px 0 0; padding: 0; }
  body.single-product .fc-product-trust > div { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 0; font-size: 11px; gap: 5px; }
  body.single-product .fc-product-trust .fc-icon { width: 14px; height: 14px; }
  body.single-product .fc-product-buy-notes { display: none; }
  body.single-product .woocommerce-tabs { margin-top: 20px; padding: 18px; }
  body.single-product .woocommerce-tabs[data-fc-mobile-details] ul.tabs { display: none !important; }
  body.single-product .woocommerce-tabs[data-fc-mobile-details] #tab-description { display: block !important; }
  body.single-product .woocommerce-tabs[data-fc-mobile-details] #tab-additional_information { display: none !important; }
  body.single-product .woocommerce-tabs.fc-details-open #tab-additional_information { display: block !important; padding-top: 16px; }
  .fc-mobile-details-toggle, .fc-mobile-coupon-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px;
    padding: 12px 0; border: 0; border-top: 1px solid #514160; border-radius: 0; background: none;
    box-shadow: none; color: #fff; font-size: 15px; font-weight: 650; text-align: left; text-transform: none;
  }
  .fc-mobile-details-toggle::after, .fc-mobile-coupon-toggle::after { content: '+'; margin-left: 12px; font-size: 22px; }
  .fc-mobile-details-toggle[aria-expanded="true"]::after, .fc-mobile-coupon-toggle[aria-expanded="true"]::after { content: '−'; }
  body.single-product .fc-product-collection-cta { width: calc(100% - 28px); padding: 16px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; border-radius: 12px; margin-top: 24px; }
  .fc-collection-thumbnail { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
  body.single-product .fc-product-collection-cta > div { min-width: 0; }
  body.single-product .fc-product-collection-cta span { font-size: 9px; line-height: 1.4; }
  body.single-product .fc-product-collection-cta strong { font-size: 22px; }
  body.single-product .fc-product-collection-cta > a { grid-column: 1 / -1; width: 100%; min-width: 0; white-space: normal; text-align: center; font-size: 11px; }
  body.single-product .fc-footer-top,
  body.woocommerce-checkout .fc-footer-top { display: none; }

  /* Cart: intrinsic table widths must not dictate the viewport width. */
  body.woocommerce-cart .ct-container-full[data-vertical-spacing],
  body.woocommerce-checkout .ct-container-full[data-vertical-spacing] { padding-top: 24px; }
  body.woocommerce-cart .hero-section,
  body.woocommerce-checkout .hero-section { margin-bottom: 24px; }
  body.woocommerce-cart .entry-content { width: calc(100% - 28px); }
  body.woocommerce-cart .woocommerce-cart-form,
  body.woocommerce-cart .woocommerce-cart-form table,
  body.woocommerce-cart .woocommerce-cart-form tbody { width: 100%; min-width: 0; max-width: 100%; display: block; }
  body.woocommerce-cart .woocommerce-cart-form { padding: 16px; }
  body.woocommerce-cart .woocommerce-cart-form thead { display: none; }
  body.woocommerce-cart .woocommerce-cart-form tr.cart_item { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; padding: 0 0 18px; }
  body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody tr > td { min-width: 0; max-width: 100%; border: 0; padding: 0 !important; }
  body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail { width: 64px; display: block; }
  body.woocommerce-cart .woocommerce-cart-form td.product-name { width: auto; display: block; font-size: 15px; }
  body.woocommerce-cart .woocommerce-cart-form td.product-name > a { display: block; overflow-wrap: anywhere; line-height: 1.4; margin-bottom: 12px; }
  body.woocommerce-cart .woocommerce-cart-form .product-mobile-actions { display: grid !important; grid-template-columns: 132px minmax(44px,1fr); gap: 8px; align-items: center; }
  body.woocommerce-cart .product-mobile-actions .quantity { grid-column: 1; grid-row: 1; }
  body.woocommerce-cart .product-mobile-actions > .amount { grid-column: 1 / -1; }
  body.woocommerce-cart .product-mobile-actions > .amount::after { content: ' each'; font-size: 12px; font-weight: 400; color: var(--fc-mobile-muted); }
  body.woocommerce-cart .product-mobile-actions .remove { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 0 auto; }
  body.woocommerce-cart .product-mobile-actions .ct-product-multiply-symbol { display: none; }
  body.woocommerce-cart .woocommerce-cart-form tr.cart_item > td.product-quantity,
  body.woocommerce-cart .woocommerce-cart-form tr.cart_item > td.product-subtotal,
  body.woocommerce-cart .woocommerce-cart-form tr.cart_item > td.product-remove,
  body.woocommerce-cart .woocommerce-cart-form td.product-name > .price { display: none; }
  body.woocommerce-cart .woocommerce-cart-form tbody > tr:not(.cart_item),
  body.woocommerce-cart .woocommerce-cart-form td.actions { display: block; width: 100%; }
  body.woocommerce-cart .woocommerce-cart-form .coupon { width: 100%; display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; float: none; padding: 0 0 12px; }
  body.woocommerce-cart .woocommerce-cart-form .coupon.fc-coupon-closed { display: none; }
  body.woocommerce-cart .woocommerce-cart-form .coupon input { width: 100% !important; min-width: 0; margin: 0; min-height: 48px; font-size: 16px; border: 1px solid var(--fc-mobile-border); background: var(--fc-mobile-field); border-radius: 8px; }
  body.woocommerce-cart .woocommerce-cart-form .button { width: 100%; min-width: 0; margin: 0; min-height: 48px; }
  body.woocommerce-cart .woocommerce-cart-form button[name="update_cart"]:disabled { opacity: .5; }
  body.woocommerce-cart .cart_totals { padding: 16px; }
  body.woocommerce-cart a.checkout-button { width: 100%; min-height: 50px; }

  /* Checkout: one outer surface; no stacked shells squeezing secure fields. */
  body.woocommerce-checkout form.checkout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.woocommerce-checkout .entry-content { width: calc(100% - 28px); }
  body.woocommerce-checkout .ct-customer-details,
  body.woocommerce-checkout .ct-order-review { width: 100%; min-width: 0; }
  body.woocommerce-checkout .woocommerce-billing-fields,
  body.woocommerce-checkout .woocommerce-shipping-fields,
  body.woocommerce-checkout .woocommerce-additional-fields { padding: 16px; border-radius: 12px; }
  body.woocommerce-checkout .woocommerce-billing-fields h3,
  body.woocommerce-checkout #order_review_heading { font-size: 22px; margin-bottom: 18px; }
  body.woocommerce-checkout form .form-row { padding: 0; margin-bottom: 16px; }
  body.woocommerce-checkout .form-row-first,
  body.woocommerce-checkout .form-row-last { float: none; width: 100%; }
  body.woocommerce-checkout form label { font-size: 14px; font-weight: 600; margin-bottom: 7px; }
  body.woocommerce-checkout form .input-text,
  body.woocommerce-checkout form select,
  body.woocommerce-checkout .select2-container--default .select2-selection--single {
    min-height: 48px; font-size: 16px; color: #fff; background-color: var(--fc-mobile-field) !important;
    border: 1px solid var(--fc-mobile-border) !important; border-radius: 8px; box-shadow: none;
  }
  body.woocommerce-checkout form .input-text::placeholder { color: #c9bfd5; opacity: 1; }
  body.woocommerce-checkout .select2-container .select2-selection__rendered { color: #fff; line-height: 46px; }
  body.woocommerce-checkout .select2-container .select2-selection__arrow { height: 46px; }
  body.woocommerce-checkout .ct-order-review { padding: 16px !important; border-radius: 12px; }
  body.woocommerce-checkout .ct-order-review #order_review,
  body.woocommerce-checkout #payment,
  body.woocommerce-checkout #payment ul.payment_methods,
  body.woocommerce-checkout #payment ul.payment_methods > li,
  body.woocommerce-checkout #payment div.payment_box,
  body.woocommerce-checkout #payment fieldset,
  body.woocommerce-checkout #payment .place-order {
    width: 100%; min-width: 0; max-width: 100%; padding: 0; margin: 0;
    border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none;
  }
  body.woocommerce-checkout #payment { padding-top: 18px; }
  body.woocommerce-checkout #payment ul.payment_methods > li { margin-bottom: 16px; }
  body.woocommerce-checkout #payment .payment_box::before { display: none; }
  body.woocommerce-checkout #payment .wc_payment_method > label { display: block; font-size: 18px; margin-bottom: 14px; }
  body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table td { padding: 12px 0 !important; overflow-wrap: anywhere; }
  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-name { padding-right: 12px; }
  body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total { text-align: right; }
  body.woocommerce-checkout .woocommerce-privacy-policy-text { font-size: 12px; line-height: 1.6; margin: 16px 0; }
  body.woocommerce-checkout #place_order { width: 100%; min-height: 50px; margin-top: 8px; }
  body.woocommerce-checkout .fc-checkout-payment-badges { display: none; }
  body.woocommerce-checkout #wc-stripe-express-checkout-element { padding: 16px !important; border-radius: 12px; gap: 10px !important; }
  body.single-product #wc-stripe-express-checkout-element { flex: 0 0 100%; margin: 8px 0 0 !important; padding: 12px 0; }
  body.single-product #wc-stripe-express-checkout-element[style*="display:none"],
  body.single-product #wc-stripe-express-checkout-element[style*="display: none"],
  body.woocommerce-checkout #wc-stripe-express-checkout-element[style*="display:none"],
  body.woocommerce-checkout #wc-stripe-express-checkout-element[style*="display: none"] { display: none !important; }
  .fc-mobile-express-status { display: block; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #514160; border-radius: 10px; color: var(--fc-mobile-muted); font-size: 13px; line-height: 1.5; }
  .fc-mobile-express-status[hidden] { display: none; }

  /* Confirmation is non-modal; browsing and assistive navigation remain available. */
  .fc-mobile-cart-confirmation {
    display: block; position: fixed; z-index: 100000; bottom: 12px; bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px; right: 12px; max-width: 520px; margin-inline: auto; padding: 20px 16px 16px;
    border: 1px solid #6f5a87; border-radius: 16px; background: #20142e; color: #fff; box-shadow: 0 12px 70px #000b;
  }
  .fc-mobile-cart-confirmation h2 { color: #fff; font-size: 20px; margin: 0 36px 8px 0; line-height: 1.2; }
  .fc-mobile-cart-confirmation .fc-mobile-cart-item { margin: 0 24px 16px 0; font-size: 13px; line-height: 1.5; color: #d6cce2; }
  .fc-mobile-cart-dismiss { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: #fff; font-size: 28px; }
  .fc-mobile-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .fc-mobile-cart-actions a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px; border: 1px solid #89779e; border-radius: 9px; color: #fff; font-size: 14px; font-weight: 750; text-decoration: none; }
  .fc-mobile-cart-actions .fc-mobile-checkout { background: #13dbff; border-color: #13dbff; color: #07121b; }
  body :is(.fc-mobile-details-toggle,.fc-mobile-coupon-toggle,.fc-mobile-cart-actions a,.fc-mobile-cart-dismiss):focus-visible,
  body.single-product form.cart :is(select,input,textarea):focus-visible,
  body.woocommerce-checkout form :is(input,select,textarea):focus-visible { outline: 2px solid #13dbff; outline-offset: 3px; }
}
@media (max-width: 359px) {
  body.woocommerce-cart .woocommerce-cart-form tr.cart_item { grid-template-columns: 48px minmax(0,1fr); gap: 8px; }
  body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail { width: 48px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .fc-home .fc-product-grid, body.woocommerce ul.products, body.woocommerce .related ul.products, .fc-archive-main ul.products { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
