/*
 * CBDforDog — Single Product Page Styles
 */

/* ── TRUST BAR ── */
.spd-trust-bar{background:var(--cream);border-bottom:1px solid var(--cream-dark);padding:10px 24px;text-align:center;font-size:13px;font-weight:500;color:var(--text-body)}
.spd-trust-bar-inner{max-width:1280px;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
.spd-tb-sep{color:var(--text-muted);font-size:10px}
.spd-tb-item{display:flex;align-items:center;gap:5px;white-space:nowrap}
.spd-tb-icon{font-size:15px}

/* ── LAYOUT ── */
.spd-wrap{padding:0 0 80px}
.spd-breadcrumbs{padding:14px 0;font-size:13px;color:var(--text-muted)}
.spd-breadcrumbs a{color:var(--green-primary)}
.spd-layout{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:flex-start;margin-bottom:64px}

/* ── GALLERY ── */
.spd-gallery-sticky{position:sticky;top:96px}
.spd-gallery-col .woocommerce-product-gallery{border-radius:20px;overflow:hidden;position:static!important;float:none!important;width:100%!important}
.spd-gallery-col .woocommerce-product-gallery__wrapper{border-radius:16px;overflow:hidden}
.spd-gallery-col .woocommerce-product-gallery__image{background:#fdf5f0;border-radius:16px;overflow:hidden}
.spd-gallery-col .woocommerce-product-gallery__image img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:16px;display:block}
.spd-gallery-col .flex-control-thumbs{display:flex;gap:8px;margin-top:12px;padding:0;flex-wrap:wrap;list-style:none}
.spd-gallery-col .flex-control-thumbs li{width:72px!important;margin:0!important;float:none!important}
.spd-gallery-col .flex-control-thumbs li img{border-radius:10px;cursor:pointer;border:2.5px solid transparent;transition:border-color .2s;aspect-ratio:1/1;object-fit:cover;width:100%}
.spd-gallery-col .flex-control-thumbs li img.flex-active{border-color:var(--navy)}
.spd-guarantee-badge{display:flex;align-items:center;gap:14px;margin-top:16px;padding:14px 18px;background:var(--cream);border-radius:14px;border:1px solid var(--cream-dark)}
.spd-guarantee-icon-wrap{width:44px;height:44px;border-radius:50%;background:var(--green-primary);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.spd-guarantee-text{display:flex;flex-direction:column;gap:2px}
.spd-guarantee-text strong{font-size:13px;font-weight:700;color:var(--black)}
.spd-guarantee-text span{font-size:11px;color:var(--text-muted)}

/* ── RATING + TITLE + PRICE ── */
.spd-rating-row{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.spd-rating-row .star-rating{color:var(--gold);font-size:14px;float:none!important}
.spd-rating-row .woocommerce-review-link{font-size:13px;color:var(--text-muted)}
.spd-stars{color:var(--gold);font-size:14px}
.spd-no-reviews{font-size:13px;color:var(--text-muted)}
.spd-product-title{font-family:var(--font-display);font-size:32px;font-weight:800;color:var(--black);line-height:1.15;margin:0 0 14px}
.spd-price-row{display:flex;align-items:baseline;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.spd-price-display .woocommerce-Price-amount{font-family:var(--font-display);font-size:28px;font-weight:800;color:var(--black)}
.spd-price-per-mg{font-size:13px;color:var(--text-muted);font-weight:500}

/* ── QUICK TABS ── */
.spd-quick-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.spd-quick-tab{font-size:12px;font-weight:500;padding:6px 14px;border:1.5px solid var(--gray-border);border-radius:30px;background:#fff;color:var(--text-body);cursor:pointer;transition:all .2s;line-height:1.4}
.spd-quick-tab:hover{border-color:var(--navy);color:var(--navy)}
.spd-divider{height:1px;background:var(--gray-border);margin:16px 0}

/* ── FORM WRAP: KEY FIX — display:contents on form keeps button inside form
   but allows flex ordering of pills → bundle → purchase-options → ATC ── */
.spd-form-wrap{display:flex;flex-direction:column}
.spd-form-wrap form.cart{display:contents!important}
.spd-form-wrap table.variations{display:none!important;order:0}
.spd-form-wrap .reset_variations{display:none!important}
.spd-form-wrap .woocommerce-variation-description{display:none!important}
.spd-form-wrap .woocommerce-variation-price{display:none!important}
.spd-form-wrap .woocommerce-variation-availability{order:35}
.spd-form-wrap .quantity{display:none!important}

/* Flex ordering of product form elements */
.spd-pill-wrap{order:10}
.spd-bundle-wrap{order:20}
.spd-purchase-options{order:30}
.spd-form-wrap .single_variation_wrap{order:40;display:flex;flex-direction:column}
.spd-form-wrap .woocommerce-variation-add-to-cart{order:40;margin:0}
/* Simple product (no variations) */
.spd-form-wrap form.cart > .quantity{display:none!important}

/* ── PILLS ── */
.spd-pill-label{font-size:13px;font-weight:700;color:var(--black);margin-bottom:10px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.spd-pill-label-key{font-weight:700}
.spd-pill-label-val{font-weight:500;color:var(--text-muted)}
.spd-strength-desc{font-size:12px;color:var(--text-muted);font-weight:400}
.spd-pill-group{display:flex;flex-wrap:wrap;gap:8px}
.spd-pill{font-size:13px;font-weight:600;padding:9px 20px;border-radius:60px;border:2px solid var(--gray-border);background:#fff;color:var(--black);cursor:pointer;transition:all .18s;line-height:1}
.spd-pill:hover{border-color:var(--navy)}
.spd-pill.selected{border-color:var(--navy);background:var(--navy);color:#fff}
.spd-pill.oos{opacity:.38;cursor:not-allowed;text-decoration:line-through}

/* ── BUNDLE CARDS ── */
.spd-bundle-group{display:flex;gap:10px}
.spd-bundle-card{flex:1;border:2px solid var(--gray-border);border-radius:14px;padding:14px 10px;text-align:center;cursor:pointer;transition:all .2s;background:#fff;min-width:0}
.spd-bundle-card:hover{border-color:var(--navy)}
.spd-bundle-card.selected{border-color:var(--navy);background:#e8f4f8}
.spd-bundle-card.oos{opacity:.4;cursor:not-allowed}
.spd-bundle-icons{font-size:22px;margin-bottom:6px;line-height:1}
.spd-bundle-name{font-size:12px;font-weight:800;color:var(--black);text-transform:uppercase;letter-spacing:.5px}
.spd-bundle-servings{font-size:11px;color:var(--text-muted);margin-top:3px}

/* ── ADD TO CART BUTTON ── */
.spd-form-wrap .single_add_to_cart_button{display:block!important;width:100%!important;background:#2D6A36!important;color:#fff!important;border:none!important;border-radius:var(--radius-pill)!important;padding:17px 32px!important;font-family:var(--font-display)!important;font-size:17px!important;font-weight:700!important;cursor:pointer!important;text-transform:uppercase;letter-spacing:.5px;margin:16px 0 0;transition:background .2s,transform .15s!important;text-align:center}
.spd-form-wrap .single_add_to_cart_button:hover{background:#235228!important;transform:translateY(-2px)!important;box-shadow:0 6px 20px rgba(45,106,54,.35)!important}
.spd-form-wrap .single_add_to_cart_button:disabled,.spd-form-wrap .single_add_to_cart_button.disabled{opacity:.55;cursor:not-allowed;transform:none!important}
.spd-form-wrap .single_add_to_cart_button.loading::after{border-color:#fff transparent #fff transparent}

/* ── PURCHASE OPTIONS ── */
.spd-purchase-options{margin:20px 0 4px}
.spd-option{border:2px solid var(--gray-border);border-radius:14px;padding:14px 16px;margin-bottom:10px;cursor:pointer;transition:border-color .2s,background .2s;position:relative;overflow:hidden;background:#fff}
.spd-option:hover{border-color:#ccc}
.spd-option-subscribe.selected{border-color:#e87070;background:#fdf5f4}
.spd-option-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.spd-option-label{display:flex;align-items:center;gap:10px;cursor:pointer;flex:1}
.spd-option-name{font-size:14px;font-weight:600;color:var(--black)}
.spd-radio-dot{width:20px;height:20px;border-radius:50%;border:2.5px solid var(--gray-border);flex-shrink:0;transition:all .18s;background:#fff}
.spd-radio-dot.selected{border-color:#e87070;background:#e87070;box-shadow:inset 0 0 0 4px #fff}
.spd-option-prices{display:flex;align-items:center;gap:8px}
.spd-option-prices del .woocommerce-Price-amount{font-size:13px;color:var(--text-muted)}
.spd-option-prices strong .woocommerce-Price-amount{font-size:16px;font-weight:800;color:var(--black)}
.spd-price-onetime .woocommerce-Price-amount{font-size:16px;font-weight:700;color:var(--black)}
.spd-best-deal-tag{position:absolute;top:0;right:0;background:var(--navy);color:#fff;font-size:10px;font-weight:700;padding:5px 12px;border-bottom-left-radius:10px;letter-spacing:.5px;text-transform:uppercase}
.spd-sub-body{padding-top:14px}
.spd-freq-wrap{position:relative;margin-bottom:12px}
.spd-freq-select{width:100%;padding:11px 36px 11px 14px;border:1.5px solid var(--gray-border);border-radius:8px;font-size:13px;color:var(--black);background:#fff;appearance:none;-webkit-appearance:none;cursor:pointer;outline:none;font-family:inherit}
.spd-freq-select:focus{border-color:var(--navy)}
.spd-freq-chevron{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:10px;color:var(--text-muted);pointer-events:none}
.spd-sub-perks{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px}
.spd-perk{font-size:12px;color:var(--text-body);display:flex;align-items:center;gap:5px}
.spd-perk-check{color:var(--green-primary);font-weight:700;font-size:13px}

/* ── TRUST STRIP ── */
.spd-trust-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:18px 0;padding:14px;background:var(--gray-bg);border-radius:12px}
.spd-trust-item{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--text-body);text-align:center}
.spd-trust-item span:first-child{font-size:20px}

/* ── HIGHLIGHTS ── */
.spd-highlights{border:1px solid var(--gray-border);border-radius:16px;padding:20px;margin-top:8px}
.spd-hl-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.spd-hl-item{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:12px 8px;background:var(--gray-bg);border-radius:10px}
.spd-hl-icon{font-size:22px}
.spd-hl-text{font-size:11px;font-weight:600;color:var(--black);line-height:1.3}

/* ── TABS SECTION ── */
.spd-tabs-section{border-top:2px solid var(--gray-border);margin-bottom:64px}
.spd-tabs-nav{display:flex;border-bottom:1px solid var(--gray-border);overflow-x:auto;scrollbar-width:none}
.spd-tabs-nav::-webkit-scrollbar{display:none}
.spd-tab-btn{font-size:14px;font-weight:600;color:var(--text-muted);padding:16px 24px;border:none;background:none;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-1px;transition:color .2s,border-color .2s;white-space:nowrap}
.spd-tab-btn:hover{color:var(--black)}
.spd-tab-btn.active{color:var(--black);border-bottom-color:var(--green-primary)}
.spd-tab-panel{display:none;padding:32px 0}
.spd-tab-panel.active{display:block}
.spd-tab-content{font-size:15px;line-height:1.8;color:var(--text-body);max-width:820px}
.spd-tab-content h2,.spd-tab-content h3{font-weight:700;color:var(--black);margin:16px 0 10px}
.spd-tab-content ul,.spd-tab-content ol{padding-left:20px;margin-bottom:16px}
.spd-tab-content li{margin-bottom:6px}
.spd-faq-list{max-width:820px}
.spd-faq-item{border-bottom:1px solid var(--gray-border)}
.spd-faq-q{width:100%;text-align:left;padding:18px 0;font-size:15px;font-weight:700;color:var(--black);background:none;border:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:16px}
.spd-faq-icon{font-size:20px;font-weight:400;color:var(--text-muted);transition:transform .2s;flex-shrink:0}
.spd-faq-item.open .spd-faq-icon{transform:rotate(45deg)}
.spd-faq-a{display:none;padding:0 0 18px;font-size:14px;line-height:1.7;color:var(--text-body)}
.spd-faq-item.open .spd-faq-a{display:block}
.spd-related-wrap{border-top:1px solid var(--gray-border);padding-top:48px}
.spd-related-wrap .related.products h2{font-size:26px;font-weight:800;margin-bottom:24px}

/* ── RESPONSIVE ── */
@media(max-width:900px){
  .spd-layout{grid-template-columns:1fr;gap:28px}
  .spd-gallery-sticky{position:static}
  .spd-hl-grid{grid-template-columns:repeat(2,1fr)}
  .spd-trust-strip{grid-template-columns:repeat(2,1fr)}
  .spd-sub-perks{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .spd-product-title{font-size:24px}
  .spd-tab-btn{padding:12px 16px;font-size:13px}
  .spd-trust-bar{padding:8px 16px;font-size:12px}
  .spd-sub-perks{grid-template-columns:1fr 1fr}
}