/* BodyFrank pro layer: motion, product page, cart/checkout flow, mobile polish. */

/* ---------- motion ---------- */
.bf-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease var(--bf-delay, 0ms), transform 0.6s cubic-bezier(.2,.7,.2,1) var(--bf-delay, 0ms); }
.bf-reveal.bf-in { opacity: 1; transform: none; }
.bf-btn, .button { position: relative; overflow: hidden; }
.bf-btn--fire::after, .single_add_to_cart_button::after, #place_order::after, .checkout-button::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.35), transparent); transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.bf-btn--fire:hover::after, .single_add_to_cart_button:hover::after, #place_order:hover::after, .checkout-button:hover::after { left: 140%; }
.bf-btn:active, .button:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .bf-reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- header ---------- */
#header { transition: box-shadow 0.25s ease; }
.bf-scrolled #header [data-sticky*='yes'], .bf-scrolled #header .ct-sticky-container > div { box-shadow: 0 8px 30px rgb(21 23 28 / 0.08); }
#header [data-id='cart'] .ct-dynamic-count-cart { background: var(--bf-fire) !important; color: #fff !important; font-weight: 800; }

/* ---------- product page ---------- */
.single-product .hero-section { margin-bottom: 0; }
.single-product .ct-breadcrumbs { font-size: 0.78rem; color: #8a9099; }
.single-product .ct-breadcrumbs a { color: #6b717b; }
.single-product .product-entry-wrapper { gap: clamp(24px, 4vw, 64px) !important; align-items: start; }
.single-product .woocommerce-product-gallery .ct-media-container {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--bf-line);
  background: radial-gradient(ellipse 70% 60% at 70% 30%, rgb(255 138 0 / 0.18), transparent 65%), linear-gradient(160deg, #ffffff, #f2f2f4);
}
.single-product .woocommerce-product-gallery img { object-fit: contain !important; padding: 6%; transition: transform 0.5s ease; }
.single-product .woocommerce-product-gallery .ct-media-container:hover img { transform: scale(1.04); }
.single-product .summary { position: sticky; top: 120px; }
.single-product .product_title { font-size: clamp(1.8rem, 3.2vw, 2.7rem) !important; line-height: 1.02 !important; margin-bottom: 14px !important; }
.single-product .summary > .price:not(.price-unit) {
  display: inline-block; margin: 0 0 4px !important; font-family: var(--bf-heading); font-size: clamp(2rem, 3vw, 2.6rem) !important; font-weight: 700; font-style: italic;
  background: var(--bf-fire); -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.single-product .summary > .price:not(.price-unit) .amount { color: transparent; }
.single-product .summary .price-unit { margin: 0 !important; font-size: 0.85rem !important; color: #6b717b; }
.single-product .legal-price-info { margin: 2px 0 14px; font-size: 0.8rem; color: #6b717b; }
.single-product .legal-price-info a { color: #e8530b; }
.single-product .woocommerce-product-details__short-description { font-size: 1rem; line-height: 1.65; color: var(--bf-muted); }
.single-product .delivery-time-info {
  display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0 !important; padding: 7px 12px; border-radius: 999px;
  background: #ecf8f0; color: #17713a; font-size: 0.8rem !important; font-weight: 700;
}
.single-product .delivery-time-info::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #22a053; box-shadow: 0 0 0 4px rgb(34 160 83 / 0.18); }
.single-product .ct-product-divider { margin-block: 18px !important; border-color: var(--bf-line) !important; }
.single-product .ct-cart-actions { display: flex !important; gap: 12px; align-items: stretch; }
.single-product .quantity[data-type] {
  --quantity-height: 56px; height: 56px !important; border: 1.5px solid #dcdde1 !important; border-radius: 12px !important; background: #fff; overflow: hidden;
}
.single-product .quantity .ct-increase, .single-product .quantity .ct-decrease { color: var(--bf-ink) !important; }
.single-product .quantity .ct-increase:hover, .single-product .quantity .ct-decrease:hover { background: #fff3ea !important; color: #e8530b !important; }
.single-product .quantity input.qty { font-weight: 800; font-size: 1.05rem; }
.single-product .single_add_to_cart_button { flex: 1; min-height: 56px; font-size: 1rem !important; border-radius: 12px !important; box-shadow: 0 10px 26px rgb(255 90 0 / 0.28); }
.bf-ptrust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0 !important; padding: 0 !important; list-style: none; }
.bf-ptrust li { display: flex; gap: 10px; align-items: center; margin: 0 !important; padding: 12px; border: 1px solid var(--bf-line); border-radius: 12px; background: #fafafb; }
.bf-ptrust svg { flex: none; width: 22px; height: 22px; fill: none; stroke: #e8530b; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bf-ptrust strong { display: block; font-size: 0.78rem; color: var(--bf-ink); line-height: 1.25; }
.bf-ptrust small { display: block; font-size: 0.7rem; color: #6b717b; }
.bf-ppay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 0.72rem; color: #6b717b; }
.bf-ppay b { padding: 3px 8px; border: 1px solid var(--bf-line); border-radius: 5px; background: #fff; color: var(--bf-ink); font-size: 0.72rem; }
.single-product .product_meta { display: grid; gap: 6px; font-size: 0.82rem; color: #6b717b; }
.single-product .product_meta a { color: var(--bf-ink); font-weight: 600; }
.single-product .woocommerce-tabs { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--bf-line); }
.single-product .woocommerce-tabs ul.tabs { gap: 8px; border: 0 !important; }
.single-product .woocommerce-tabs ul.tabs li a {
  padding: 10px 18px !important; border: 1px solid var(--bf-line); border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bf-ink);
}
.single-product .woocommerce-tabs ul.tabs li.active a { background: var(--bf-ink); border-color: var(--bf-ink); color: #fff; }
.single-product .woocommerce-tabs ul.tabs li::before, .single-product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.single-product .woocommerce-Tabs-panel { max-width: 820px; margin-inline: auto; color: var(--bf-muted); line-height: 1.75; }
.single-product .related > h2, .single-product .upsells > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; }

/* Sticky buy bar (mobile) */
.bf-sticky-buy { display: none; }
@media (max-width: 989px) {
  .single-product .summary { position: static; }
  .bf-sticky-buy {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px;
    border: 1px solid var(--bf-line); border-radius: 16px; background: rgb(255 255 255 / 0.96); backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px rgb(21 23 28 / 0.22); transform: translateY(140%); transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
  }
  .bf-sticky-buy.is-on { transform: none; }
  .bf-sticky-buy__info { min-width: 0; flex: 1; }
  .bf-sticky-buy__info strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.82rem; color: var(--bf-ink); }
  .bf-sticky-buy__info span { font-weight: 800; color: #e8530b; }
  .bf-sticky-buy__btn { display: inline-flex !important; align-items: center; gap: 8px; min-height: 46px; padding-inline: 16px !important; border-radius: 12px !important; font-size: 0.8rem !important; }
  .bf-sticky-buy__btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bf-ptrust { grid-template-columns: 1fr; }
}

/* ---------- toast ---------- */
#bf-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999; display: flex; align-items: center; gap: 12px; max-width: min(380px, calc(100vw - 40px));
  padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--bf-ink); color: #fff; box-shadow: 0 20px 50px rgb(0 0 0 / 0.3);
  transform: translateY(150%); opacity: 0; transition: transform 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.3s;
}
#bf-toast.is-on { transform: none; opacity: 1; }
.bf-toast__check { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--bf-fire); font-weight: 800; }
.bf-toast__text { flex: 1; min-width: 0; }
.bf-toast__text strong { display: block; font-size: 0.85rem; }
.bf-toast__text small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.75rem; opacity: 0.7; }
.bf-toast__btn { flex: none; padding: 9px 14px; border-radius: 10px; background: #fff; color: var(--bf-ink) !important; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none !important; }
@media (max-width: 989px) { .single-product #bf-toast { bottom: 90px; } }

/* ---------- thank you ---------- */
.bf-thanks { display: grid; justify-items: center; gap: 8px; margin: 0 0 32px; padding: clamp(28px, 5vw, 48px); border-radius: 18px; text-align: center;
  background: radial-gradient(ellipse 60% 90% at 50% 0%, rgb(255 138 0 / 0.18), transparent 70%), #fff; border: 1px solid var(--bf-line); }
.bf-thanks__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--bf-fire); box-shadow: 0 14px 34px rgb(255 90 0 / 0.35); animation: bf-pop 0.6s cubic-bezier(.2,1.4,.4,1) both; }
.bf-thanks__icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bf-thanks h2 { margin: 8px 0 0; font-size: clamp(1.8rem, 4vw, 2.6rem) !important; }
.bf-thanks p { margin: 0; max-width: 52ch; color: var(--bf-muted); }
@keyframes bf-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.woocommerce-order-received .woocommerce-order-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 0 !important; list-style: none; }
.woocommerce-order-received .woocommerce-order-overview li { margin: 0 !important; padding: 14px !important; border: 1px solid var(--bf-line) !important; border-radius: 12px; background: #fafafb; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6b717b; }
.woocommerce-order-received .woocommerce-order-overview li strong { display: block; margin-top: 4px; font-size: 0.95rem; text-transform: none; letter-spacing: 0; color: var(--bf-ink); }
.woocommerce-order-received .woocommerce-thankyou-order-received { display: none; }

/* ---------- mobile off-canvas menu ---------- */
#offcanvas .ct-panel-inner { background: #fff !important; }
#offcanvas .ct-panel-content::before {
  content: ''; display: block; height: 4px; margin: -1px -1px 18px; background: var(--bf-fire);
}
#offcanvas .mobile-menu a, #offcanvas [data-id='mobile-menu'] a {
  padding-block: 12px !important; font-family: var(--bf-heading); font-size: 1.15rem !important; font-weight: 700; font-style: italic; text-transform: uppercase; color: var(--bf-ink) !important;
}
#offcanvas .mobile-menu .sub-menu a, #offcanvas [data-id='mobile-menu'] .sub-menu a {
  font-family: 'Inter', sans-serif; font-size: 0.95rem !important; font-style: normal; font-weight: 600; text-transform: none; color: #4a4f59 !important;
}
#offcanvas .mobile-menu li, #offcanvas [data-id='mobile-menu'] li { border-bottom: 1px solid #f0f0f2; }
#offcanvas .ct-toggle-dropdown-mobile { color: #e8530b !important; }
#offcanvas .ct-toggle-close { color: var(--bf-ink) !important; }

/* ---------- responsive polish ---------- */
@media (max-width: 749px) {
  .bf-hero__heading { font-size: clamp(2.3rem, 11vw, 3.2rem) !important; }
  .bf-title { font-size: clamp(1.7rem, 8vw, 2.3rem) !important; }
}

/* The toast replaces WooCommerce's inline "View cart" link */
.ct-cart-actions .added_to_cart, ul.products .added_to_cart { display: none !important; }

/* Checkout: only one card on the right (no Blocksy frame around the review card) */
.woocommerce-checkout .ct-order-review { border: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
