/* D0 E-SHOP Theme mobile corrections.
   Loaded after the main theme stylesheet.
   Scope: product page news/guides + WooCommerce cart mobile layout only. */

.fpv-mobile-fixed-cart-actions {
  display: none !important;
}

@media (max-width: 782px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  html {
    scrollbar-gutter: auto !important;
  }

  body,
  .site,
  #page,
  .site-main,
  .woocommerce-main,
  .woocommerce,
  .woocommerce-page,
  .entry-content,
  .section-inner {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.single-product *,
  body.woocommerce-cart * {
    box-sizing: border-box !important;
  }

  body.single-product .woocommerce-main,
  body.single-product .site-main {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: clip !important;
  }

  body.single-product .woocommerce div.product.fpvdronas-single-product-layout,
  body.single-product .fpvdronas-single-product-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: clip !important;
  }

  body.single-product .fpvdronas-single-product-top,
  body.single-product .woocommerce-product-gallery,
  body.single-product div.images,
  body.single-product div.summary,
  body.single-product .summary.entry-summary,
  body.single-product .woocommerce-tabs,
  body.single-product .related,
  body.single-product .upsells,
  body.single-product .fpv-product-widget-area {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: clip !important;
  }

  body.single-product .fpvdronas-product-news {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 30px 0 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
  }

  body.single-product .fpvdronas-product-news .section-header {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    overflow-wrap: anywhere !important;
  }

  body.single-product .fpvdronas-product-news .section-title,
  body.single-product .fpvdronas-product-news h2 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
    font-size: clamp(22px, 7vw, 28px) !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.single-product .fpvdronas-product-news .section-sub {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
  }

  body.single-product .fpv-news-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
  }

  body.single-product .fpv-news-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  body.single-product .fpv-news-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 150px !important;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden !important;
  }

  body.single-product .fpv-news-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body.single-product .fpv-news-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    overflow-wrap: anywhere !important;
  }

  body.single-product .fpv-news-body h3,
  body.single-product .fpv-news-body h3 a,
  body.single-product .fpv-news-body p {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.woocommerce-cart {
    overflow-x: hidden !important;
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.woocommerce-cart .woocommerce-main,
  body.woocommerce-cart .site-main,
  body.woocommerce-cart .fpv-woo-page-content,
  body.woocommerce-cart .fpv-woo-service-inner,
  body.woocommerce-cart .fpv-woo-content-shell,
  body.woocommerce-cart .woocommerce,
  body.woocommerce-cart .fpv-cart-page,
  body.woocommerce-cart .fpv-cart-layout,
  body.woocommerce-cart .woocommerce-cart-form,
  body.woocommerce-cart .cart-collaterals,
  body.woocommerce-cart .cart_totals {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: clip !important;
  }

  body.woocommerce-cart .fpv-woo-service-inner,
  body.woocommerce-cart .fpv-cart-page {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.woocommerce-cart .fpv-cart-table-card,
  body.woocommerce-cart .cart_totals {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 10px !important;
    border-radius: 12px !important;
    overflow-x: clip !important;
  }

  body.woocommerce-cart .fpv-cart-items {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.woocommerce-cart .fpv-cart-item {
    display: grid !important;
    grid-template-columns: 70px minmax(0, 1fr) !important;
    grid-template-areas:
      "image info"
      "image controls" !important;
    column-gap: 10px !important;
    row-gap: 8px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 100px !important;
    padding: 10px !important;
    overflow: hidden !important;
  }

  body.woocommerce-cart .fpv-cart-item-image {
    grid-area: image !important;
  }

  body.woocommerce-cart .fpv-cart-item-image,
  body.woocommerce-cart .fpv-cart-item-image a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 70px !important;
    max-width: 70px !important;
    height: 70px !important;
  }

  body.woocommerce-cart .fpv-cart-item-image img {
    display: block !important;
    width: 66px !important;
    max-width: 66px !important;
    height: 66px !important;
    object-fit: contain !important;
  }

  body.woocommerce-cart .fpv-cart-item-info {
    grid-area: info !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.woocommerce-cart .fpv-cart-item-name {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 4px !important;
    font-size: 13px !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.woocommerce-cart .fpv-cart-item-price {
    display: block !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls {
    grid-area: controls !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls .quantity,
  body.woocommerce-cart .fpv-cart-item-controls .fpv-qty-enhanced {
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: 28px 38px 28px !important;
    width: 94px !important;
    max-width: 94px !important;
    height: 34px !important;
    overflow: hidden !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls .qty {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls .fpv-qty-btn,
  body.woocommerce-cart .fpv-cart-item-controls .quantity button,
  body.woocommerce-cart .fpv-cart-item-controls .quantity .minus,
  body.woocommerce-cart .fpv-cart-item-controls .quantity .plus {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
  }

  body.woocommerce-cart .fpv-cart-item-remove {
    flex: 0 0 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  body.woocommerce-cart .fpv-cart-coupon,
  body.woocommerce-cart .fpv-mobile-cart-subtotal,
  body.woocommerce-cart .cart_totals table,
  body.woocommerce-cart .cart_totals tbody,
  body.woocommerce-cart .cart_totals tr,
  body.woocommerce-cart .cart_totals th,
  body.woocommerce-cart .cart_totals td {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }

  body.woocommerce-cart .fpv-cart-coupon-row,
  body.woocommerce-cart .fpv-cart-actions-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.woocommerce-cart .fpv-cart-coupon input,
  body.woocommerce-cart .fpv-cart-coupon button,
  body.woocommerce-cart .fpv-cart-actions-row button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
    display: none !important;
  }

  body.woocommerce-cart .fpv-mobile-fixed-cart-actions {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 100000 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(241, 241, 241, 0.98) !important;
    border-top: 1px solid var(--c-border, #e0e0e0) !important;
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.14) !important;
  }

  body.woocommerce-cart .fpv-mobile-cart-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 7px 6px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--c-accent, #ff6a00) !important;
    color: #fff !important;
    font-family: var(--font-display, sans-serif) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: 0.15px !important;
    text-align: center !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: normal !important;
  }
}

@media (max-width: 374px) {
  body.single-product .woocommerce div.product.fpvdronas-single-product-layout,
  body.single-product .fpvdronas-single-product-layout {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.woocommerce-cart .fpv-woo-service-inner,
  body.woocommerce-cart .fpv-cart-page {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body.woocommerce-cart .fpv-cart-item {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    column-gap: 8px !important;
    padding: 9px !important;
  }

  body.woocommerce-cart .fpv-cart-item-image,
  body.woocommerce-cart .fpv-cart-item-image a {
    width: 62px !important;
    max-width: 62px !important;
    height: 62px !important;
  }

  body.woocommerce-cart .fpv-cart-item-image img {
    width: 58px !important;
    max-width: 58px !important;
    height: 58px !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls .quantity,
  body.woocommerce-cart .fpv-cart-item-controls .fpv-qty-enhanced {
    grid-template-columns: 26px 34px 26px !important;
    width: 86px !important;
    max-width: 86px !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls .qty {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
  }

  body.woocommerce-cart .fpv-cart-item-controls .fpv-qty-btn,
  body.woocommerce-cart .fpv-cart-item-controls .quantity button,
  body.woocommerce-cart .fpv-cart-item-controls .quantity .minus,
  body.woocommerce-cart .fpv-cart-item-controls .quantity .plus {
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
  }

  body.woocommerce-cart .fpv-mobile-fixed-cart-actions {
    gap: 6px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body.woocommerce-cart .fpv-mobile-cart-action {
    font-size: 10px !important;
    letter-spacing: 0 !important;
  }
}

/* ============================================================
   Header icon fixes – hide text labels, fix screen-reader-text
   ============================================================ */

/* Hide "Paieška" text inside mobile search toggle on mobile */
@media (max-width: 782px) {
  .site-header .mobile-search-toggle span,
  .site-header .mobile-nav-toggle .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
    left: -9999px !important;
  }
}





/* Coupon apply button – compact "+" style */
body.woocommerce-cart .fpv-coupon-apply-btn {
  min-width: 44px !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  border-radius: 9px !important;
  flex-shrink: 0 !important;
}

/* Coupon applied – green success notice */
body.woocommerce-cart .woocommerce-message[role="alert"],
body.woocommerce-cart .woocommerce-message {
  background: #e6f9ec !important;
  border-left: 4px solid #2ecc71 !important;
  color: #1a7a40 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-weight: 600 !important;
}

/* ============================================================
   Cart page: hide ALL buttons inside wc-proceed-to-checkout.
   Only the fixed bottom bar (Tęsti apsipirkimą + Apmokėti) should show.
   Double-layered: PHP removes hooks + CSS hides as fallback.
   ============================================================ */
body.woocommerce-cart .wc-proceed-to-checkout {
  display: none !important;
}

/* Coupon apply button – compact "+" style */
body.woocommerce-cart .fpv-coupon-apply-btn {
  min-width: 44px !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  border-radius: 9px !important;
  flex-shrink: 0 !important;
}

/* Coupon applied – green success notice */
body.woocommerce-cart .woocommerce-message {
  background: #e6f9ec !important;
  border-left: 4px solid #2ecc71 !important;
  color: #1a7a40 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-weight: 600 !important;
}
