/* =====================================================
   MOTTA : CUSTOM STORE FIXES
   Loaded automatically by functions.php
   (keep Additional CSS empty)
===================================================== */


/* ---------- 1. PAGE HEADERS & TITLES ---------- */

/* Hide page titles on normal pages */
.page-header:not(.page-header--products) .page-header__title {
  contain-intrinsic-block-size: auto 100px;
  font-size: 0;
}

.page-header--products .page-header__content {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}

/* Category / archive title */
.page-header--products .page-header__title {
  font-size: 32px !important;
  line-height: 1.25;
  margin: 0;
}
@media (max-width: 767px) {
  .page-header--products .page-header__title { font-size: 24px !important; }
}

/* Shop page: hide title and remove header spacing */
.woocommerce-shop h1.page-header__title {
  display: none !important;
}
.woocommerce-shop .page-header,
.woocommerce-shop .page-header__inner,
.woocommerce-shop .page-header__wrapper {
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
}
.woocommerce-shop .breadcrumbs,
.woocommerce-shop .woocommerce-breadcrumb {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.page .site-content {
  padding-top: 0;
  padding-bottom: 0;
}


/* ---------- 2. HEADER ---------- */

/* Mobile: centre the logo */
.site-header__mobile .container { position: relative; }
.site-header__mobile .header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.header-left-items {
  display: flex;
  align-items: center;
}
.header-right-items {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Cart counter badge */
.header-cart__counter,
.header-cart .motta-button--base .header-cart__counter {
  color: #ffffff;
  background-color: #000000;
}


/* ---------- 3. SEARCH (FiboSearch) ---------- */

/* Override Motta's 160px button min-width */
.dgwt-wcas-search-wrapp button,
.dgwt-wcas-om-bar button.dgwt-wcas-om-return {
  min-width: 0 !important;
}
.dgwt-wcas-om-bar .dgwt-wcas-om-return {
  flex: 0 0 45px;
  width: 45px !important;
}
.dgwt-wcas-overlay-mobile .dgwt-wcas-search-wrapp {
  flex: 1 1 auto;
  width: auto !important;
  max-width: none !important;
}
.dgwt-wcas-overlay-mobile .dgwt-wcas-sf-wrapp {
  max-width: none !important;
}
/* 16px stops iPhone Safari zooming on tap */
.dgwt-wcas-search-input {
  font-size: 16px !important;
}

#fibo-search-modal {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  display: none;
}
#fibo-search-modal.open { display: block; }


/* ---------- 4. SHOP / PRODUCT GRID ---------- */

.woocommerce,
.woocommerce-page,
.site-content {
  background-color: #FDF5EF;
}

ul.products li.product .product-inner {
  background-color: #FDF5EF;
  width: 100%;
}

ul.products.product-card-layout-6 li.product .price {
  font-size: 1rem;
  margin-top: 10px;
  margin-left: 10px;
}

.price del {
  color: #888;
  margin-right: 8px;
  font-size: 15px;
}
.price ins {
  color: #e53935;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
}


/* ---------- 5. SINGLE PRODUCT ---------- */

/* Related + upsells hidden (delete this block to show them again) */
.related.products,
.single-product div.product .related.products,
.single-product div.product .upsells.products {
  display: none !important;
}

/* Remove Additional Information tab */
.single-product .additional_information_tab,
.single-product #tab-title-additional_information,
.single-product #tab-additional_information {
  display: none !important;
}

@media (max-width: 767px) {
  .single-product div.product.has-buy-now .single_variation_wrap .woocommerce-variation-add-to-cart {
    margin-right: 10px;
  }
  .single-product div.product .quantity input {
    flex: auto;
    width: 10px;
  }
}


/* ---------- 6. QUANTITY BOX (classic cart + product) ---------- */

.quantity {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
  height: 42px;
  background: #fff;
}
.quantity .minus,
.quantity .plus {
  width: 38px;
  height: 40px;
  border: none;
  background: #f5f5f5;
  font-size: 22px;
  color: #000;
  cursor: pointer;
}
.quantity .qty {
  width: 45px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
}
@media (max-width: 767px) {
  .quantity { height: 38px; }
  .quantity .minus,
  .quantity .plus {
    width: 34px;
    height: 36px;
  }
}


/* ---------- 7. CART ---------- */

