:root{--blue:#0d6efd;--deep:#0b4fc7;--ink:#172033;--soft:#f5f8ff}*{box-sizing:border-box}body{margin:0;background:#f5f8fc;color:var(--ink);font-family:"Sarabun",system-ui,-apple-system,"Segoe UI",sans-serif}.collection-navbar{z-index:1050}.navbar-brand img{height:46px;width:auto}.collection-cart-badge{position:absolute;top:-8px;right:-8px;display:grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border:2px solid #fff;border-radius:999px;background:#dc3545;color:#fff;font-size:.7rem;font-weight:800}.collection-hero{background:linear-gradient(145deg,#edf4ff,#fff)}.collection-hero nav a{color:#5374a8;text-decoration:none}.collection-hero-card{display:grid;grid-template-columns:minmax(280px,42%) minmax(0,1fr);overflow:hidden;border:1px solid #dce8fb;border-radius:26px;background:#fff;box-shadow:0 20px 55px rgba(20,54,103,.12)}.collection-hero-image{min-height:360px;background:#edf2f7}.collection-hero-image img{width:100%;height:100%;object-fit:cover}.collection-hero-content{display:flex;flex-direction:column;justify-content:center;padding:clamp(24px,4vw,50px)}.collection-kicker{align-self:flex-start;padding:7px 12px;border-radius:999px;background:#e8f1ff;color:var(--deep);font-size:.82rem;font-weight:800}.collection-hero h1{margin:14px 0 12px;font-size:clamp(1.8rem,4vw,3rem);line-height:1.18;font-weight:800;letter-spacing:-.03em}.collection-hero p{margin:0;color:#516078;line-height:1.8}.collection-hero-meta{display:flex;flex-wrap:wrap;gap:9px 18px;margin-top:18px}.collection-hero-meta strong{color:var(--blue)}.collection-hero-meta span{color:#718096}.collection-share-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.share-pill{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid #dce3ee;border-radius:999px;background:#fff;color:#3d4b62;text-decoration:none;font-size:.82rem}.share-pill:hover{border-color:var(--blue);color:var(--blue)}.share-pill.facebook{color:#1877f2}.share-pill.line{color:#06c755}.collection-filter-card{padding:20px;border:1px solid #dce8fb;border-radius:20px;background:#fff;box-shadow:0 10px 30px rgba(20,54,103,.07)}.collection-filter-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:13px}.collection-filter-heading span{color:var(--blue);font-size:.76rem;font-weight:800}.collection-filter-heading h2{margin:2px 0 0;font-size:1.25rem;font-weight:800}.collection-result-note{margin-top:11px;color:#607089;font-size:.82rem}.collection-product-item{display:flex}.collection-product-card{display:flex;flex-direction:column;width:100%;overflow:hidden;border:1px solid #dde5f0;border-radius:18px;background:#fff;box-shadow:0 10px 26px rgba(20,54,103,.08);transition:.2s}.collection-product-card:hover{transform:translateY(-3px);border-color:#abc8f5;box-shadow:0 16px 36px rgba(20,54,103,.13)}.collection-product-image{position:relative;display:block;overflow:hidden;aspect-ratio:4/3;background:#edf2f7}.collection-product-image img{width:100%;height:100%;object-fit:contain;transition:.25s}.collection-product-image>span{position:absolute;left:12px;right:12px;bottom:12px;padding:8px;border-radius:999px;background:rgba(13,79,199,.9);color:#fff;text-align:center;font-size:.8rem;font-weight:800;opacity:0;transform:translateY(5px);transition:.2s}.collection-product-image>b{position:absolute;right:10px;top:10px;display:grid;place-items:center;width:58px;height:58px;border:3px solid #fff;border-radius:50%;background:#ef233c;color:#fff;font-size:1.05rem;transform:rotate(5deg)}.collection-product-image:hover img{transform:scale(1.035);filter:brightness(.92)}.collection-product-image:hover>span{opacity:1;transform:none}.collection-product-body{display:flex;flex:1;flex-direction:column;padding:16px}.collection-product-cats{color:#748198;font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.collection-product-body h3{margin:5px 0 9px;font-size:1.02rem;line-height:1.42;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.collection-product-body h3 a{color:var(--ink);text-decoration:none}.collection-product-tags{display:flex;flex-wrap:wrap;gap:5px}.collection-product-tags span{padding:4px 7px;border-radius:999px;background:#edf4ff;color:#3967aa;font-size:.68rem}.collection-product-price{margin-top:auto;padding-top:13px;color:#dc3545;font-weight:800}.collection-product-actions{display:flex;gap:7px;margin-top:10px}.collection-product-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:.48rem .68rem;font-size:.78rem;font-weight:800}.collection-cart-btn{flex:1;background:#0d6efd;border-color:#0d6efd;color:#fff}.collection-cart-btn:hover{background:#0b5ed7;color:#fff}.collection-cart-btn:disabled{background:#e9f1ff;border-color:#c8dbfa;color:#3e67a8}.collection-buy-btn{background:#f97316;border-color:#f97316;color:#fff}.collection-buy-btn:hover{background:#ea580c;color:#fff}.collection-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:55px 20px;border:1px dashed #bdd0eb;border-radius:20px;background:#fff;color:#718096;text-align:center}.collection-empty i{font-size:2rem;color:#9ab3d6}.collection-empty strong{color:#3d4b62}.collection-toast{position:fixed;right:18px;bottom:18px;z-index:2000;max-width:min(360px,calc(100vw - 36px));padding:12px 16px;border-radius:12px;background:#172033;color:#fff;box-shadow:0 14px 36px rgba(0,0,0,.2);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.collection-toast.show{opacity:1;transform:none}@media(max-width:991.98px){.collection-hero-card{grid-template-columns:1fr}.collection-hero-image{min-height:0;aspect-ratio:16/8}.collection-hero-content{padding:26px}.collection-product-image>span{opacity:1;transform:none}}@media(max-width:575.98px){.navbar-brand img{height:40px}.collection-navbar .btn{padding:.4rem .52rem}.collection-navbar .btn:first-child{font-size:0}.collection-navbar .btn:first-child i{margin:0!important;font-size:1rem}.collection-hero-card{border-radius:20px}.collection-hero-image{aspect-ratio:16/10}.collection-hero-content{padding:20px}.collection-hero h1{font-size:1.65rem}.collection-filter-heading{align-items:start}.collection-product-body{padding:14px}.collection-product-image{aspect-ratio:16/11}}

/* Product cards use the same visual language as the homepage. */
.collection-product-item>.product-card{width:100%;overflow:hidden;border:1px solid #e5e7eb;border-radius:.75rem;background:#fff;transition:transform .12s ease-out,box-shadow .12s ease-out,border-color .12s ease-out}
.collection-product-item>.product-card:hover{transform:translateY(-3px);border-color:#d0d7e6;box-shadow:0 12px 28px rgba(24,54,94,.12)!important}
.product-image-link{position:relative;display:block;overflow:hidden;background:#eef3f8}
.product-card .card-img-top{display:block;width:100%;height:auto;max-height:none!important;aspect-ratio:1/1;object-fit:cover;object-position:center;background:#f3f4f6;transition:transform .25s ease,filter .25s ease}
.product-image-overlay{position:absolute;inset:auto 12px 12px;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 12px;border-radius:999px;background:rgba(13,79,199,.9);color:#fff;box-shadow:0 8px 22px rgba(0,0,0,.2);font-size:.9rem;font-weight:700;opacity:0;transform:translateY(8px);transition:opacity .2s ease,transform .2s ease;pointer-events:none}
.product-image-link:hover .card-img-top,.product-image-link:focus .card-img-top{transform:scale(1.035);filter:brightness(.9)}
.product-image-link:hover .product-image-overlay,.product-image-link:focus .product-image-overlay{opacity:1;transform:none}
.free-product-badge{position:absolute;z-index:2;top:13px;right:13px;display:grid;place-items:center;width:68px;height:68px;border:4px solid #fff;border-radius:50%;background:#e11d2e;color:#fff;box-shadow:0 9px 24px rgba(185,20,36,.36);font-size:1.42rem;font-weight:900;line-height:1;animation:collectionFreePulse 2.2s ease-in-out infinite;pointer-events:none}
@keyframes collectionFreePulse{0%,100%{transform:rotate(5deg) scale(1)}50%{transform:rotate(5deg) scale(1.08)}}
.product-card .card-body{padding:.9rem .9rem 1rem}.product-card .card-title{font-size:1.05rem;font-weight:700;letter-spacing:-.2px;line-height:1.25}.product-title-link{color:inherit;text-decoration:none}.product-title-link:hover,.product-title-link:focus{color:#0d6efd}
.product-desc{line-height:1.45;white-space:normal}.product-desc.line-clamp{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.desc-toggle{display:block;margin-top:.15rem;color:#0d6efd;font-size:.9rem;font-weight:600;text-align:right;text-decoration:none}.desc-toggle:hover{text-decoration:underline}
.ajk-price-badge{display:inline-block;padding:.28rem .65rem;border:2px solid #dc3545;border-radius:.65rem;background:#dc3545;color:#fff;font-size:1rem;font-weight:800;line-height:1}.ajk-price-badge.is-free{border-color:#198754;background:#198754}
.product-card .btn{font-size:.9rem}.collection-cart-btn{background:#0d6efd;border-color:#0d6efd;color:#fff;font-weight:700}.collection-cart-btn:hover,.collection-cart-btn:focus{background:#0b5ed7;border-color:#0a58ca;color:#fff}.collection-cart-btn.in-cart,.collection-cart-btn.in-cart:disabled{border-color:#ffd666!important;background:#ffe58f!important;color:#5c4b00!important;opacity:1}.collection-buy-btn{background:#f97316;border-color:#f97316;color:#fff;font-weight:800;box-shadow:0 6px 14px rgba(249,115,22,.22)}.collection-buy-btn:hover,.collection-buy-btn:focus{background:#ea580c;border-color:#ea580c;color:#fff}
@media(max-width:1024px),(hover:none) and (pointer:coarse){.product-image-overlay{inset:auto 10px 10px;opacity:1;transform:none}.free-product-badge{top:10px;right:10px;width:60px;height:60px;border-width:3px;font-size:1.24rem}}
@media(prefers-reduced-motion:reduce){.free-product-badge{animation:none;transform:rotate(5deg)}}
.mobile-product-preview{display:none}
@media(max-width:575.98px){
  #collectionProductGrid{--bs-gutter-y:.6rem}
  .collection-product-item>.product-card{display:grid;grid-template-columns:122px minmax(0,1fr);align-items:start;min-height:132px;border-radius:14px}
  .collection-product-item .product-image-link{width:112px;height:112px;margin:10px 0 10px 10px;border-radius:10px}
  .collection-product-item .product-card .card-img-top{width:112px;height:112px;aspect-ratio:1/1}
  .collection-product-item .product-card .card-body{min-width:0;padding:10px}
  .collection-product-item .product-card .card-title{display:-webkit-box;overflow:hidden;margin-bottom:3px!important;font-size:.88rem;font-weight:700;letter-spacing:-.2px;line-height:1.3;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .collection-product-item .product-card .card-body>.text-muted{overflow:hidden;margin-bottom:4px!important;font-size:.72rem;white-space:nowrap;text-overflow:ellipsis}
  .collection-product-item .product-desc-wrap{display:none}
  .collection-product-item .product-card .mb-3{margin-bottom:6px!important}
  .collection-product-item .ajk-price-badge{padding:.2rem .4rem;border-width:1px;border-radius:.45rem;font-size:.78rem}
  .collection-product-item .product-card-actions{display:flex!important;flex-wrap:nowrap;gap:5px!important;margin-top:0!important}
  .collection-product-item .product-card-actions .btn{display:inline-flex;align-items:center;justify-content:center;width:auto!important;min-width:0;min-height:31px;padding:.3rem .46rem;font-size:.72rem;line-height:1;white-space:nowrap}
  .collection-product-item .mobile-product-preview{display:inline-flex}
  .collection-product-item .product-card-actions [data-collection-add]{font-size:0;flex:1 1 0}
  .collection-product-item .product-card-actions [data-collection-add] i{font-size:.85rem}
  .collection-product-item .product-card-actions [data-collection-add]::after{content:'ตะกร้า';font-size:.72rem}
  .collection-product-item .product-card-actions [data-collection-add].in-cart::after{content:'มีแล้ว'}
  .collection-product-item .product-card-actions [data-collection-buy]{flex:1 1 0}
  .collection-product-item .product-card-actions .btn-success{flex:1 1 auto}
  .collection-product-item .product-card-actions a[href$="/member.php"]{display:none}
  .collection-product-item .product-image-overlay{display:none}
  .collection-product-item .free-product-badge{top:5px;right:5px;width:40px;height:40px;border-width:2px;font-size:.82rem}
}

/* Guided collection filters */
.collection-filter-heading{align-items:start}
.collection-filter-heading p{max-width:760px;margin:5px 0 0;color:#607089;font-size:.86rem;line-height:1.55}
.collection-optional{color:#8995a8;font-weight:400}
.collection-filter-feedback{margin-top:14px;padding:10px 12px;border:1px solid #d7e6ff;border-radius:10px;background:#f2f7ff;color:#315f9d;font-size:.84rem}
.collection-filter-feedback.is-error{border-color:#f2c76d;background:#fff8e8;color:#8a5b00}
.collection-filter-actions{display:flex;gap:9px;margin-top:11px}
.collection-filter-actions .btn{min-height:42px;font-weight:700}
.collection-filter-actions .btn:first-child{flex:1}
.collection-selection-prompt{display:flex;min-height:220px;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:28px;border:1px dashed #a9c5ed;border-radius:20px;background:#f8fbff;color:#607089;text-align:center}
.collection-selection-prompt i{font-size:2rem;color:var(--blue)}
.collection-selection-prompt strong{color:#244b81;font-size:1.08rem}
@media(max-width:575.98px){
  .collection-filter-card{padding:15px}
  .collection-filter-heading .btn{flex:0 0 auto}
  .collection-filter-actions{flex-direction:column}
  .collection-filter-actions .btn{width:100%}
  .collection-selection-prompt{min-height:170px}
}

.collection-filter-heading--centered{position:relative;display:block;padding:4px 140px 8px;text-align:center}
.collection-filter-heading--centered>div{width:100%}
.collection-filter-heading--centered h2{margin:0;color:#dc3545;font-size:clamp(1.45rem,2.6vw,2.05rem);line-height:1.3;font-weight:800}
.collection-filter-heading--centered p{max-width:none;margin:7px 0 0;color:#526b8e;font-size:.92rem}
.collection-filter-heading--centered>.btn{position:absolute;top:0;right:0}
.collection-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.collection-search-btn{min-width:150px;font-weight:700}
.collection-filter-actions--show-all{justify-content:flex-end}
.collection-filter-actions.collection-filter-actions--show-all .collection-show-all-btn:first-child{flex:0 0 auto;min-width:230px;border-color:#f97316;background:#f97316;color:#fff;box-shadow:0 7px 16px rgba(249,115,22,.22)}
.collection-filter-actions--show-all .collection-show-all-btn:hover,.collection-filter-actions--show-all .collection-show-all-btn:focus{border-color:#ea580c;background:#ea580c;color:#fff}
@media(max-width:767.98px){
  .collection-filter-heading--centered{padding:2px 0 8px}
  .collection-filter-heading--centered>.btn{position:static;margin-top:12px}
}
@media(max-width:575.98px){
  .collection-search-row{grid-template-columns:minmax(0,1fr) auto}
  .collection-search-btn{min-width:96px;padding-right:.65rem;padding-left:.65rem}
  .collection-filter-actions--show-all .collection-show-all-btn{width:100%;min-width:0}
}
