:root {
  --vpe-bg: #060606;
  --vpe-bg-soft: #0d0d0f;
  --vpe-card: #101114;
  --vpe-border: rgba(215, 178, 91, .18);
  --vpe-gold: #d9b45d;
  --vpe-gold-2: #f0d083;
  --vpe-text: #f3efe7;
  --vpe-muted: #9d978c;
  --vpe-green: #20c76d;
  --vpe-orange: #ffb33e;
  --vpe-red: #ef6464;
}

.vpe-wrap {
  background: radial-gradient(circle at top right, rgba(217, 180, 93, .12), transparent 32%), linear-gradient(180deg, #090909 0%, #060606 100%);
  color: var(--vpe-text);
  border: 1px solid var(--vpe-border);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.vpe-wrap, .vpe-wrap * { box-sizing: border-box; }
.vpe-wrap button, .vpe-wrap select, .vpe-wrap input { font: inherit; }
.vpe-wrap a { color: inherit; text-decoration: none; }

.vpe-top-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 26px;
}

.vpe-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--vpe-gold);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.vpe-title {
  font-size: clamp(32px, 4vw, 56px);
  line-height: .95;
  margin: 0 0 10px;
  color: #f4efe5;
}

.vpe-subtitle {
  margin: 0;
  color: var(--vpe-muted);
  max-width: 700px;
}

.vpe-search-box {
  flex: 0 0 min(420px, 100%);
  position: relative;
}

.vpe-search {
  width: 100%;
  background: rgba(15, 16, 20, .9);
  border: 1px solid var(--vpe-border);
  color: var(--vpe-text);
  border-radius: 16px;
  padding: 16px 56px 16px 18px;
  outline: none;
}

.vpe-search:focus,
.vpe-toolbar select:focus { border-color: rgba(217,180,93,.55); box-shadow: 0 0 0 3px rgba(217,180,93,.12); }

.vpe-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--vpe-gold);
  border: none;
  cursor: pointer;
}

.vpe-main {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
}

.vpe-sidebar { display: flex; flex-direction: column; gap: 18px; }
.vpe-side-card,
.vpe-cta-card,
.vpe-toolbar,
.vpe-products-table,
.vpe-mobile-cats,
.vpe-results-head,
.vpe-pagination,
.vpe-empty,
.vpe-loading {
  background: rgba(15, 17, 20, .9);
  border: 1px solid var(--vpe-border);
  border-radius: 22px;
}

.vpe-side-card { padding: 12px; }
.vpe-cat-item {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: #f5f0e5;
  background: transparent;
  border: none;
  padding: 14px 12px;
  border-radius: 16px;
  cursor: pointer;
}
.vpe-cat-item + .vpe-cat-item { margin-top: 6px; }
.vpe-cat-item:hover, .vpe-cat-item.is-active,
.vpe-mobile-chip.is-active, .vpe-view-btn.is-active {
  background: linear-gradient(180deg, rgba(217,180,93,.16), rgba(217,180,93,.07));
  box-shadow: inset 0 0 0 1px rgba(217,180,93,.25);
}
.vpe-cat-icon, .vpe-icon-btn svg, .vpe-cart-btn svg, .vpe-search-btn svg, .vpe-view-btn svg { width: 20px; height: 20px; }
.vpe-cat-icon { color: var(--vpe-gold); display: inline-flex; }
.vpe-cat-label { font-size: 14px; }
.vpe-cat-count {
  color: #111;
  background: var(--vpe-gold);
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.vpe-cta-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 210px;
  background: linear-gradient(180deg, rgba(217,180,93,.12), rgba(15,17,20,.92));
}
.vpe-cta-copy strong { display: block; font-size: 22px; margin-bottom: 8px; }
.vpe-cta-copy p { margin: 0; color: var(--vpe-muted); }
.vpe-cta-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 16px;
  background: var(--vpe-gold);
  color: #111;
  font-weight: 700;
}