/* Classic cart remove icon */
.product-remove { text-align: center; }
.product-remove .remove { font-size: 0; }
.product-remove .remove::before {
  content: "🗑";
  font-size: 18px;
}

/* Block cart: move delete icon out of the quantity box */
.wc-block-cart .wc-block-cart-items .wc-block-cart-item__quantity {
  display: flex !important;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}
.wc-block-cart .wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: auto !important;
  padding: 0 !important;
  border: 1px solid #e5d9e0;
  border-radius: 6px;
  background: #fff;
  color: #7c818b;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.wc-block-cart .wc-block-cart-items .wc-block-cart-item__remove-link svg {
  display: block !important;
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.wc-block-cart .wc-block-cart-items .wc-block-cart-item__remove-link:hover {
  color: #6b0f5a;
  border-color: #6b0f5a;
  background: #fbf3f8;
}
/* Kill Motta's duplicate delete icon */
.wc-block-cart-item__remove-link::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Cart drawer: show item price */
.motta-cart-panel .woocommerce-mini-cart-item .woocommerce-Price-amount,
.motta-mini-cart .mini_cart_item .woocommerce-Price-amount {
  display: block !important;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-top: 4px;
}

/* Add-to-cart toast */
.custom-cart-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e4d45;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ---------- 8. CHECKOUT (Blocks + Classic + FunnelKit) ---------- */

/* Order total on one line */
tr.order-total td,
tr.order-total td * {
  font-size: 18px !important;
  white-space: nowrap !important;
}
tr.order-total td { text-align: right; }
@media (max-width: 480px) {
  tr.order-total td,
  tr.order-total td * { font-size: 16px !important; }
}

/* Hide product images in order summary */
.wc-block-components-order-summary-item__image,
.woocommerce-checkout .product-thumbnail,
.woocommerce-checkout-review-order-table img,
#wfacp-e-form table.shop_table.woocommerce-checkout-review-order-table tr.cart_item .product-image {
  display: none !important;
}
.wc-block-components-order-summary-item,
.wc-block-components-order-summary-item__description {
  padding-left: 0 !important;
}

/* Hide the first "Returning customer? Login" toggle */
.checkout-login .woocommerce-form-login-toggle:first-child {
  display: none;
}

/* FunnelKit payment methods box */
body #wfacp-e-form #add_payment_method #payment ul.payment_methods,
body #wfacp-e-form .woocommerce-cart #payment ul.payment_methods,
body #wfacp-e-form .woocommerce-checkout #payment ul.payment_methods {
  padding: 0;
  text-align: left;
  margin: 0 0 0 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* 1. Hide duplicate theme coupon bar */
