/*
 * Product buy box: set / size picker, price, EMI, highlights, pincode, qty + cart + wishlist,
 * bulk + WhatsApp. Shared by includes/catalog/sofa-detail.php and product-detail.php.
 */
.sb, .sb-box { color: #1f1b18; }
.sb *, .sb-box * { box-sizing: border-box; }

/* sofa page: set picker (left) + buy box (right) */
.sb { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; margin: 40px 0 56px; }
.sb h2.sb-h { margin: 0 0 6px; font-size: 22px; font-weight: 600; text-transform: none; color: #1f1b18; }
.sb-sub { margin: 0 0 20px; font-size: 13.5px; color: #6b635c; }

/* set / size chips */
.sb-label { display: block; margin: 20px 0 8px; font-size: 13px; font-weight: 600; color: #1f1b18; }
.sb-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sb-box .sb-sets { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.sb-set input { position: absolute; opacity: 0; pointer-events: none; }
.sb-set label, a.sb-set-link { position: relative; display: flex; flex-direction: column; gap: 3px; height: 100%; margin: 0; padding: 14px 14px 12px; border: 1.5px solid #e4ddd6; border-radius: 12px; background: #fff; color: #1f1b18; text-decoration: none !important; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.sb-set label:hover, a.sb-set-link:hover { border-color: #b9aea4; }
.sb-set b { font-size: 14px; font-weight: 600; color: #1f1b18; }
.sb-set span { font-size: 13px; color: #6b635c; }
.sb-set input:checked + label, .sb-set-link.on { border-color: #641614; background: #fbf5f1; box-shadow: 0 0 0 3px rgba(100, 22, 20, .1); pointer-events: none; }
.sb-set input:checked + label { pointer-events: auto; }
.sb-set input:checked + label::after, .sb-set-link.on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: #641614 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/10px no-repeat; }
.sb-set input:focus-visible + label { outline: 2px solid #641614; outline-offset: 2px; }

/* buy box — flat: no border, no shadow */
.sb-box { position: sticky; top: 90px; padding: 0; border: 0; background: none; box-shadow: none; }
.sb-box h1.sb-title { margin: 0 0 6px; padding: 0; border: 0; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: 0; text-transform: none !important; color: #1f1b18; }
.sb-rating { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13px; color: #6b635c; }
.sb-rating .stars { color: #f5a623; letter-spacing: 1px; font-size: 14px; }
.sb-rating a { color: #6b635c; text-decoration: underline; text-underline-offset: 2px; }
.sb-chosen { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #641614; }
.sb-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sb-price strong { font-size: 32px; font-weight: 700; line-height: 1.1; color: #1f1b18; }
.sb-price s { font-size: 16px; color: #8c847c; }
.sb-price .sb-off { padding: 2px 8px; border-radius: 20px; background: #e6f4ec; color: #1f7a4d; font-size: 12.5px; font-weight: 700; }
.sb-price small { width: 100%; font-size: 13px; color: #6b635c; text-transform: none; }
.sb-box .emi-box { margin: 10px 0 0; font-size: 13.5px; }

.sb-hl { list-style: none; display: grid; gap: 8px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid #f0ebe6; }
.sb-hl li { position: relative; padding-left: 28px; font-size: 13.5px; line-height: 20px; color: #3a3430; text-transform: none; }
.sb-hl li::first-letter { text-transform: uppercase; }
.sb-hl li::before { content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: #e6f4ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat; }
.sb-hl .sb-hsn { padding-left: 0; font-size: 12px; color: #8c847c; }
.sb-hl .sb-hsn::before { display: none; }
.sb-specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: 12.5px; color: #8c847c; }
.sb-specs dt { font-weight: 600; color: #6b635c; }
.sb-specs dd { margin: 0; }
.sb-delivery { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: #faf6f2; font-size: 13.5px; color: #3a3430; }
.sb-delivery svg { flex: none; width: 22px; height: 22px; color: #641614; }

.sb-pin { display: flex; gap: 8px; }
.sb-pin input { flex: 1; min-width: 0; height: 44px; margin: 0; padding: 0 14px; border: 1px solid #ddd5cd; border-radius: 10px; font-size: 14px; box-shadow: none; }
.sb-pin input:focus { outline: 0; border-color: #641614; box-shadow: 0 0 0 3px rgba(100, 22, 20, .12); }
.sb-pin button { flex: none; height: 44px; padding: 0 18px; border: 1px solid #1f1b18; border-radius: 10px; background: #fff; color: #1f1b18; font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.sb-pin button:hover { background: #1f1b18; color: #fff; }
#pincode-result { margin-top: 6px; font-size: 13px; }

.sb-buy { display: flex; gap: 10px; margin-top: 20px; }
.sb-qty { flex: none; display: flex; align-items: center; height: 50px; border: 1px solid #ddd5cd; border-radius: 10px; overflow: hidden; }
.sb-qty button { width: 36px; height: 100%; border: 0; background: #faf7f4; font-size: 18px; color: #1f1b18; cursor: pointer; padding: 0; }
.sb-qty button:hover { background: #f0ebe6; }
.sb-qty input { width: 38px; height: 100%; margin: 0; padding: 0; border: 0; text-align: center; font-size: 15px; font-weight: 600; box-shadow: none; }
.sb-cart { flex: 1; min-width: 0; height: 50px; border: 0; border-radius: 10px; background: #1f1b18; color: #fff; font-size: 13.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.sb-cart:hover { background: #641614; }
.sb-na { flex: 1; display: grid; place-items: center; height: 50px; margin: 0; border-radius: 10px; background: #f1ede8; color: #6b635c; font-weight: 600; }
.sb-wish { flex: none; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1px solid #ddd5cd; border-radius: 10px; background: #fff; cursor: pointer; }
.sb-wish:hover { border-color: #1f1b18; }
.sb-wish img { width: 22px; height: auto; }

.sb-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.sb-more a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1px solid #641614; border-radius: 10px; color: #641614 !important; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: background .15s, color .15s; }
.sb-more a:hover { background: #641614; color: #fff !important; }
.sb-more a.sb-wa { border-color: #1f7a4d; color: #1f7a4d !important; }
.sb-more a.sb-wa:hover { background: #1f7a4d; color: #fff !important; }

@media (max-width: 991px) { .sb { grid-template-columns: 1fr; gap: 24px; } .sb-box { position: static; } }
@media (max-width: 767px) { .sb { padding: 0 12px; margin-top: 28px; } .sb-box h1.sb-title { font-size: 23px; } }
@media (max-width: 480px) {
    .sb-sets, .sb-box .sb-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sb-price strong { font-size: 28px; }
    .sb-more { grid-template-columns: 1fr; }
}
