/* =====================================================================
   bags_backpack — WooCommerce theme styles
   โทนสี: เขียวเข้ม #2E4636 · พื้น #F3F0E9 · การ์ด #FCFBF7 · น้ำตาล #A86A4B · แดงลด #B5564B
   ฟอนต์: IBM Plex Sans Thai (เนื้อหา) · Noto Serif Thai (หัวข้อ)
   ===================================================================== */

:root{
  --green:#2E4636; --green-2:#243A2C; --green-soft:#3C5A47;
  --paper:#F3F0E9; --card:#FCFBF7; --line:#ECE6DA; --line-2:#E2DCD0;
  --ink:#26261F; --ink-2:#1F2F25; --muted:#6B6A60; --muted-2:#9C9484;
  --brown:#A86A4B; --red:#B5564B; --cream:#EDEAE0;
}

*{box-sizing:border-box;}
html{ -webkit-text-size-adjust:100%; }
body.bb{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:'IBM Plex Sans Thai',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:15px; line-height:1.5; min-height:100vh;
}
body.bb a{ color:inherit; }
.bb-serif{ font-family:'Noto Serif Thai',serif; }
img{ max-width:100%; height:auto; }

/* placeholder รูป */
.bb-ph{ background-image:repeating-linear-gradient(45deg,#E7E1D3 0 11px,#E1DACA 11px 22px); display:flex; align-items:flex-end; justify-content:flex-start; position:relative; }
.bb-ph__l{ font-family:ui-monospace,monospace; font-size:10px; letter-spacing:.04em; color:var(--muted-2); background:rgba(252,251,247,.78); padding:3px 6px; margin:8px; border-radius:2px; }

input,select,textarea,button{ font-family:'IBM Plex Sans Thai',sans-serif; }
input:focus,select:focus,textarea:focus{ outline:2px solid var(--green); outline-offset:1px; }
::placeholder{ color:#A29C8E; }

/* ===================== HEADER ===================== */
.bb-header{ position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:20px; padding:16px 32px; background:var(--green); color:var(--cream); }
.bb-brand{ display:flex; align-items:baseline; gap:10px; flex-shrink:0; text-decoration:none; color:var(--cream); }
.bb-brand__name{ font-family:'Noto Serif Thai',serif; font-size:24px; font-weight:600; letter-spacing:.01em; }
.bb-brand__tag{ font-size:12px; color:#A8C2AE; letter-spacing:.02em; }
.bb-search{ flex:1; max-width:480px; display:flex; align-items:center; gap:10px; background:rgba(255,255,255,.12); border-radius:999px; padding:8px 18px; }
.bb-search__i{ opacity:.7; }
.bb-search input{ flex:1; min-width:0; border:none; background:transparent; color:var(--cream); font-size:14px; }
.bb-spacer{ flex:1; }
.bb-nav{ display:flex; align-items:center; gap:20px; }
.bb-nav a{ text-decoration:none; color:var(--cream); font-size:14px; display:flex; align-items:center; gap:6px; }
.bb-nav a .plus{ font-size:16px; }
.bb-cart{ text-decoration:none; color:var(--cream); border:1px solid rgba(255,255,255,.4); padding:8px 16px; border-radius:999px; font-size:13px; flex-shrink:0; white-space:nowrap; }
.bb-menu-btn{ display:none; align-items:center; justify-content:center; width:40px; height:40px; border-radius:10px; border:1px solid rgba(255,255,255,.35); cursor:pointer; font-size:20px; flex-shrink:0; color:var(--cream); background:transparent; }
.bb-mobile-menu{ display:none; background:var(--green-2); color:var(--cream); padding:8px 16px 14px; flex-direction:column; }
.bb-mobile-menu a{ text-decoration:none; color:var(--cream); font-size:15px; padding:12px 4px; border-bottom:1px solid rgba(255,255,255,.12); }
.bb-mobile-menu a:last-child{ border-bottom:none; }
.bb-mobile-menu.open{ display:flex; }

/* ===================== HOME ===================== */
.bb-home{ max-width:920px; margin:0 auto; padding:56px 32px 84px; }
.bb-home__top{ display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; margin-bottom:48px; }
.bb-eyebrow{ font-family:ui-monospace,monospace; font-size:12px; letter-spacing:.18em; color:var(--muted-2); }
.bb-btn{ display:inline-block; border:none; cursor:pointer; background:var(--green); color:#fff; padding:12px 26px; border-radius:999px; font-size:14px; font-weight:600; text-decoration:none; }
.bb-home__title{ font-family:'Noto Serif Thai',serif; font-size:52px; font-weight:600; line-height:1.16; color:var(--ink-2); max-width:680px; text-wrap:balance; }
.bb-home__sub{ font-size:16px; color:var(--muted); margin:20px 0 0; max-width:480px; line-height:1.65; }
.bb-catlist{ margin-top:52px; border-top:1px solid #DAD3C4; }
.bb-catrow{ display:flex; align-items:center; justify-content:space-between; gap:18px; padding:24px 6px; border-bottom:1px solid #DAD3C4; cursor:pointer; text-decoration:none; color:inherit; transition:padding .18s ease, background .18s ease; }
.bb-catrow:hover{ background:#ECE7DB; padding-left:20px; padding-right:20px; }
.bb-catrow__l{ display:flex; align-items:baseline; gap:20px; min-width:0; }
.bb-catrow__num{ font-family:ui-monospace,monospace; font-size:13px; color:var(--brown); flex-shrink:0; }
.bb-catrow__name{ font-family:'Noto Serif Thai',serif; font-size:30px; font-weight:600; color:var(--ink-2); line-height:1.1; }
.bb-catrow__r{ display:flex; align-items:center; gap:18px; flex-shrink:0; }
.bb-catrow__count{ font-size:13px; color:var(--muted-2); }
.bb-catrow__arrow{ font-size:22px; color:var(--green); }

/* ===================== SHOP ===================== */
.bb-shop{ display:flex; max-width:1280px; margin:0 auto; }
.bb-sidebar{ width:248px; flex-shrink:0; padding:30px 26px; border-right:1px solid var(--line-2); }
.bb-sb__h{ font-size:12px; letter-spacing:.1em; color:var(--muted-2); margin-bottom:14px; }
.bb-sb__rule{ height:1px; background:var(--line-2); margin:24px 0; }
.bb-sb__cats{ display:flex; flex-direction:column; gap:2px; }
.bb-sb__cat{ display:flex; justify-content:space-between; text-decoration:none; color:#54534A; padding:8px 12px; margin:0 -12px; border-radius:7px; font-size:14px; }
.bb-sb__cat:hover{ background:#EBE6DA; }
.bb-sb__cat.active{ background:var(--green); color:#fff; font-weight:600; }
.bb-sb__cat .c{ color:var(--muted-2); }
.bb-sb__cat.active .c{ color:#fff; opacity:.7; }
.bb-sb__checks{ display:flex; flex-direction:column; gap:11px; }
.bb-check{ display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; color:#54534A; }
.bb-check input{ display:none; }
.bb-check .box{ width:18px; height:18px; border-radius:4px; border:1.5px solid #C9C2B2; display:flex; align-items:center; justify-content:center; font-size:12px; color:transparent; flex-shrink:0; }
.bb-check input:checked + .box{ background:var(--green); border-color:var(--green); color:#fff; }
.bb-sb__brands{ max-height:240px; overflow:auto; }
.bb-range{ width:100%; accent-color:var(--green); }
.bb-range-val{ font-size:14px; color:#54534A; margin-top:8px; }
.bb-apply{ width:100%; margin-top:18px; border:none; cursor:pointer; background:var(--green); color:#fff; padding:11px; border-radius:9px; font-size:14px; font-weight:600; }

.bb-grid-wrap{ flex:1; padding:26px 30px 60px; min-width:0; }
.bb-grid-top{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:20px; }
.bb-grid-top__l{ display:flex; align-items:center; gap:12px; }
.bb-count{ font-size:14px; color:var(--muted); }
.bb-sort{ border:1px solid #D7D0C0; background:var(--card); border-radius:8px; padding:8px 12px; font-size:13px; color:#54534A; }
.bb-filter-toggle{ display:none; align-items:center; gap:7px; border:1px solid var(--green); color:var(--green); padding:8px 14px; border-radius:999px; font-size:13px; font-weight:600; cursor:pointer; background:transparent; }

.bb-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:22px; }
.bb-card{ background:var(--card); border:1px solid var(--line); border-radius:7px; overflow:hidden; text-decoration:none; color:inherit; display:block; transition:box-shadow .18s ease, transform .18s ease; }
.bb-card:hover{ box-shadow:0 6px 20px rgba(31,47,37,.10); transform:translateY(-2px); }
.bb-card__img{ aspect-ratio:4/5; position:relative; }
.bb-card__img img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.bb-badges{ position:absolute; top:10px; left:10px; display:flex; flex-direction:column; gap:5px; align-items:flex-start; z-index:1; }
.bb-badge{ font-size:11px; padding:3px 9px; border-radius:999px; }
.bb-badge--rec{ background:var(--green); color:#fff; }
.bb-badge--sale{ background:var(--red); color:#fff; }
.bb-badge--feat{ background:rgba(252,251,247,.94); color:var(--ink-2); border:1px solid var(--line-2); }
.bb-cond{ position:absolute; top:10px; right:10px; background:rgba(31,47,37,.82); color:#fff; font-size:10px; padding:3px 8px; border-radius:999px; z-index:1; }
.bb-card__body{ padding:13px 14px 15px; }
.bb-card__brand{ font-size:16px; letter-spacing:.06em; color:var(--brown); }
.bb-card__title{ font-size:13px; margin:4px 0 9px; color:var(--ink); line-height:1.35; }
.bb-price{ font-weight:700; color:var(--ink-2); font-size:18px; }
.bb-price-row{ display:flex; align-items:baseline; gap:8px; }
.bb-price--sale{ font-weight:700; color:var(--red); font-size:18px; }
.bb-price__orig{ font-size:16px; color:var(--muted-2); text-decoration:line-through; }
.bb-empty{ padding:80px 0; text-align:center; color:var(--muted-2); }
.bb-empty__ic{ font-size:40px; margin-bottom:14px; }
.bb-pagination{ margin-top:34px; }
.bb-pagination .page-numbers{ display:inline-flex; min-width:38px; height:38px; align-items:center; justify-content:center; padding:0 10px; margin:0 3px; border-radius:8px; border:1px solid var(--line-2); text-decoration:none; color:#54534A; font-size:14px; }
.bb-pagination .page-numbers.current{ background:var(--green); color:#fff; border-color:var(--green); }

/* ===================== SINGLE PRODUCT ===================== */
.bb-detail{ max-width:1080px; margin:0 auto; padding:24px 32px 70px; }
.bb-detail__bar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.bb-back{ text-decoration:none; color:var(--muted); font-size:14px; cursor:pointer; }
.bb-editlink{ text-decoration:none; display:flex; align-items:center; gap:8px; border:1px solid #D7D0C0; background:var(--card); color:#54534A; padding:8px 16px; border-radius:999px; font-size:13px; }
.bb-editlink:hover{ background:#ECE7DB; border-color:var(--green); color:var(--green); }
.bb-detail__cols{ display:flex; gap:48px; flex-wrap:wrap; }
.bb-gallery{ flex:1 1 420px; min-width:300px; }
.bb-gallery__main{ aspect-ratio:4/5; border-radius:8px; position:relative; overflow:hidden; }
.bb-gallery__main img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:8px; }
.bb-gallery__nav{ position:absolute; top:50%; transform:translateY(-50%); width:42px; height:42px; border-radius:999px; background:rgba(252,251,247,.92); color:var(--ink-2); display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:20px; box-shadow:0 2px 10px rgba(31,47,37,.18); border:none; }
.bb-gallery__nav:hover{ background:#fff; }
.bb-gallery__nav.prev{ left:12px; } .bb-gallery__nav.next{ right:12px; }
.bb-gallery__count{ position:absolute; bottom:12px; left:50%; transform:translateX(-50%); background:rgba(31,47,37,.78); color:var(--cream); font-size:12px; padding:3px 12px; border-radius:999px; }
.bb-thumbs{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.bb-thumb{ width:68px; height:68px; border-radius:6px; overflow:hidden; cursor:pointer; border:2px solid transparent; opacity:.7; padding:0; background:none; }
.bb-thumb img{ width:100%; height:100%; object-fit:cover; }
.bb-thumb.active{ border-color:var(--green); opacity:1; }
.bb-info{ flex:1 1 360px; min-width:300px; }
.bb-info__brand{ font-size:30px; letter-spacing:.08em; color:var(--brown); margin-bottom:8px; }
.bb-info__title{ font-family:'Noto Serif Thai',serif; font-size:24px; font-weight:600; line-height:1.25; color:var(--ink-2); }
.bb-info__badges{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:16px 0; }
.bb-info__badges .bb-badge{ font-size:12px; padding:4px 12px; }
.bb-info__meta{ font-size:13px; color:var(--muted-2); margin-bottom:16px; }
.bb-info__price{ font-size:30px; font-weight:700; color:var(--ink-2); margin-bottom:8px; }
.bb-info__price.sale{ color:var(--red); }
.bb-info__pricerow{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin-bottom:8px; }
.bb-info__orig{ font-size:19px; color:var(--muted-2); text-decoration:line-through; }
.bb-info__save{ background:var(--red); color:#fff; font-size:13px; font-weight:600; padding:3px 11px; border-radius:999px; }
.bb-actions{ display:flex; gap:12px; margin:24px 0 28px; flex-wrap:wrap; }
.bb-actions form.cart{ flex:1; min-width:180px; margin:0; }
.bb-add{ width:100%; border:none; cursor:pointer; background:var(--green); color:#fff; padding:15px; border-radius:10px; font-size:15px; font-weight:600; }
.bb-add--ghost{ border:1px solid var(--green); cursor:pointer; background:transparent; color:var(--green); padding:15px 22px; border-radius:10px; font-size:15px; text-decoration:none; display:flex; align-items:center; }
/* ปุ่มหยิบใส่ตะกร้าของ WooCommerce ในหน้าสินค้า */
.bb-actions form.cart{ display:flex; gap:10px; align-items:center; }
.bb-actions .quantity input.qty{ width:64px; height:50px; border:1px solid #D7D0C0; border-radius:10px; text-align:center; font-size:15px; background:var(--card); }
.bb-actions .single_add_to_cart_button,.bb-actions button.single_add_to_cart_button{ flex:1; border:none!important; cursor:pointer; background:var(--green)!important; color:#fff!important; padding:15px!important; border-radius:10px!important; font-size:15px!important; font-weight:600!important; line-height:1!important; box-shadow:none!important; }
.bb-desc{ font-size:14px; line-height:1.7; color:#54534A; white-space:pre-wrap; }
.bb-info__rule{ height:1px; background:var(--line-2); margin:26px 0; }
.bb-contact-h{ font-size:12px; letter-spacing:.1em; color:var(--muted-2); margin-bottom:12px; }
.bb-contacts{ display:flex; gap:10px; flex-wrap:wrap; }
.bb-contact{ text-decoration:none; display:flex; align-items:center; gap:8px; color:#fff; padding:11px 18px; border-radius:9px; font-size:14px; font-weight:600; }
.bb-contact--line{ background:#06C755; } .bb-contact--fb{ background:#1877F2; } .bb-contact--ig{ background:#C9367E; }
.bb-contact--shopee{ background:#EE4D2D; } .bb-contact--other{ background:#54534A; }

/* WooCommerce default pages (cart/checkout/account) inside our shell */
.bb-wc{ max-width:1080px; margin:0 auto; padding:30px 32px 70px; }
.bb-wc h1.entry-title,.bb-wc .woocommerce-products-header__title{ font-family:'Noto Serif Thai',serif; color:var(--ink-2); font-weight:600; }
.bb-wc .button,.bb-wc button.button,.bb-wc a.button,.bb-wc .wc-block-components-button{ background:var(--green)!important; color:#fff!important; border-radius:9px!important; }
.woocommerce-message,.woocommerce-info,.woocommerce-error{ border-top-color:var(--green)!important; }

/* ===================== FOOTER ===================== */
.bb-footer{ background:var(--green); color:var(--cream); padding:40px 32px; margin-top:30px; }
.bb-footer__in{ max-width:1080px; margin:0 auto; display:flex; flex-wrap:wrap; gap:24px; justify-content:space-between; align-items:center; }
.bb-footer__name{ font-family:'Noto Serif Thai',serif; font-size:22px; font-weight:600; }
.bb-footer__tag{ font-size:13px; color:#A8C2AE; margin-top:4px; }
.bb-footer__contacts{ display:flex; gap:10px; flex-wrap:wrap; }
.bb-footer__note{ max-width:1080px; margin:18px auto 0; font-size:12px; color:#A8C2AE; }

/* ===================== RESPONSIVE ===================== */
@media (max-width:760px){
  .bb-header{ flex-wrap:wrap; gap:12px; row-gap:12px; padding:12px 16px; }
  .bb-search{ order:10; flex-basis:100%; max-width:none; padding:10px 16px; }
  .bb-nav{ display:none; }
  .bb-menu-btn{ display:flex; }
  .bb-home{ padding:40px 20px 60px; }
  .bb-home__title{ font-size:38px; }
  .bb-catrow__name{ font-size:23px; }
  .bb-shop{ display:block; }
  .bb-sidebar{ display:none; width:100%; border-right:none; }
  .bb-sidebar.open{ display:block; position:fixed; top:0; left:0; bottom:0; width:284px; max-width:86vw; background:var(--paper); z-index:46; padding:22px 22px 40px; overflow:auto; box-shadow:0 0 40px rgba(0,0,0,.3); }
  .bb-backdrop{ position:fixed; inset:0; z-index:45; background:rgba(31,47,37,.45); display:none; }
  .bb-backdrop.open{ display:block; }
  .bb-grid-wrap{ padding:16px 16px 50px; }
  .bb-filter-toggle{ display:flex; }
  .bb-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .bb-detail__cols{ gap:28px; }
  .bb-sb__close{ display:flex; }
}
.bb-sb__close{ display:none; align-items:center; justify-content:center; width:34px; height:34px; border-radius:999px; border:1px solid #D7D0C0; font-size:16px; cursor:pointer; background:none; float:right; }
