/* BeYou Product Extras: details accordion, WhatsApp button, mobile sticky bar. Loaded by beyou-product-extras.php */

.bex-acc, .bex-acc *, .bex-wa, .bex-wa *, .bex-bar, .bex-bar * { box-sizing: border-box; }

/* ══ DETAILS ACCORDION ══ */
.bex-acc { margin: 0; border-top: 1px solid rgba(32,50,78,0.10); font-family: 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }
.bex-acc.bex-one { border-top: 0; }
.bex-it { border-bottom: 1px solid rgba(32,50,78,0.10); }
.bex-hd { margin: 0 !important; padding: 0 !important; font-size: inherit !important; line-height: 1 !important; }
.bex-acc button.bex-btn {
  -webkit-appearance: none !important; appearance: none !important;
  display: flex !important; align-items: center !important; gap: 12px !important; width: 100% !important;
  min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 15px 2px !important;
  border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
  text-align: left !important; text-transform: none !important; letter-spacing: 0 !important;
  color: #20324E !important; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity 0.1s ease-out;
}
.bex-acc button.bex-btn:active { opacity: 0.6; }
.bex-acc button.bex-btn:focus-visible { outline: 2px solid #20324E !important; outline-offset: 2px; border-radius: 8px !important; }
.bex-ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(32,50,78,0.06); color: #20324E; transition: background 0.3s ease; }
.bex-ic svg { display: block; }
.bex-btn[aria-expanded="true"] .bex-ic { background: #20324E; color: #fff; }
.bex-tt { flex: 1; min-width: 0; font-family: 'Oswald', 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2; }

/* plus turns into minus */
.bex-pm { position: relative; flex-shrink: 0; width: 14px; height: 14px; }
.bex-pm::before, .bex-pm::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; border-radius: 2px; background: #20324E; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease; }
.bex-pm::after { transform: rotate(90deg); }
.bex-btn[aria-expanded="true"] .bex-pm::after { transform: rotate(0deg); opacity: 0; }

/* panel: animates real height with grid rows */
.bex-pn { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.bex-pn.open { grid-template-rows: 1fr; }
.bex-pi { overflow: hidden; min-height: 0; }
.bex-tx { padding: 0 2px 18px 46px; opacity: 0; transform: translateY(-4px); transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.bex-pn.open .bex-tx { opacity: 1; transform: none; transition-delay: 0.08s; }
.bex-tx p { margin: 0 0 8px !important; font-size: 13.5px !important; font-weight: 400 !important; line-height: 1.65 !important; color: rgba(32,50,78,0.76) !important; }
.bex-tx p:last-child { margin-bottom: 0 !important; }
.bex-tx ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.bex-tx li { position: relative; margin: 0 0 7px !important; padding: 0 0 0 16px !important; font-size: 13.5px !important; line-height: 1.6 !important; color: rgba(32,50,78,0.76) !important; }
.bex-tx li:last-child { margin-bottom: 0 !important; }
.bex-tx li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: #20324E; opacity: 0.7; }

/* ══ WHATSAPP BUTTON ══ */
.bex-wa, .bex-wa:hover, .bex-wa:focus, .bex-wa:visited {
  display: flex; align-items: center; gap: 13px; margin: 0; padding: 13px 16px;
  border-radius: 16px; border: 1px solid rgba(32,50,78,0.14);
  background: linear-gradient(135deg, rgba(32,50,78,0.045) 0%, #fff 100%);
  color: #20324E !important; text-decoration: none !important; cursor: pointer;
  font-family: 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.2s ease;
}
.bex-wi { flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: #20324E; color: #fff; }
.bex-wi svg { display: block; }
.bex-wt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bex-wt b { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #20324E; }
.bex-wt small { font-size: 12px; font-weight: 400; line-height: 1.4; color: rgba(32,50,78,0.58); }
.bex-wc { flex-shrink: 0; display: flex; color: #20324E; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.bex-wa:active { transform: scale(0.985); }
.bex-wa:focus-visible { outline: 2px solid #20324E; outline-offset: 2px; }
@media (hover: hover) {
  .bex-wa:hover { border-color: rgba(32,50,78,0.28); box-shadow: 0 6px 20px rgba(32,50,78,0.08); }
  .bex-wa:hover .bex-wc { transform: translateX(3px); }
}

/* ══ MOBILE STICKY ADD TO CART ══ */
.bex-bar { display: none; }
@media (max-width: 860px) {
  .bex-bar {
    display: block; position: fixed; left: 0; right: 0; bottom: var(--bex-off, 0px); z-index: 900;
    padding: 9px 12px 9px;
    background: rgba(255,255,255,0.82);
    -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
    border-top: 1px solid rgba(32,50,78,0.08);
    box-shadow: 0 -8px 30px rgba(32,50,78,0.08);
    transform: translateY(110%); opacity: 0; pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    font-family: 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased;
  }
  .bex-bar[style*="--bex-off:0px"] { padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px)); }
  .bex-bar.on { transform: none; opacity: 1; pointer-events: auto; }
  .bex-bar-in { display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; }
  .bex-bi { flex-shrink: 0; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: rgba(32,50,78,0.06); }
  .bex-bt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .bex-bn { font-size: 12.5px; font-weight: 500; line-height: 1.2; color: #20324E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bex-bp { font-family: 'Oswald', 'DM Sans', sans-serif; font-size: 17px; font-weight: 500; line-height: 1.1; letter-spacing: 0.02em; color: #20324E; }
  .bex-bar button.bex-go {
    -webkit-appearance: none !important; appearance: none !important; flex-shrink: 0;
    min-width: 0 !important; min-height: 0 !important; height: 46px !important; margin: 0 !important; padding: 0 22px !important;
    border: 0 !important; border-radius: 14px !important; background: #20324E !important; box-shadow: none !important;
    font-family: 'DM Sans', sans-serif !important; font-size: 12px !important; font-weight: 600 !important; line-height: 1 !important;
    letter-spacing: 0.08em !important; text-transform: uppercase !important; text-decoration: none !important;
    color: #fff !important; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, background 0.25s ease;
  }
  .bex-bar button.bex-go:active { transform: scale(0.96); }
  .bex-bar button.bex-go:disabled { opacity: 0.45; cursor: not-allowed; }
  .bex-bar button.bex-go.is-busy { opacity: 0.7; }
  .bex-bar button.bex-go:focus-visible { outline: 2px solid #20324E !important; outline-offset: 2px; }
  .bex-go span { display: inline-block; transition: opacity 0.18s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
  .bex-go span.sw { opacity: 0; transform: translateY(6px); }
}

/* "Select size" nudges the size selector */
@keyframes bexPulse { 0% { box-shadow: 0 0 0 0 rgba(32,50,78,0.28); } 100% { box-shadow: 0 0 0 14px rgba(32,50,78,0); } }
.bex-pulse { border-radius: 16px; animation: bexPulse 0.9s ease-out 2; }

@media (prefers-reduced-motion: reduce) {
  .bex-pn, .bex-tx, .bex-pm::before, .bex-pm::after, .bex-bar, .bex-wa, .bex-wc, .bex-go span { transition: none !important; }
  .bex-pulse { animation: none; outline: 2px solid rgba(32,50,78,0.3); }
}
