/* ============================================================
   TIBS SHOP CORE – ssp-style.css  v1.8.3
   ============================================================ */
:root {
  --tibs-primary:      #6c63ff;
  --tibs-primary-dark: #5a52e0;
  --tibs-accent:       #ff4757;
  --tibs-white:        #ffffff;
  --tibs-text:         #1a1a2e;
  --tibs-muted:        #6b7280;
  --tibs-border:       #e5e7eb;
  --tibs-bg-soft:      #f8f8fc;
  --tibs-shadow-sm:    0 2px 8px rgba(108,99,255,.08);
  --tibs-shadow-hover: 0 16px 48px rgba(108,99,255,.22);
  --tibs-radius:       16px;
  --tibs-radius-sm:    8px;
  --tibs-tr:           0.18s cubic-bezier(0.4,0,0.2,1);
  --tibs-star-full:    #f59e0b;
  --tibs-star-empty:   #d1d5db;
}
.tibs-shop-core-wrap {
  width:100%; box-sizing:border-box;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  position:relative;
}

/* ── TOAST NOTIFICATION ── */
.tibs-toast {
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
  background:#1a1a2e; color:#fff; padding:11px 22px; border-radius:50px;
  font-size:13px; font-weight:600; z-index:9999999;
  opacity:0; transition:opacity .2s,transform .2s; pointer-events:none;
  white-space:nowrap; box-shadow:0 8px 24px rgba(0,0,0,.22);
}
.tibs-toast.tibs-toast-show { opacity:1; transform:translateX(-50%) translateY(0); }
.tibs-toast.tibs-toast-green { background:#16a34a; }
.tibs-toast.tibs-toast-red   { background:#dc2626; }
.tibs-toast.tibs-toast-pink  { background:#e11d48; }

/* ============================================================
   GRID
   ============================================================ */
.tibs-product-grid {
  display:grid; grid-template-columns:repeat(1,1fr);
  gap:24px; margin:0; padding:0;
}
@media(min-width:600px)  { .tibs-product-grid { grid-template-columns:repeat(2,1fr); } }
@media(min-width:900px)  { .tibs-product-grid { grid-template-columns:repeat(3,1fr); } }
@media(min-width:1200px) { .tibs-product-grid { grid-template-columns:repeat(4,1fr); } }

/* ============================================================
   CARD TEMPLATES  (template-1 = default)
   ============================================================ */
/* ── Template 1: Classic (default) ── */
.tibs-product-card {
  background:var(--tibs-white); border-radius:var(--tibs-radius);
  box-shadow:var(--tibs-shadow-sm); overflow:hidden;
  display:flex; flex-direction:column;
  transition:transform var(--tibs-tr),box-shadow var(--tibs-tr);
  position:relative; will-change:transform;
}
.tibs-hover-lift .tibs-product-card:hover { transform:translateY(-6px); box-shadow:var(--tibs-shadow-hover); }
.tibs-card-media { position:relative; overflow:hidden; background:linear-gradient(135deg,#f0efff,#fafafa); }
.tibs-img-link { display:block; text-decoration:none; }
.tibs-product-img { width:100%; aspect-ratio:1/1; object-fit:cover; display:block; transition:transform var(--tibs-tr); }
.tibs-product-card:hover .tibs-product-img { transform:scale(1.05); }
.tibs-card-body { padding:16px; display:flex; flex-direction:column; gap:8px; flex:1; }

/* ── Template 2: Minimal (no border-radius, horizontal price row) ── */
.tibs-tpl-2 .tibs-product-card {
  border-radius:4px; box-shadow:none;
  border:1px solid var(--tibs-border);
}
.tibs-tpl-2 .tibs-card-body { padding:12px; }
.tibs-tpl-2 .tibs-product-price { font-size:14px; }
.tibs-tpl-2 .tibs-product-img { aspect-ratio:4/3; }
.tibs-tpl-2 .tibs-hover-lift .tibs-product-card:hover {
  border-color:var(--tibs-primary); box-shadow:0 0 0 2px var(--tibs-primary);
  transform:none;
}

/* ── Template 3: Bold Card (dark header band) ── */
.tibs-tpl-3 .tibs-product-card { border-radius:20px; overflow:hidden; box-shadow:0 4px 24px rgba(0,0,0,.1); }
.tibs-tpl-3 .tibs-card-media { background:#1a1a2e; }
.tibs-tpl-3 .tibs-product-img { opacity:.92; aspect-ratio:1/1; transition:opacity var(--tibs-tr),transform var(--tibs-tr); }
.tibs-tpl-3 .tibs-product-card:hover .tibs-product-img { opacity:1; transform:scale(1.08); }
.tibs-tpl-3 .tibs-card-body { background:#1a1a2e; color:#fff; padding:16px; }
.tibs-tpl-3 .tibs-product-title a { color:#fff; }
.tibs-tpl-3 .tibs-product-title a:hover { color:#a8a3ff; }
.tibs-tpl-3 .tibs-product-price { color:#a8a3ff; }
.tibs-tpl-3 .tibs-product-price del { color:#666; }
.tibs-tpl-3 .tibs-atc-btn { background:#6c63ff; }
.tibs-tpl-3 .tibs-atc-btn:hover { background:#5a52e0; }

/* ── Template 4: Floating / Magazine (image overlaps card border) ── */
.tibs-tpl-4 .tibs-product-card {
  border-radius:20px; box-shadow:0 8px 32px rgba(108,99,255,.12);
  background:linear-gradient(160deg,#f8f6ff 0%,#fff 100%);
  border:1.5px solid rgba(108,99,255,.1);
  overflow:visible; /* allow image to overflow */
}
.tibs-tpl-4 .tibs-card-media {
  border-radius:16px 16px 0 0; overflow:hidden;
  margin:-0px; background:transparent;
}
.tibs-tpl-4 .tibs-product-img { aspect-ratio:4/5; object-fit:cover; border-radius:16px 16px 0 0; }
.tibs-tpl-4 .tibs-card-body { padding:16px 18px; }
.tibs-tpl-4 .tibs-product-price { color:var(--tibs-primary); font-size:16px; }
.tibs-tpl-4 .tibs-atc-btn { border-radius:50px; }
.tibs-tpl-4 .tibs-hover-lift .tibs-product-card:hover { transform:translateY(-8px); box-shadow:0 24px 60px rgba(108,99,255,.2); }

/* ── Badge ── */
.tibs-badge {
  position:absolute; top:12px; left:12px;
  background:var(--tibs-accent); color:#fff;
  font-size:11px; font-weight:700; letter-spacing:.05em;
  padding:3px 9px; border-radius:20px; line-height:1.6;
  pointer-events:none; z-index:2;
  box-shadow:0 2px 8px rgba(255,71,87,.35);
}

/* ── Wishlist ── */
.tibs-wishlist {
  position:absolute; top:10px; right:10px;
  width:36px; height:36px; border-radius:50%;
  background:var(--tibs-white); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
  transition:background var(--tibs-tr),color var(--tibs-tr),transform var(--tibs-tr);
  z-index:3; color:var(--tibs-muted); padding:0; line-height:0;
}
.tibs-wishlist svg { width:18px; height:18px; transition:fill var(--tibs-tr),stroke var(--tibs-tr); }
.tibs-wishlist:hover,.tibs-wishlist.tibs-wishlisted { background:#fff0f2; color:var(--tibs-accent); transform:scale(1.1); }
.tibs-wishlist.tibs-wishlisted svg { fill:var(--tibs-accent); stroke:var(--tibs-accent); }

/* ── Quick View Button ── */
.tibs-quick-view-btn {
  position:absolute; bottom:10px; left:50%; transform:translateX(-50%) translateY(8px);
  background:rgba(255,255,255,.96); border:none; border-radius:50px;
  padding:6px 14px; cursor:pointer; display:flex; align-items:center; gap:6px;
  font-size:12px; font-weight:600; color:var(--tibs-text);
  box-shadow:0 4px 16px rgba(0,0,0,.15); z-index:4;
  opacity:0; transition:opacity var(--tibs-tr),transform var(--tibs-tr);
  white-space:nowrap;
}
.tibs-quick-view-btn svg { width:16px; height:16px; }
.tibs-product-card:hover .tibs-quick-view-btn { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── Vendor ── */
.tibs-vendor { font-size:11px; font-weight:500; color:var(--tibs-primary); text-transform:uppercase; letter-spacing:.07em; text-decoration:none; }
.tibs-vendor:hover { opacity:.75; }

/* ── Stars ── */
.tibs-stars { display:flex; align-items:center; gap:1px; line-height:1; }
.tibs-star { font-size:14px; }
.tibs-star-full,.tibs-star-half { color:var(--tibs-star-full); }
.tibs-star-empty { color:var(--tibs-star-empty); }
.tibs-review-count { font-size:11px; color:var(--tibs-muted); margin-left:4px; }

/* ── Swatches ── */
.tibs-swatches { display:flex; flex-wrap:wrap; gap:5px; margin-top:4px; }
.tibs-swatch-group { display:flex; flex-wrap:wrap; gap:5px; }
.tibs-swatch { width:20px; height:20px; border-radius:50%; cursor:pointer; border:2px solid transparent; box-shadow:0 0 0 1px rgba(0,0,0,.12); transition:transform var(--tibs-tr),box-shadow var(--tibs-tr); display:inline-block; flex-shrink:0; }
.tibs-swatch:hover { transform:scale(1.2); box-shadow:0 0 0 2px var(--tibs-primary); }
.tibs-swatch.tibs-active { box-shadow:0 0 0 2px var(--tibs-primary); transform:scale(1.15); }
.tibs-swatch-label { width:auto; height:auto; border-radius:var(--tibs-radius-sm); padding:2px 7px; font-size:11px; font-weight:600; background:var(--tibs-bg-soft); color:var(--tibs-text); border:1.5px solid var(--tibs-border); box-shadow:none; }
.tibs-swatch-label:hover { border-color:var(--tibs-primary); color:var(--tibs-primary); }
.tibs-swatch-label.tibs-active { border-color:var(--tibs-primary); background:var(--tibs-primary); color:#fff; }

/* ── Title ── */
.tibs-product-title { font-size:14px; font-weight:600; line-height:1.4; margin:0; padding:0; }
.tibs-product-title a { color:var(--tibs-text); text-decoration:none; transition:color var(--tibs-tr); }
.tibs-product-title a:hover { color:var(--tibs-primary); }

/* ── Price – side-by-side sale + regular ── */
.tibs-product-price {
  font-size:15px; font-weight:700; color:var(--tibs-primary);
  margin-top:auto; padding-top:4px;
  display:flex; flex-wrap:wrap; align-items:baseline; gap:5px;
}
.tibs-product-price del { color:#aaa; font-weight:400; font-size:12px; text-decoration:line-through; }
.tibs-product-price ins { text-decoration:none; color:var(--tibs-accent); }
/* when no sale, the plain amount */
.tibs-product-price .amount { color:inherit; }

/* ── Cart ── */
.tibs-cart-wrap { margin-top:12px; }
.tibs-atc-btn {
  width:100%; padding:10px 16px;
  background:var(--tibs-primary); color:var(--tibs-white);
  border:none; border-radius:var(--tibs-radius-sm);
  font-size:13px; font-weight:600; cursor:pointer;
  transition:background var(--tibs-tr),transform var(--tibs-tr),box-shadow var(--tibs-tr);
  letter-spacing:.02em; position:relative;
  display:flex; align-items:center; justify-content:center; text-decoration:none; text-align:center;
}
.tibs-atc-btn:hover { background:var(--tibs-primary-dark); box-shadow:0 4px 16px rgba(108,99,255,.4); }
.tibs-atc-btn:active { transform:scale(.97); }
.tibs-atc-btn.tibs-adding { pointer-events:none; opacity:.8; }
.tibs-atc-btn.tibs-added  { background:#22c55e; }
.tibs-select-option-btn { background:transparent; color:var(--tibs-primary); border:2px solid var(--tibs-primary); }
.tibs-select-option-btn:hover { background:var(--tibs-primary); color:#fff; }

/* ── Qty selector (hidden until first ATC click) ── */
.tibs-qty-selector {
  display:flex; align-items:stretch;
  border:2px solid var(--tibs-primary); border-radius:var(--tibs-radius-sm);
  overflow:hidden; width:100%; height:42px;
}
.tibs-qty-minus,.tibs-qty-plus {
  width:42px; height:42px; background:transparent; border:none;
  font-size:22px; font-weight:700; color:var(--tibs-primary);
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background var(--tibs-tr); padding:0; flex-shrink:0; user-select:none;
}
.tibs-qty-minus:hover,.tibs-qty-plus:hover { background:#f0efff; }
.tibs-qty-minus:active,.tibs-qty-plus:active { background:#e0deff; }
.tibs-qty-num { flex:1; text-align:center; font-size:15px; font-weight:700; color:var(--tibs-text); display:flex; align-items:center; justify-content:center; }
.tibs-hide-qty .tibs-qty-selector { display:none !important; }
@keyframes tibs-fade-in { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* ── Load More / Show Less ── */
.tibs-view-all-wrap { text-align:center; margin-top:36px; }
.tibs-view-all-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:14px 40px; background:var(--tibs-white); color:var(--tibs-primary);
  border:2px solid var(--tibs-primary); border-radius:50px;
  font-size:14px; font-weight:700; cursor:pointer; letter-spacing:.04em;
  transition:background var(--tibs-tr),color var(--tibs-tr),box-shadow var(--tibs-tr),transform var(--tibs-tr);
}
.tibs-view-all-btn:hover { background:var(--tibs-primary); color:#fff; box-shadow:0 6px 24px rgba(108,99,255,.35); transform:translateY(-2px); }
.tibs-view-all-btn:disabled { opacity:.5; pointer-events:none; }
.tibs-view-all-btn.tibs-show-less-mode { background:var(--tibs-bg-soft); border-color:var(--tibs-muted); color:var(--tibs-muted); }
.tibs-view-all-btn.tibs-show-less-mode:hover { background:var(--tibs-muted); color:#fff; }
.tibs-view-all-btn .tibs-spinner { width:16px; height:16px; border:2px solid currentColor; border-top-color:transparent; border-radius:50%; animation:tibs-spin .6s linear infinite; display:none; }
.tibs-view-all-btn.tibs-loading .tibs-spinner { display:inline-block; }
@keyframes tibs-spin { to{transform:rotate(360deg)} }
.tibs-no-products { grid-column:1/-1; text-align:center; color:var(--tibs-muted); padding:48px 16px; font-size:15px; }

/* ============================================================
   SLIDER
   ============================================================ */
.tibs-slider-wrap { position:relative; padding:0 0 8px; }
.tibs-slider-viewport { overflow:hidden; border-radius:var(--tibs-radius); }

/* slide movement types */
.tibs-slider-track {
  display:flex;
  will-change:transform;
  transition:transform .42s cubic-bezier(0.4,0,0.2,1);
}
.tibs-slider-track.tibs-slide-flow   { transition:transform .6s linear; }
.tibs-slider-track.tibs-slide-ease   { transition:transform .5s ease-in-out; }
.tibs-slider-track.tibs-slide-bounce { transition:transform .55s cubic-bezier(0.34,1.56,0.64,1); }
.tibs-slider-track.tibs-slide-snap   { transition:transform .25s cubic-bezier(0.22,1,0.36,1); }
.tibs-slide { flex-shrink:0; }

/* Arrows – no background by default, icon only */
.tibs-slider-prev,
.tibs-slider-next {
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:50%;
  background:transparent; color:#000; border:none;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  z-index:10; padding:6px;
  transition:color var(--tibs-tr),background var(--tibs-tr),transform var(--tibs-tr),opacity var(--tibs-tr);
}
.tibs-slider-prev { left:-4px; }
.tibs-slider-next { right:-4px; }
.tibs-slider-prev:hover,.tibs-slider-next:hover { transform:translateY(-50%) scale(1.12); }
.tibs-slider-prev svg,.tibs-slider-next svg { width:100%; height:100%; display:block; pointer-events:none; }
.tibs-slider-prev:disabled,.tibs-slider-next:disabled { opacity:.25; cursor:default; }

/* Dots */
.tibs-slider-dots { display:flex; justify-content:center; gap:8px; margin-top:20px; }
.tibs-slider-dot { width:10px; height:10px; border-radius:50%; background:var(--tibs-border); border:none; cursor:pointer; padding:0; transition:background var(--tibs-tr),transform var(--tibs-tr); }
.tibs-slider-dot.tibs-active { background:var(--tibs-primary); transform:scale(1.3); }

/* ============================================================
   QUICK VIEW MODAL
   ============================================================ */
.tibs-qv-overlay {
  position:fixed; inset:0; background:rgba(10,10,20,.65); backdrop-filter:blur(3px);
  z-index:999990; display:flex; align-items:center; justify-content:center; padding:12px;
  opacity:0; transition:opacity .15s ease; pointer-events:none;
}
.tibs-qv-overlay.tibs-qv-open { opacity:1; pointer-events:all; }
.tibs-qv-modal {
  background:var(--tibs-white); border-radius:20px; width:100%; max-width:880px;
  max-height:92vh; overflow:hidden; display:flex; flex-direction:column;
  box-shadow:0 32px 80px rgba(0,0,0,.28);
  transform:scale(0.97); transition:transform .15s ease; position:relative;
}
.tibs-qv-overlay.tibs-qv-open .tibs-qv-modal { transform:scale(1); }

/* Header */
.tibs-qv-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; border-bottom:1px solid var(--tibs-border);
  flex-shrink:0; background:var(--tibs-white); z-index:2;
}
.tibs-qv-header-title { font-size:15px; font-weight:700; color:var(--tibs-text); margin:0; flex:1; margin-right:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Close button – text "Close" label, fully editable */
.tibs-qv-close-header {
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 16px; height:34px; border-radius:50px;
  border:2px solid #1a1a2e; background:#fff; color:#1a1a2e;
  cursor:pointer; font-size:13px; font-weight:700; letter-spacing:.03em;
  flex-shrink:0;
  transition:background var(--tibs-tr),color var(--tibs-tr);
  white-space:nowrap;
}
.tibs-qv-close-header:hover { background:#1a1a2e; color:#fff; }

/* Body */
.tibs-qv-body { display:flex; flex-direction:column; overflow:hidden; flex:1; min-height:0; }
@media(min-width:640px) { .tibs-qv-body { flex-direction:row; } }

/* Gallery */
.tibs-qv-gallery-col { flex:0 0 46%; min-width:0; background:var(--tibs-bg-soft); display:flex; flex-direction:column; overflow:hidden; }
.tibs-qv-gallery { position:relative; overflow:hidden; flex:1; }
.tibs-qv-slides-wrap { display:flex; transition:transform .2s ease; will-change:transform; }
.tibs-qv-slide { flex-shrink:0; width:100%; display:flex; align-items:center; justify-content:center; min-height:280px; }
@media(min-width:640px) { .tibs-qv-slide { min-height:360px; } }
.tibs-qv-img { width:100%; max-height:380px; object-fit:contain; display:block; padding:12px; box-sizing:border-box; }

/* Thumbs */
.tibs-qv-thumbs { display:flex; gap:6px; padding:8px 10px; border-top:1px solid var(--tibs-border); overflow-x:auto; flex-shrink:0; }
.tibs-qv-thumbs::-webkit-scrollbar { height:3px; }
.tibs-qv-thumbs::-webkit-scrollbar-thumb { background:var(--tibs-border); border-radius:3px; }
.tibs-qv-thumb { width:54px; height:54px; flex-shrink:0; object-fit:cover; border-radius:8px; cursor:pointer; border:2px solid transparent; transition:border-color var(--tibs-tr),opacity var(--tibs-tr); opacity:.65; }
.tibs-qv-thumb.tibs-active,.tibs-qv-thumb:hover { border-color:var(--tibs-primary); opacity:1; }

/* Details */
.tibs-qv-details-col { flex:1; min-width:0; padding:20px; display:flex; flex-direction:column; gap:12px; overflow-y:auto; }
.tibs-qv-product-title { font-size:19px; font-weight:700; color:var(--tibs-text); margin:0; line-height:1.3; }
.tibs-qv-product-title a { color:inherit; text-decoration:none; }
.tibs-qv-product-title a:hover { color:var(--tibs-primary); }
.tibs-qv-rating { display:flex; align-items:center; gap:2px; }
.tibs-qv-rcount { font-size:12px; color:var(--tibs-muted); margin-left:4px; }
.tibs-qv-price { font-size:22px; font-weight:800; color:var(--tibs-primary); display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.tibs-qv-price del { color:#aaa; font-size:14px; font-weight:400; }
.tibs-qv-price ins { text-decoration:none; color:var(--tibs-accent); }
.tibs-qv-desc { font-size:13px; line-height:1.65; color:var(--tibs-muted); }
.tibs-qv-desc-full { margin-top:6px; }
.tibs-qv-read-more,.tibs-qv-show-less { background:none; border:none; color:var(--tibs-primary); font-size:13px; font-weight:600; cursor:pointer; padding:0; text-decoration:underline; margin-left:4px; }

/* Variations */
.tibs-qv-attr { display:flex; flex-direction:column; gap:6px; }
.tibs-qv-attr label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--tibs-muted); }
.tibs-qv-swatch-row { display:flex; flex-wrap:wrap; gap:7px; }
.tibs-qv-swatch { width:28px; height:28px; border-radius:50%; border:2px solid transparent; cursor:pointer; box-shadow:0 0 0 1px rgba(0,0,0,.12); transition:transform var(--tibs-tr),box-shadow var(--tibs-tr); }
.tibs-qv-swatch:hover { transform:scale(1.15); box-shadow:0 0 0 2.5px var(--tibs-primary); }
.tibs-qv-swatch.tibs-active { box-shadow:0 0 0 3px var(--tibs-primary); transform:scale(1.1); }
.tibs-qv-swatch-label { width:auto; height:auto; border-radius:6px; padding:4px 10px; font-size:12px; font-weight:600; color:var(--tibs-text); background:var(--tibs-bg-soft); border:1.5px solid var(--tibs-border); box-shadow:none; }
.tibs-qv-swatch-label:hover { border-color:var(--tibs-primary); color:var(--tibs-primary); }
.tibs-qv-swatch-label.tibs-active { background:var(--tibs-primary); color:#fff; border-color:var(--tibs-primary); }

/* QV qty – hidden until ATC clicked */
.tibs-qv-qty-row {
  display:none; align-items:stretch;
  border:2px solid var(--tibs-primary); border-radius:var(--tibs-radius-sm);
  overflow:hidden; height:44px; animation:tibs-fade-in .15s ease;
}
.tibs-qv-qty-row.tibs-qv-qty-visible { display:flex; }
.tibs-qv-qty-minus,.tibs-qv-qty-plus { width:44px; background:transparent; border:none; font-size:22px; font-weight:700; color:var(--tibs-primary); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background var(--tibs-tr); flex-shrink:0; user-select:none; }
.tibs-qv-qty-minus:hover,.tibs-qv-qty-plus:hover { background:#f0efff; }
.tibs-qv-qty-num { flex:1; text-align:center; font-size:15px; font-weight:700; color:var(--tibs-text); display:flex; align-items:center; justify-content:center; }

/* QV Cart */
.tibs-qv-actions { display:flex; flex-direction:column; gap:10px; margin-top:auto; padding-top:8px; }
.tibs-qv-atc { padding:13px 24px; background:var(--tibs-primary); color:#fff; border:none; border-radius:var(--tibs-radius-sm); font-size:14px; font-weight:700; cursor:pointer; transition:background var(--tibs-tr),box-shadow var(--tibs-tr),transform var(--tibs-tr); width:100%; text-align:center; }
.tibs-qv-atc:hover:not(:disabled) { background:var(--tibs-primary-dark); box-shadow:0 6px 20px rgba(108,99,255,.4); }
.tibs-qv-atc:active { transform:scale(.98); }
.tibs-qv-atc:disabled { opacity:.45; cursor:not-allowed; }
.tibs-qv-atc.tibs-added { background:#22c55e; }
.tibs-qv-checkout { display:none; padding:12px 24px; border:2px solid var(--tibs-primary); border-radius:var(--tibs-radius-sm); color:var(--tibs-primary); text-align:center; font-weight:700; font-size:14px; text-decoration:none; transition:background var(--tibs-tr),color var(--tibs-tr); }
.tibs-qv-checkout.tibs-visible { display:block; }
.tibs-qv-checkout:hover { background:var(--tibs-primary); color:#fff; }

/* Footer */
.tibs-qv-footer { padding:10px 20px; border-top:1px solid var(--tibs-border); display:flex; justify-content:center; flex-shrink:0; }
.tibs-qv-close-footer { padding:9px 30px; border:2px solid var(--tibs-border); border-radius:50px; background:transparent; color:var(--tibs-muted); cursor:pointer; font-size:13px; font-weight:600; transition:border-color var(--tibs-tr),color var(--tibs-tr),background var(--tibs-tr); }
.tibs-qv-close-footer:hover { border-color:var(--tibs-accent); color:var(--tibs-accent); background:#fff0f2; }

/* ============================================================
   FILTER BAR  v1.8.3
   ============================================================ */
.tibs-filter-bar {
  display:flex; flex-wrap:nowrap; align-items:center; gap:8px;
  padding:10px 14px; background:var(--tibs-bg-soft); border-radius:14px;
  margin-bottom:24px; box-sizing:border-box; width:100%;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
}
.tibs-filter-bar::-webkit-scrollbar { height:3px; }
.tibs-filter-bar::-webkit-scrollbar-thumb { background:var(--tibs-border); border-radius:3px; }

.tibs-filter-search-wrap { flex:1 1 160px; min-width:90px; max-width:280px; position:relative; display:flex; align-items:center; }
.tibs-filter-search-icon { position:absolute; left:10px; width:15px; height:15px; color:var(--tibs-muted); pointer-events:none; flex-shrink:0; }
.tibs-filter-search { width:100%; padding:8px 10px 8px 32px; border:1.5px solid var(--tibs-border); border-radius:50px; font-size:13px; color:var(--tibs-text); background:#fff; outline:none; transition:border-color .12s,box-shadow .12s; box-sizing:border-box; }
.tibs-filter-search:focus { border-color:var(--tibs-primary); box-shadow:0 0 0 3px rgba(108,99,255,.12); }
.tibs-filter-search::placeholder { color:var(--tibs-muted); font-size:12px; }

/* Mobile: compact search, auto-fit dropdowns */
@media(max-width:480px) {
  .tibs-filter-search-wrap { flex:0 0 auto; min-width:80px; max-width:110px; }
  .tibs-filter-search { font-size:11px; padding:6px 8px 6px 26px; }
  .tibs-filter-search-icon { width:13px; height:13px; left:7px; }
  .tibs-filter-cat,.tibs-filter-sort { font-size:11px; padding:6px 22px 6px 8px; width:auto; max-width:none; }
  .tibs-filter-reset { width:30px; height:30px; }
  .tibs-filter-reset svg { width:13px; height:13px; }
}

.tibs-filter-cat,.tibs-filter-sort {
  flex-shrink:0; flex:0 0 auto;
  padding:8px 10px; border:1.5px solid var(--tibs-border); border-radius:50px;
  font-size:12px; color:var(--tibs-text); background:#fff; cursor:pointer;
  outline:none; transition:border-color .12s,box-shadow .12s;
  white-space:nowrap; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 8px center; padding-right:26px;
  width:auto; max-width:160px;
}
.tibs-filter-cat:focus,.tibs-filter-sort:focus { border-color:var(--tibs-primary); box-shadow:0 0 0 3px rgba(108,99,255,.12); }

.tibs-filter-reset {
  flex-shrink:0; width:36px; height:36px; border-radius:50%;
  border:1.5px solid var(--tibs-primary); color:var(--tibs-primary);
  background:transparent; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--tibs-tr),color var(--tibs-tr),transform var(--tibs-tr);
}
.tibs-filter-reset svg { width:15px; height:15px; flex-shrink:0; }
.tibs-filter-reset:hover { background:var(--tibs-primary); color:#fff; transform:rotate(-45deg); }
.tibs-filter-divider { width:1px; height:24px; background:var(--tibs-border); flex-shrink:0; border-radius:1px; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.tibs-atc-btn:focus-visible,.tibs-view-all-btn:focus-visible,.tibs-wishlist:focus-visible,
.tibs-qty-minus:focus-visible,.tibs-qty-plus:focus-visible,.tibs-qv-close-header:focus-visible,
.tibs-qv-close-footer:focus-visible,.tibs-qv-atc:focus-visible,.tibs-filter-reset:focus-visible
{ outline:3px solid var(--tibs-primary); outline-offset:2px; }

.tibs-skeleton { background:linear-gradient(90deg,#f0f0f0 25%,#f8f8f8 50%,#f0f0f0 75%); background-size:200% 100%; animation:tibs-shimmer 1.4s infinite; border-radius:var(--tibs-radius); }
@keyframes tibs-shimmer { from{background-position:200% 0} to{background-position:-200% 0} }

.editor-styles-wrapper .tibs-shop-core-wrap { padding:4px 0; }
@media(prefers-reduced-motion:reduce) {
  .tibs-product-card,.tibs-product-img,.tibs-atc-btn,.tibs-view-all-btn,
  .tibs-wishlist,.tibs-qty-selector,.tibs-slider-track,.tibs-qv-overlay,.tibs-qv-modal
  { transition:none; animation:none; }
}

/* ============================================================
   SLIDER MOBILE FIX  v1.8.3
   Prevent blank slide gaps, ensure track fills correctly
   ============================================================ */
.tibs-slider-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.tibs-slider-track {
  display: flex;
  width: max-content;       /* let track be as wide as all slides */
  align-items: stretch;
}
.tibs-slide {
  flex-shrink: 0;
  box-sizing: border-box;
  /* width is set dynamically by JS; ensure no collapse */
  min-width: 0;
}
/* On mobile, force track not to wrap or collapse */
@media (max-width: 600px) {
  .tibs-slider-track {
    flex-wrap: nowrap;
    touch-action: pan-x;
  }
  .tibs-slide {
    /* Prevent slides from collapsing on mobile */
    flex-shrink: 0 !important;
    width: auto;             /* JS will set inline width */
  }
}
/* Cloned slides (infinite loop) must match original dimensions */
.tibs-slide .tibs-product-card {
  height: 100%;
  box-sizing: border-box;
}

/* ============================================================
   v1.8.3 – QTY INPUT EDITABLE + PERFORMANCE
   ============================================================ */

/* Editable qty number – looks like a text input, feels like one */
.tibs-qty-num {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--tibs-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: text;
  outline: none;
  min-width: 32px;
  /* prevent line breaks when editing */
  white-space: nowrap;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}
.tibs-qty-num:focus {
  background: #f0efff;
  border-radius: 4px;
}
/* QV qty num editable */
.tibs-qv-qty-num {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--tibs-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: text;
  outline: none;
  min-width: 40px;
  white-space: nowrap;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}
.tibs-qv-qty-num:focus { background: #f0efff; border-radius: 4px; }

/* Performance: use GPU compositing only on hover/active */
.tibs-product-card {
  contain: layout style;          /* limit browser layout scope */
}
.tibs-product-img {
  will-change: auto;              /* don't promote every img to GPU layer */
}
.tibs-product-card:hover .tibs-product-img {
  will-change: transform;
  transform: scale(1.05);
}

/* Slider: contain paint, enable GPU for track only during transition */
.tibs-slider-viewport { contain: layout; }
.tibs-slider-track    { will-change: transform; }
.tibs-slider-track:not([style*="transition: none"]) { backface-visibility: hidden; }

/* Toast: GPU layer, avoid forced reflow */
.tibs-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999999;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  will-change: opacity, transform;
}
.tibs-toast.tibs-toast-show  { opacity: 1; transform: translateX(-50%) translateY(0); }
.tibs-toast.tibs-toast-green { background: #16a34a; }
.tibs-toast.tibs-toast-red   { background: #dc2626; }
.tibs-toast.tibs-toast-pink  { background: #e11d48; }

/* QV overlay – use opacity transition only (no transform on overlay itself) */
.tibs-qv-overlay {
  transition: opacity .15s ease;
}
.tibs-qv-modal {
  transition: transform .15s ease;
}

/* Reduce expensive box-shadow repaints */
.tibs-product-card {
  box-shadow: var(--tibs-shadow-sm);
  transition: transform var(--tibs-tr), box-shadow var(--tibs-tr);
}
.tibs-hover-lift .tibs-product-card:hover {
  box-shadow: var(--tibs-shadow-hover);
}

/* QV qty row hidden-by-default (v1.8.3 – hidden until ATC clicked) */
.tibs-qv-qty-row {
  display: none;
  align-items: stretch;
  border: 2px solid var(--tibs-primary);
  border-radius: var(--tibs-radius-sm);
  overflow: hidden;
  height: 44px;
}
.tibs-qv-qty-row.tibs-qv-qty-visible { display: flex; }

/* Checkout hidden by default */
.tibs-qv-checkout { display: none; }
.tibs-qv-checkout.tibs-visible { display: block; }

/* Filter bar – prevent layout repaint on typing */
.tibs-filter-bar { contain: layout style; }

/* Skeleton shimmer – use transform (compositor-only) not background-position */
@keyframes tibs-shimmer {
  0%   { opacity: 1; }
  50%  { opacity: 0.5; }
  100% { opacity: 1; }
}
.tibs-skeleton {
  animation: tibs-shimmer 1.4s ease-in-out infinite;
  background: #ebebeb;
  border-radius: var(--tibs-radius);
}
