/* =====================================================================
   Free (static) site additions: shop, product, cart, checkout, invoice.
   Loaded after style.css (which is the WordPress theme's CSS).
   ===================================================================== */
body:not(.ready) #main { min-height: 70vh; }
.page-loading { display: grid; place-items: center; min-height: 60vh; }
.page-loading span { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a:hover { color: var(--primary); }
.result-count { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.btn-pink { background: var(--pink); }
.btn-pink:hover { background: #c20f69; box-shadow: 0 6px 16px rgba(228, 21, 124, .3); }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-wa { background: #25d366; margin-top: 10px; }
.btn-wa:hover { background: #1ebe5b; box-shadow: 0 6px 16px rgba(37, 211, 102, .3); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.woocommerce ul.products li.product .button.added { background: #16a34a; color: #fff; }
.woocommerce ul.products li.product .button.is-disabled { background: var(--bg); color: var(--muted); cursor: default; }
.woocommerce ul.products li.product.is-out img { filter: grayscale(.6); opacity: .7; }
.bgt-heart svg { width: 17px; height: 17px; }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-ico { font-size: 54px; line-height: 1; margin-bottom: 10px; animation: rise .6s var(--ease); }
.rich { line-height: 1.75; }
.rich h2 { font-size: 20px; color: var(--ink); }
.rich ul, .rich ol { padding-left: 20px; }
.rich p { margin: 0 0 .6em; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25); transition: all .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #8ec5ff; text-decoration: underline; margin-left: 6px; }

/* Product page */
.pdp { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.pdp-main { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg); }
.pdp-main img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; transition: transform .5s var(--ease); animation: fadeIn .4s; }
.pdp-main:hover img { transform: scale(1.08); }
.pdp-main .onsale { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 6px 10px; border-radius: 4px; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pdp-thumbs button { flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; transition: border-color .2s, transform .2s; }
.pdp-thumbs button:hover { transform: translateY(-2px); }
.pdp-thumbs button.is-active { border-color: var(--primary); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: 24px; margin: 4px 0 10px; }
.pdp-price { font-size: 28px; font-weight: 800; color: var(--primary); margin: 0 0 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pdp-price del { font-size: 18px; color: var(--muted); font-weight: 400; order: 2; }
.pdp-price ins { text-decoration: none; order: 1; }
.pdp-price .save { order: 3; font-size: 12px; background: #fde7f1; color: var(--pink); padding: 4px 8px; border-radius: 999px; }
.stock { font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.stock.in { color: #16a34a; }
.stock.out { color: #d63638; }
.pdp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pdp-tags a { font-size: 12px; background: var(--primary-soft); color: var(--primary); padding: 4px 10px; border-radius: 999px; }
.pdp-buy { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 4px; }
.pdp-buy .btn { padding: 14px 24px; font-size: 15px; flex: 1 1 140px; }
.bgt-heart.pdp-heart { position: static; opacity: 1; transform: none; width: 48px; height: 48px; border: 1px solid var(--line); }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.qty button { width: 38px; border: 0; background: var(--bg); font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--primary-soft); color: var(--primary); }
.qty input { width: 48px; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdp-perks { list-style: none; padding: 14px 16px; margin: 16px 0 0; background: var(--bg); border-radius: 10px; font-size: 14px; display: grid; gap: 6px; }
.pdp-desc .rich { max-width: 860px; margin: 0 auto; }
.sticky-buy { display: none; }

/* Cart */
.cart-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.cart-lines { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto auto 32px; gap: 14px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); animation: rise .4s var(--ease) both; }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }
.cl-info b { font-size: 14px; display: block; }
.cl-info .price { font-size: 13px; color: var(--primary); font-weight: 700; }
.cl-info .price del { color: var(--muted); font-weight: 400; margin-right: 4px; }
.cl-info .price ins { text-decoration: none; }
.cl-remove { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bg); font-size: 18px; cursor: pointer; transition: background .2s, color .2s; }
.cl-remove:hover { background: #fde2e2; color: #d63638; }
.cart-summary { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: sticky; top: 140px; }
.cart-summary h3 { margin-bottom: 14px; }
.cart-summary p { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-size: 14px; }
.cart-summary .grand { font-size: 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.cart-summary .grand b { color: var(--primary); }
.continue { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.co-fields { display: grid; gap: 14px; }
.co-fields label, .contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.input-text.invalid { border-color: #d63638; box-shadow: 0 0 0 3px #fde2e2; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
fieldset.bgt-area { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
fieldset.bgt-area legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
fieldset.bgt-area label.radio { flex: 1 1 160px; display: flex; gap: 8px; align-items: center; font-size: 14px; }
fieldset.bgt-area label.radio b { margin-left: auto; color: var(--primary); }
fieldset.bgt-area label.radio:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.co-items { display: grid; gap: 10px; margin-bottom: 14px; max-height: 280px; overflow-y: auto; }
.co-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.co-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.pay-box { background: var(--primary-soft); border-radius: 8px; padding: 12px; font-size: 14px; margin: 12px 0; }
.co-error { color: #d63638; font-weight: 600; font-size: 14px; }
.co-error a { text-decoration: underline; }

/* Thanks + invoice */
.thanks { text-align: center; }
.tick { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 38px; display: grid; place-items: center; animation: pop .6s var(--ease); box-shadow: 0 0 0 10px #dcfce7; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } }
.thanks-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.demo-note { background: #fff7e6; border: 1px solid #ffd591; color: #ad6800; padding: 10px; border-radius: 8px; font-size: 13px; }
.invoice { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-top: 20px; }
.inv-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary); padding-bottom: 14px; margin-bottom: 16px; text-align: right; }
.inv-head .site-logo::after { display: none; }
.inv-to small { display: block; color: var(--muted); }
.inv-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.inv-table th, .inv-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.inv-table th:not(:first-child), .inv-table td:not(:first-child) { text-align: right; }
.inv-table tfoot td { border: 0; padding: 6px 8px; }
.inv-table tfoot td:first-child { text-align: right; }
.inv-table .grand td { font-weight: 800; font-size: 16px; color: var(--primary); border-top: 2px solid var(--ink); }
.inv-foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }

/* Track + contact */
.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin: 16px 0; }
.track-result { animation: rise .4s var(--ease); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.contact-form { display: grid; gap: 12px; }

@media (max-width: 900px) {
  .pdp, .cart-wrap, .checkout, .contact-grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 640px) {
  .pdp { padding: 14px; gap: 16px; }
  .pdp-info h1 { font-size: 19px; }
  .pdp-price { font-size: 24px; }
  .cart-line { grid-template-columns: 64px 1fr 32px; gap: 10px; }
  .cart-line img { width: 64px; height: 64px; }
  .cart-line .qty { grid-column: 2; }
  .cart-line .cl-total { grid-column: 3; grid-row: 2; justify-self: end; }
  .cart-line .cl-remove { grid-column: 3; grid-row: 1; }
  .track-form { grid-template-columns: 1fr; }
  .invoice { padding: 16px; }
  .sticky-buy {
    display: flex; position: fixed; left: 0; right: 0; bottom: 64px; z-index: 54; align-items: center; justify-content: space-between; gap: 10px;
    background: #fff; padding: 10px 16px; box-shadow: 0 -6px 18px rgba(16, 24, 40, .1); transform: translateY(130%); transition: transform .35s var(--ease);
  }
  body.scrolled .sticky-buy { transform: none; }
  .sticky-buy span { display: grid; min-width: 0; }
  .sticky-buy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
  .sticky-buy b { color: var(--primary); font-size: 17px; }
  .toast { bottom: 84px; width: max-content; max-width: calc(100% - 32px); }
}

/* Facebook mini button + page window (bottom-left) */
.fb-float {
  position: fixed; left: 16px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 0; height: 46px; padding: 0 12px;
  border: 0; border-radius: 999px; background: #1877f2; color: #fff; font: 700 13px "Open Sans", sans-serif; cursor: pointer;
  box-shadow: 0 10px 22px rgba(24, 119, 242, .35); transition: gap .3s var(--ease), padding .3s var(--ease), transform .2s;
}
.fb-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .35s var(--ease); }
.fb-float:hover { gap: 8px; padding: 0 16px 0 12px; transform: translateY(-2px); }
.fb-float:hover span { max-width: 90px; }
.fb-panel {
  position: fixed; left: 16px; bottom: 80px; z-index: 61; width: 340px; max-width: calc(100vw - 32px); background: #fff; border-radius: 14px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, .25); overflow: hidden; animation: rise .35s var(--ease);
}
.fb-panel[hidden] { display: none; }
.fb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fb-head b { font-size: 14px; flex: 1; }
.fb-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg); font-size: 18px; cursor: pointer; }
.fb-frame { height: 380px; background: var(--bg); }
.fb-frame .page-loading { min-height: 380px; }
.fb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.fb-actions { display: flex; gap: 8px; padding: 10px 12px; }
.fb-actions .btn { flex: 1; padding: 10px; font-size: 13px; }
.btn-fb { background: #1877f2; } .btn-fb:hover { background: #0f63d6; box-shadow: 0 6px 16px rgba(24, 119, 242, .3); }
@media (max-width: 640px) {
  .fb-float { bottom: 78px; left: 12px; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .fb-float:hover { padding: 0; gap: 0; }
  .fb-float:hover span { max-width: 0; }
  .fb-panel { left: 12px; bottom: 132px; }
  .fb-frame, .fb-frame .page-loading { height: min(300px, 45vh); min-height: 0; }
}

/* Print: only the invoice */
@media print {
  body { background: #fff; padding: 0; }
  body * { visibility: hidden; }
  #invoice, #invoice * { visibility: visible; }
  #invoice { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; margin: 0; }
}

/* Messenger button, next to WhatsApp (left of it) */
.msgr-float { position: fixed; right: 84px; bottom: 22px; z-index: 60; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(45deg, #0a7cff, #a033ff 60%, #ff5c87); box-shadow: 0 10px 24px rgba(160, 51, 255, .35); transition: transform .2s; }
.msgr-float:hover { transform: translateY(-3px) scale(1.05); }
@media (max-width: 640px) { .msgr-float { right: 74px; bottom: 78px; width: 48px; height: 48px; } }