body.wfacp_checkout-template .checkout-form-cols .checkout-coupon { display: none !important; }
/* 2. Hide Motta mobile bottom nav on checkout */
body.wfacp_checkout-template #motta-mobile-navigation-bar { display: none !important; }
body.wfacp_checkout-template { padding-bottom: 0 !important; }
/* 3. Coupon field: keep Apply button inside */
body.wfacp_checkout-template .wfacp_coupon_field_box { display: flex !important; gap: 8px; margin: 10px 0 0 !important; }
body.wfacp_checkout-template .wfacp_coupon_field_box > p { flex: 1 1 auto; width: auto !important; padding: 0 !important; margin: 0 !important; float: none !important; }
body.wfacp_checkout-template .wfacp_coupon_field_box > p.wfacp_coupon_btn_wrap { flex: 0 0 110px !important; max-width: 110px !important; }
body.wfacp_checkout-template .wfacp_coupon_field_box .wfacp-coupon-field-btn { width: 100% !important; min-width: 0 !important; max-width: 100% !important; height: 100%; min-height: 48px; }
/* 4. Payment box + Place Order: no full-bleed overflow */
body.wfacp_checkout-template #payment { margin: 0 !important; width: 100% !important; border-radius: 8px; overflow: hidden; }
body.wfacp_checkout-template #payment .form-row.place-order,
body.wfacp_checkout-template .wfacp-order-place-btn-wrap { width: 100% !important; margin: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
body.wfacp_checkout-template #place_order { width: 100% !important; border-radius: 8px; }
/* 5. Order total */
body.wfacp_checkout-template tr.order-total th { font-size: 16px !important; }
body.wfacp_checkout-template tr.order-total td,
body.wfacp_checkout-template tr.order-total td * { font-size: 18px !important; font-weight: 600 !important; white-space: nowrap !important; }
/* 6. Summary prices; coupon Remove stacks */
body.wfacp_checkout-template .shop_table td:last-child { white-space: nowrap; }
body.wfacp_checkout-template tr.cart-discount td { white-space: normal !important; text-align: right; }
body.wfacp_checkout-template tr.cart-discount .woocommerce-remove-coupon { display: block; font-size: 12px; margin-top: 2px; }
/* 7. Mobile */
@media (max-width: 767px) {
  body.wfacp_checkout-template .wfacp-form-control,
  body.wfacp_checkout-template input.input-text,
  body.wfacp_checkout-template select,
  body.wfacp_checkout-template .select2-selection__rendered { font-size: 16px !important; }
  body.wfacp_checkout-template tr.order-total td,
  body.wfacp_checkout-template tr.order-total td * { font-size: 17px !important; }
  body.wfacp_checkout-template #place_order { font-size: 16px !important; padding: 16px !important; }
}


/* ---------- 9. THANK YOU PAGE (FunnelKit) ---------- */

/* Hide floating cart, bottom nav and injected giant image */
body.woocommerce-order-received #motta-mobile-navigation-bar,
body.woocommerce-order-received .motta-mobile-navigation-bar,
body.woocommerce-order-received .panel__container,
body.woocommerce-order-received .fkw-floating-cart,
body.woocommerce-order-received .fkw-floating-cart-wrapper,
body.woocommerce-order-received .fkw-cart-trigger,
body.woocommerce-order-received .fkw-cart-icon,
body.woocommerce-order-received img.fkw-cart-image,
body.woocommerce-order-received .site-content svg {
  display: none !important;
}
body.woocommerce-order-received .site,
body.woocommerce-order-received .wrap {
  overflow: visible !important;
}

/* Shipping row layout on mobile */
@media (max-width: 767px) {
  .wffn_order_details_table .wfty_pro_list_cont table tfoot { display: table-footer-group !important; }
  .wffn_order_details_table .wfty_pro_list_cont table tfoot tr { display: table-row !important; }
  .wffn_order_details_table .wfty_pro_list_cont table tfoot tr th,
  .wffn_order_details_table .wfty_pro_list_cont table tfoot tr td {
    display: table-cell !important;
    width: auto !important;
    float: none !important;
    text-align: left !important;
    vertical-align: middle !important;
  }
  .wffn_order_details_table .wfty_pro_list_cont table tfoot tr td {
    text-align: right !important;
    white-space: nowrap !important;
  }
}


/* ---------- 10. ACCOUNT / LOGIN ---------- */

.woocommerce-account:not(.logged-in) .woocommerce-form .password-input {
  position: relative;
}
.woocommerce-account:not(.logged-in) .woocommerce-form .password-input .show-password-input {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: auto !important;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  margin: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 500;
  color: inherit;
}


/* ---------- 11. ELEMENTOR / SLIDERS / VIDEO ---------- */

.elementor img {
  border: none;
  border-radius: 10px;
  box-shadow: none;
  height: auto;
  max-width: 100%;
}

.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
  bottom: 10px;
  left: 0;
  width: 100%;
  margin-top: -20px;
}

.elementor-620 .elementor-element.elementor-element-390aa58 .elementor-repeater-item-8693451 .swiper-slide-inner .elementor-slide-button {
  color: #ffffff;
  border-color: #000000;
}

@media (max-width: 767px) {
  .elementor-890 .elementor-element.elementor-element-7921b7d5 {
    --padding-top: 16px;
    --padding-bottom: 0px;
    --padding-left: 16px;
    --padding-right: 16px;
    margin-top: -50px;
  }
}

/* Custom accordion: always open on mobile */
@media (max-width: 768px) {
  .custom-accordion {
    width: 100%;
    overflow: visible;
  }
  .acc-content { display: block !important; }
}

/* Video play button */
.vsfw-play-icon__background {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.2) !important;
  backdrop-filter: blur(6px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.vsfw-play-icon__background:hover {
  transform: translate(-50%, -50%) scale(1.1);
}
.vsfw-play-icon__background svg,
.vsfw-play-icon__background i {
  font-size: 20px !important;
  color: #fff !important;
}
