:root {
  --butterfly-blue: #087b9d;
  --butterfly-blue-dark: #07556f;
  --butterfly-cyan: #31b9d2;
  --butterfly-nav-height: 70px;
}

.butterfly-app-nav { display: none; }

/* Promotional artwork already shows the discount; avoid a duplicate "Sale" badge. */
.woocommerce span.onsale,
.woocommerce .product-tag,
.th-product .product-tag { display: none !important; }

.th-product .product-img { cursor: pointer; }

.single-product form.cart.butterfly-buy-only .quantity,
.single-product form.cart.butterfly-buy-only .single_add_to_cart_button,
.single-product form.cart.butterfly-buy-only button[name="add-to-cart"],
.single-product form.cart:has(.butterfly-buy-now) .quantity,
.single-product form.cart:has(.butterfly-buy-now) button[name="add-to-cart"] { display: none !important; }

.single-product form.cart:has(.butterfly-buy-now) .actions {
  display: block;
}

.single-product form.cart .butterfly-buy-now {
  min-width: 190px;
  width: 100%;
  text-align: center;
}

.is-loading { pointer-events: none; opacity: .65; }

body.butterfly-modal-open { overflow: hidden; }
.butterfly-cart-modal {
  position: fixed;
  z-index: 1000001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}
.butterfly-cart-modal.is-visible { visibility: visible; opacity: 1; }
.butterfly-cart-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 42, 38, .48);
  backdrop-filter: blur(5px);
}
.butterfly-cart-modal__panel {
  position: relative;
  width: min(100%, 470px);
  padding: 34px 34px 28px;
  border: 1px solid #eadccd;
  border-radius: 26px;
  background: #fff8f3;
  box-shadow: 0 28px 75px rgba(49, 34, 25, .24);
  text-align: center;
  transform: translateY(18px) scale(.97);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.butterfly-cart-modal.is-visible .butterfly-cart-modal__panel { transform: none; }
.butterfly-cart-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #725f52;
  background: #f3e7db;
  font-size: 26px;
  line-height: 36px;
}
.butterfly-cart-modal__brand {
  min-height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.butterfly-cart-modal__brand img {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 64px;
}
.butterfly-cart-modal__brand span {
  color: #07556f;
  font-family: var(--title-font, inherit);
  font-size: 25px;
  font-weight: 700;
}
.butterfly-cart-modal__eyebrow {
  margin: 0 0 6px;
  color: #bb8b60;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.butterfly-cart-modal__panel h2 {
  margin: 0 0 12px;
  color: #002b5b;
  font-size: clamp(23px, 5vw, 29px);
  line-height: 1.2;
}
.butterfly-cart-modal__message {
  max-width: 370px;
  margin: 0 auto 24px;
  color: #71675f;
  font-size: 15px;
  line-height: 1.65;
}
.butterfly-cart-modal__actions { display: grid; gap: 10px; }
.butterfly-cart-modal__checkout,
.butterfly-cart-modal__continue {
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
}
.butterfly-cart-modal__checkout {
  color: #fff;
  background: #d8bea0;
  box-shadow: none;
}
.butterfly-cart-modal__checkout:hover { color: #fff; background: #c9aa88; }
.butterfly-cart-modal__checkout:active { box-shadow: 0 4px 12px rgba(139, 103, 67, .16); }
.butterfly-cart-modal__continue {
  border: 1px solid #dfcbb6;
  color: #6b4b2f;
  background: #fffdfb;
}
.butterfly-cart-modal__reminder {
  margin: 16px 0 0;
  color: #978a80;
  font-size: 11px;
}

.butterfly-checkout-cart {
  width: min(100%, 920px);
  margin: 0 auto 30px;
  padding: 26px;
  border: 1px solid #eadccd;
  border-radius: 22px;
  background: #fff8f3;
}
.butterfly-checkout-cart__heading,
.butterfly-checkout-cart__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.butterfly-checkout-cart__heading { margin-bottom: 18px; }
.butterfly-checkout-cart__heading span:first-child {
  display: block;
  margin-bottom: 3px;
  color: #b98762;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.butterfly-checkout-cart__heading h2 {
  margin: 0;
  color: #002b5b;
  font-size: 24px;
  line-height: 1.25;
}
.butterfly-checkout-cart__count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 99px;
  color: #6b4b2f;
  background: #f0e1d2;
  font-size: 12px;
  font-weight: 700;
}
.butterfly-checkout-cart__items { display: grid; gap: 10px; }
.butterfly-checkout-item {
  padding: 12px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #eee1d5;
  border-radius: 16px;
  background: #fff;
  transition: opacity .2s ease;
}
.butterfly-checkout-item.is-updating { opacity: .55; }
.butterfly-checkout-item__image {
  width: 86px;
  height: 86px;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #fff5ef;
}
.butterfly-checkout-item__image img { width: 100%; height: 100%; object-fit: cover; }
.butterfly-checkout-item__details { min-width: 0; }
.butterfly-checkout-item__name {
  display: block;
  margin-bottom: 5px;
  color: #002b5b;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}
.butterfly-checkout-item__price { display: block; margin-bottom: 10px; color: #8d6748; font-weight: 700; }
.butterfly-checkout-item__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.butterfly-checkout-quantity {
  display: inline-grid;
  grid-template-columns: 34px 38px 34px;
  align-items: center;
  border: 1px solid #dfcbb6;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.butterfly-checkout-quantity button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  color: #002b5b;
  background: #f3e7db;
  box-shadow: none;
  font-size: 18px;
}
.butterfly-checkout-quantity span { color: #002b5b; font-size: 13px; font-weight: 750; }
.butterfly-checkout-item__remove {
  padding: 7px 10px;
  border: 1px solid #e4c3bb;
  border-radius: 9px;
  color: #a3483d;
  background: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}
.butterfly-checkout-cart__total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dfcbb6;
  color: #002b5b;
  font-size: 15px;
}
.butterfly-checkout-cart__total strong { color: #8d6748; font-size: 18px; }
.butterfly-checkout-cart__status { min-height: 18px; margin: 8px 0 0; color: #71675f; font-size: 11px; text-align: right; }

body.woocommerce-checkout .woocommerce-checkout-review-order-table { display: none; }
body.woocommerce-checkout #billing_country_field,
body.woocommerce-checkout #shipping_country_field { display: none !important; }
body.woocommerce-checkout #billing_address_1::placeholder,
body.woocommerce-checkout #shipping_address_1::placeholder,
body.woocommerce-checkout #billing_phone::placeholder,
body.woocommerce-checkout #billing_email::placeholder { color: #887a70; opacity: 1; }

@media (max-width: 991px) {
  html {
    max-width: 100%;
    overflow-x: clip;
    scroll-padding-bottom: calc(var(--butterfly-nav-height) + 20px);
  }
  body { padding-bottom: calc(var(--butterfly-nav-height) + env(safe-area-inset-bottom)); }
  body { max-width: 100%; overflow-x: clip; }
  body.butterfly-menu-open { overflow: hidden; }

  /* Mediax keeps an empty desktop top bar on mobile, which creates the gap. */
  .header-layout2 > .menu-top { display: none !important; }
  .header-layout2 .sticky-wrapper,
  .header-layout2 .menu-area { margin-top: 0 !important; }

  .header-layout2 .menu-area {
    background: #fff8f3 !important;
    border-bottom: 1px solid #eadccd;
    box-shadow: 0 7px 22px rgba(49, 34, 25, .1);
  }
  .header-layout2 .menu-area > .container { padding-top: 10px; padding-bottom: 10px; }
  .header-layout2 .header-logo img { max-height: 58px; width: auto; }
  .header-layout2 .header-button { gap: 10px; }
  .header-layout2 .header-button .sideMenuCart { display: none !important; }
  .header-layout2 .header-button .icon-btn,
  .header-layout2 .header-button .th-menu-toggle {
    width: 52px;
    height: 52px;
    border: 1px solid #dfcbb6;
    border-radius: 14px;
    color: #002b5b;
    background: #f3e7db;
    box-shadow: none;
  }
  .header-layout2 .header-button .icon-btn:hover,
  .header-layout2 .header-button .th-menu-toggle:hover {
    color: #fff;
    border-color: #d8bea0;
    background: #d8bea0;
  }
  .header-layout2 .header-button .badge,
  .header-layout2 .icon-btn .badge {
    color: #fff;
    background: #b98762;
    border-color: #fff8f3;
  }

  .th-menu-wrapper {
    background: rgba(4, 45, 58, .48);
    backdrop-filter: blur(3px);
    transition: opacity .3s ease, visibility .3s ease;
  }

  .th-menu-wrapper .th-menu-area {
    display: flex;
    flex-direction: column;
    width: min(88vw, 360px);
    max-width: 360px;
    border-right: 0;
    border-radius: 0 24px 24px 0;
    box-shadow: 18px 0 55px rgba(4, 74, 94, .18);
    overflow: hidden;
    transition: left .38s cubic-bezier(.22, 1, .36, 1), opacity .25s ease, visibility .25s ease;
  }

  .th-menu-wrapper .mobile-logo {
    min-height: 104px;
    padding: 24px 62px 20px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #f8fdff, #edfafd);
    border-bottom: 1px solid #dcebf1;
  }

  .th-menu-wrapper .mobile-logo img { max-width: 170px; max-height: 62px; }

  .butterfly-menu-heading {
    position: relative;
    padding: 22px 24px 18px;
    text-align: left;
    background: #fff;
  }
  .butterfly-menu-heading::after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--butterfly-cyan) 0 42px, #e3edf2 42px);
  }
  .butterfly-menu-heading span {
    display: block;
    margin-bottom: 3px;
    color: var(--butterfly-cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1.2;
    text-transform: uppercase;
  }
  .butterfly-menu-heading strong {
    color: var(--butterfly-blue-dark);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.25;
  }

  .th-menu-wrapper .th-menu-toggle {
    right: 18px;
    top: 22px;
    width: 42px;
    height: 42px;
    line-height: 42px;
    font-size: 19px;
    color: #fff;
    background: var(--butterfly-blue);
    box-shadow: 0 7px 18px rgba(8, 123, 157, .2);
  }

  .th-mobile-menu {
    flex: 1;
    max-height: none;
    margin: 0;
    padding: 18px 18px 34px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
  }

  .th-mobile-menu > ul { padding: 0; }
  .th-mobile-menu ul li { border: 0; margin-bottom: 10px; }
  .th-mobile-menu ul li li:first-child { border-top: 0; }
  .th-mobile-menu ul li a {
    min-height: 54px;
    padding: 14px 48px 14px 18px;
    display: flex;
    align-items: center;
    border: 1px solid #e8f0f4;
    border-radius: 16px;
    color: var(--butterfly-blue-dark);
    background: linear-gradient(135deg, #fbfdfe, #f4f9fb);
    font-size: 14.5px;
    font-weight: 650;
    line-height: 1.3;
    box-shadow: 0 5px 15px rgba(8, 123, 157, .07);
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease;
  }

  .th-mobile-menu ul li.current-menu-item > a,
  .th-mobile-menu ul li.current-menu-ancestor > a,
  .th-mobile-menu ul li a:hover {
    color: #fff;
    border-color: #3abbd1;
    background: linear-gradient(135deg, #159ab8, #3bc0d5);
    box-shadow: 0 9px 20px rgba(21, 154, 184, .2);
    transform: translateX(3px);
  }

  .th-mobile-menu ul li a::before { display: none; }
  .th-mobile-menu ul li ul { padding: 8px 0 1px 12px; }
  .th-mobile-menu ul li ul li { padding-left: 0; }
  .th-mobile-menu ul .th-item-has-children > a .th-mean-expand {
    right: 12px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    margin-top: -15px;
    background: rgba(41, 184, 213, .13);
    box-shadow: none;
  }
  .th-mobile-menu ul .th-item-has-children > a::after { display: none; }
  .th-mobile-menu .butterfly-submenu-toggle {
    position: absolute;
    right: 30px;
    width: 34px;
    height: 34px;
    margin-top: -42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: var(--butterfly-blue-dark);
    background: rgba(41, 184, 213, .13);
  }
  .th-mobile-menu .butterfly-submenu-toggle::before {
    content: '+';
    font-size: 20px;
    line-height: 1;
  }
  .th-mobile-menu li.th-active > .butterfly-submenu-toggle::before { content: '\2212'; }
  .th-mobile-menu ul[hidden] { display: none !important; }

  .butterfly-app-nav {
    position: fixed;
    z-index: 99990;
    left: 50%;
    right: auto;
    width: calc(100vw - 24px);
    max-width: 480px;
    bottom: max(10px, env(safe-area-inset-bottom));
    height: var(--butterfly-nav-height);
    padding: 6px 7px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    background: rgba(255, 248, 243, .98);
    border: 1px solid #eadccd;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(49, 34, 25, .16), inset 0 1px 0 #fff;
    backdrop-filter: blur(14px);
    box-sizing: border-box;
    overflow: hidden;
    transform: translateX(-50%);
  }

  .butterfly-app-nav__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 16px;
    color: #76675d;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
  }

  .butterfly-app-nav__item:hover,
  .butterfly-app-nav__item:focus { color: #002b5b; background: #f3e7db; }
  .butterfly-app-nav__item.is-active {
    color: #fff;
    background: #d8bea0;
    box-shadow: 0 7px 18px rgba(139, 103, 67, .2);
  }
  .butterfly-app-nav__item:active { transform: scale(.96); }
  .butterfly-app-nav__item.is-disabled {
    cursor: default;
    pointer-events: none;
    color: #a7b2b5;
    background: transparent;
    box-shadow: none;
  }
  .butterfly-app-nav__item svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .butterfly-app-nav__item.is-active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 20px;
    height: 3px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .9);
  }
  .butterfly-app-nav__icon { position: relative; line-height: 0; }
  .butterfly-cart-count {
    position: absolute;
    top: -7px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #fff;
    background: #b98762;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
  }

  .th-menu-wrapper.th-body-visible ~ .butterfly-app-nav { visibility: hidden; opacity: 0; }

  .butterfly-app-nav.has-cart-reminder .butterfly-app-nav__item:last-child:not(.is-active):not(.is-disabled) .butterfly-app-nav__icon {
    color: #9b704e;
    animation: butterfly-cart-pulse 2.6s ease-in-out 2;
  }
}

@keyframes butterfly-cart-pulse {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.06); box-shadow: 0 5px 16px rgba(49, 185, 210, .22); }
}

@media (max-width: 520px) {
  .butterfly-cart-modal { padding: 14px; }
  .butterfly-cart-modal__panel { padding: 30px 20px 22px; border-radius: 22px; }
  .butterfly-checkout-cart { margin-bottom: 22px; padding: 17px 13px; border-radius: 18px; }
  .butterfly-checkout-cart__heading { align-items: flex-start; }
  .butterfly-checkout-cart__heading h2 { font-size: 20px; }
  .butterfly-checkout-cart__count { padding: 6px 9px; font-size: 10px; }
  .butterfly-checkout-item { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 9px; }
  .butterfly-checkout-item__image { width: 72px; height: 72px; }
  .butterfly-checkout-item__name { font-size: 13px; }
  .butterfly-checkout-item__price { margin-bottom: 7px; font-size: 12px; }
  .butterfly-checkout-item__controls { align-items: flex-end; flex-direction: column; gap: 7px; }
  .butterfly-checkout-item__remove { padding: 4px 7px; font-size: 10px; }
}

@media (max-width: 575px) {
  footer .elementor-widget-mediaxmenuselect,
  footer .elementor-widget-mediaxnewsletter {
    display: none !important;
  }
  footer .elementor-widget-mediaxcontactinfo {
    width: 100% !important;
    max-width: 100% !important;
  }
  footer .footer-wrapper .e-con-inner {
    display: block !important;
  }
  footer .th-widget-about { margin-bottom: 0; }
  footer .copyright-wrap { margin-bottom: 12px; }

  .shop-grid-area > .row,
  .shop-grid-area .row.gy-40 {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 14px;
  }
  .shop-grid-area > .row > [class*="col-"],
  .shop-grid-area .row.gy-40 > [class*="col-"] {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    padding-right: 5px;
    padding-left: 5px;
  }
  .shop-grid-area .product-wrapper,
  .shop-grid-area .th-product {
    height: 100%;
  }
  .shop-grid-area .th-product {
    display: flex;
    flex-direction: column;
    border: 1px solid #eadccd;
    border-radius: 18px;
    background: #fffaf6;
    box-shadow: 0 7px 20px rgba(49, 34, 25, .07);
    overflow: hidden;
  }
  .shop-grid-area .th-product .product-img {
    aspect-ratio: 1 / 1;
    min-height: 0;
    border-radius: 0;
    background: #fff5ef;
    overflow: hidden;
  }
  .shop-grid-area .th-product .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .shop-grid-area .th-product .product-img .actions { display: none !important; }
  .shop-grid-area .th-product .product-content {
    flex: 1;
    padding: 13px 11px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .shop-grid-area .th-product .product-category {
    margin-bottom: 5px;
    color: #a17a5b;
    font-size: 9px;
    line-height: 1.25;
    text-transform: uppercase;
  }
  .shop-grid-area .th-product .product-title {
    min-height: 38px;
    margin: 0 0 7px;
    display: -webkit-box;
    overflow: hidden;
    color: #002b5b;
    font-size: 14px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .shop-grid-area .th-product .butterfly-product-highlight {
    min-height: 34px;
    margin: 0 0 8px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .shop-grid-area .th-product .product-price {
    margin: auto 0 10px;
    color: #087b9d;
    font-size: 13px;
    font-weight: 750;
  }
  .shop-grid-area .th-product .product-price del { font-size: 10px; opacity: .65; }
  .butterfly-view-product {
    width: 100%;
    min-height: 40px;
    padding: 10px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8bea0;
    border-radius: 12px;
    color: #fff;
    background: #d8bea0;
    box-shadow: none;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }
  .butterfly-view-product:hover,
  .butterfly-view-product:focus { color: #fff; background: #c9aa88; }
}

@media (max-width: 400px) {
  .th-menu-wrapper .th-menu-area { width: min(88vw, 340px); max-width: none; }
  .th-mobile-menu { padding-left: 14px; padding-right: 14px; }
}