.vpe-content { min-width: 0; }
.vpe-mobile-cats {
  display: none;
  margin-bottom: 14px;
  padding: 10px;
  gap: 10px;
  overflow-x: auto;
}
.vpe-mobile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 14px;
  background: #101114;
  color: #f4efe5;
  border: 1px solid var(--vpe-border);
  border-radius: 999px;
  cursor: pointer;
}

.vpe-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  margin-bottom: 14px;
}
.vpe-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.vpe-toolbar select {
  background: #0d1013;
  border: 1px solid var(--vpe-border);
  color: var(--vpe-text);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 180px;
  outline: none;
}
.vpe-view-switch { display: inline-flex; gap: 8px; }
.vpe-view-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 14px;
  background: #0d1013;
  color: var(--vpe-text);
  border: 1px solid var(--vpe-border);
  cursor: pointer;
}
.vpe-view-btn svg { color: var(--vpe-gold); }

.vpe-results-head { padding: 12px 16px; margin-bottom: 10px; }
.vpe-results-count { color: var(--vpe-muted); }
.vpe-products-table { overflow: hidden; }
.vpe-table-head {
  display: grid;
  grid-template-columns: minmax(280px, 2.5fr) 1fr .9fr .9fr 128px;
  gap: 16px;
  padding: 16px 18px;
  color: var(--vpe-muted);
  background: rgba(255,255,255,.02);
  font-size: 14px;
}
.vpe-products-list { display: flex; flex-direction: column; }
.vpe-product-card {
  display: grid;
  grid-template-columns: minmax(280px, 2.5fr) 1fr .9fr .9fr 128px;
  gap: 16px;
  padding: 16px 18px;
  align-items: center;
  border-top: 1px solid rgba(217,180,93,.10);
}
.vpe-product-card:hover { background: rgba(255,255,255,.015); }
.col-product { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vpe-product-thumb {
  width: 84px; height: 84px; border-radius: 16px; overflow: hidden; flex: 0 0 84px;
  background: #191919; border: 1px solid var(--vpe-border);
}
.vpe-product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vpe-product-meta { min-width: 0; }
.vpe-product-cat-mobile { display: none; font-size: 12px; color: var(--vpe-gold); margin-bottom: 6px; }
.vpe-product-name { display: block; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.vpe-product-sku { color: var(--vpe-muted); font-size: 13px; }
.vpe-pill {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border-radius: 999px; background: rgba(217,180,93,.12); color: var(--vpe-gold-2); font-size: 12px; border: 1px solid rgba(217,180,93,.18);
}
.vpe-stock-badge {
  display: inline-flex; min-height: 34px; padding: 0 12px; align-items: center; border-radius: 999px; font-weight: 700; font-size: 12px;
}
.stock-instock { background: rgba(32,199,109,.12); color: #60db97; }
.stock-onbackorder { background: rgba(255,179,62,.14); color: #ffc766; }
.stock-outofstock { background: rgba(239,100,100,.14); color: #ff8e8e; }
.col-actions { display: flex; gap: 10px; justify-content: flex-end; }
.vpe-icon-btn, .vpe-cart-btn {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s ease;
}
.vpe-icon-btn {
  color: var(--vpe-text); background: transparent; border: 1px solid var(--vpe-border);
}
.vpe-cart-btn {
  border: none; background: var(--vpe-gold); color: #121212;
}
.vpe-cart-btn:hover, .vpe-cta-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.vpe-cart-btn.is-loading { opacity: .6; pointer-events: none; }
.vpe-cart-btn.is-added { box-shadow: 0 0 0 4px rgba(32,199,109,.18); }

.vpe-pagination {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.vpe-page-btn {
  min-width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--vpe-border); background: #0d1013; color: var(--vpe-text); cursor: pointer;
}
.vpe-page-btn.is-active { background: var(--vpe-gold); color: #111; border-color: transparent; font-weight: 700; }
.vpe-page-btn:disabled { opacity: .45; cursor: not-allowed; }
.vpe-empty, .vpe-loading { padding: 24px; text-align: center; color: var(--vpe-muted); }

.vpe-rendered.is-grid .vpe-table-head { display: none; }
.vpe-rendered.is-grid .vpe-products-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px;
}
.vpe-rendered.is-grid .vpe-product-card {
  grid-template-columns: 1fr;
  padding: 16px;
  border: 1px solid rgba(217,180,93,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.015);
}
.vpe-rendered.is-grid .col-product { flex-direction: column; align-items: flex-start; }
.vpe-rendered.is-grid .vpe-product-thumb { width: 100%; height: 220px; flex: none; }
.vpe-rendered.is-grid .col-category,
.vpe-rendered.is-grid .col-price,
.vpe-rendered.is-grid .col-stock,
.vpe-rendered.is-grid .col-actions { display: flex; justify-content: space-between; align-items: center; }
.vpe-rendered.is-grid .col-category::before { content: 'Catégorie'; color: var(--vpe-muted); }
.vpe-rendered.is-grid .col-price::before { content: 'Prix'; color: var(--vpe-muted); }
.vpe-rendered.is-grid .col-stock::before { content: 'Stock'; color: var(--vpe-muted); }
.vpe-rendered.is-grid .col-actions { justify-content: flex-end; }
.vpe-rendered.is-grid .vpe-product-cat-mobile { display: inline-block; }

@media (max-width: 1199px) {
  .vpe-main { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .vpe-wrap { padding: 18px; border-radius: 22px; }
  .vpe-top-head { flex-direction: column; align-items: stretch; }
  .vpe-search-box { flex-basis: auto; }
  .vpe-main { grid-template-columns: 1fr; }
  .vpe-sidebar { display: none; }
  .vpe-mobile-cats { display: flex; }
  .vpe-toolbar { flex-direction: column; align-items: stretch; }
  .vpe-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .vpe-toolbar select { min-width: 0; width: 100%; }
  .vpe-view-switch { width: 100%; }
  .vpe-view-btn { flex: 1; justify-content: center; }
  .vpe-table-head { display: none; }
  .vpe-products-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
  .vpe-product-card {
    grid-template-columns: 1fr;
    padding: 14px;
    border: 1px solid rgba(217,180,93,.10);
    border-radius: 16px;
    margin: 0;
    background: rgba(255,255,255,.015);
  }
  .vpe-product-thumb { width: 100%; height: 190px; flex: none; }
  .col-product { flex-direction: column; align-items: flex-start; }
  .col-category, .col-price, .col-stock { display: flex; justify-content: space-between; align-items: center; }
  .col-category::before { content: 'Catégorie'; color: var(--vpe-muted); }
  .col-price::before { content: 'Prix'; color: var(--vpe-muted); }
  .col-stock::before { content: 'Stock'; color: var(--vpe-muted); }
  .col-actions { justify-content: flex-end; }
  .vpe-product-cat-mobile { display: inline-block; }
}

@media (max-width: 640px) {
  .vpe-title { font-size: 34px; }
  .vpe-filters { grid-template-columns: 1fr; }
  .vpe-products-list { grid-template-columns: 1fr; }
  .vpe-product-thumb { height: 170px; }
  .vpe-pagination { flex-wrap: wrap; }
}

/* v1.1 enhancements */
.vpe-rendered.is-grid .vpe-products-list { grid-template-columns: repeat(var(--vpe-cols-desktop, 3), minmax(0, 1fr)); }
.vpe-icon-btn { border: 1px solid var(--vpe-border); background: transparent; padding: 0; }
.vpe-icon-btn.is-active { color: #111; background: var(--vpe-gold); border-color: transparent; }
.vpe-quick-modal {
  position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 20px;
}
.vpe-quick-modal.is-open { display: flex; }
.vpe-quick-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(7px); }
.vpe-quick-dialog {
  position: relative; z-index: 2; width: min(900px, 94vw); max-height: 90vh; overflow: auto; background: #0d0e11;
  border: 1px solid rgba(217,180,93,.35); border-radius: 24px; box-shadow: 0 30px 100px rgba(0,0,0,.55); color: var(--vpe-text);
}
.vpe-quick-close { position: absolute; right: 14px; top: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--vpe-border); background:#111319; color:#fff; font-size:26px; cursor:pointer; }
.vpe-qv-grid { display:grid; grid-template-columns: 1.05fr .95fr; min-height: 480px; }
.vpe-qv-image { background:#151515; min-height:420px; }
.vpe-qv-image img { width:100%; height:100%; object-fit:cover; display:block; }
.vpe-qv-info { padding:42px; display:flex; flex-direction:column; justify-content:center; }
.vpe-qv-info h3 { margin:0 0 12px; font-size:36px; line-height:1.05; }
.vpe-qv-price { font-size:28px; color:var(--vpe-gold-2); margin:8px 0 14px; font-weight:700; }
.vpe-qv-desc { color:var(--vpe-muted); margin-top:18px; }
.vpe-qv-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.vpe-qv-link { width:auto; min-width:130px; padding:0 16px; }
.vpe-qv-cart { width:auto; padding:0 18px; gap:8px; }
.vpe-modal-open { overflow:hidden; }

.vpe-compare-tray {
  position: fixed; left:50%; bottom:24px; transform:translate(-50%, 120%); z-index:9998; width:min(760px, calc(100vw - 30px));
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; padding:14px 16px; color:var(--vpe-text);
  background:rgba(12,13,16,.96); border:1px solid rgba(217,180,93,.3); border-radius:18px; box-shadow:0 20px 60px rgba(0,0,0,.45); transition:.25s ease;
}
.vpe-compare-tray.is-open { transform:translate(-50%, 0); }
.vpe-compare-tray > div:first-child { display:flex; flex-direction:column; gap:2px; }
.vpe-compare-count { color:var(--vpe-muted); font-size:12px; }
.vpe-compare-items { display:flex; gap:8px; overflow:auto; }
.vpe-compare-items a { padding:9px 12px; border-radius:12px; background:#15171b; border:1px solid var(--vpe-border); white-space:nowrap; }
.vpe-compare-clear { border:none; border-radius:12px; background:var(--vpe-gold); color:#111; font-weight:700; padding:10px 14px; cursor:pointer; }

@media (max-width: 980px) {
  .vpe-products-list, .vpe-rendered.is-grid .vpe-products-list { grid-template-columns: repeat(var(--vpe-cols-tablet, 2), minmax(0, 1fr)); }
  .vpe-qv-grid { grid-template-columns: 1fr; }
  .vpe-qv-image { min-height:300px; max-height:42vh; }
  .vpe-qv-info { padding:26px; }
  .vpe-compare-tray { bottom:78px; grid-template-columns:1fr auto; }
  .vpe-compare-items { grid-column:1 / -1; order:3; }
}
@media (max-width: 640px) {
  .vpe-products-list, .vpe-rendered.is-grid .vpe-products-list { grid-template-columns: repeat(var(--vpe-cols-mobile, 1), minmax(0, 1fr)); }
  .vpe-qv-info h3 { font-size:28px; }
  .vpe-qv-price { font-size:24px; }
  .vpe-quick-dialog { border-radius:18px; }
  .vpe-product-card { min-width:0; }
  .vpe-icon-btn, .vpe-cart-btn { width:42px; height:42px; }
}


/* v1.2 mobile hardening */
.vpe-wrap{width:100%;max-width:100%;overflow:hidden}
.vpe-content,.vpe-results,.vpe-products-table{min-width:0;max-width:100%}
.vpe-product-name,.vpe-product-sku,.vpe-pill,.vpe-stock-badge{overflow-wrap:anywhere}
@media(max-width:767px){
  .vpe-top-head{margin-bottom:14px}
  .vpe-subtitle{font-size:13px;line-height:1.5}
  .vpe-products-table{overflow:visible}
  .vpe-product-card>*{min-width:0}
  .vpe-product-thumb img{object-fit:cover}
  .vpe-product-cat-mobile{display:block}
  .vpe-rendered.is-table .vpe-table-head{display:none!important}
}
