@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root, html[data-theme="dark"] {
  --bg:#050505; --bg-2:#0a0a0a; --bg-3:#111;
  --surface:#0a0a0a; --surface-2:#141414;
  --line:#222; --line-2:#2a2a2a;
  --accent:#e60000; --accent-2:#b30000; --gold:#ff3333;
  --text:#fff; --text-2:#d1d5db; --muted:#888;
  --card:#0a0a0a; --card-line:#222;
  --util-bar:#000; --header:rgba(5,5,5,0.95);
  --footer:#020202; --hover-bg:#141414;
  --ok:#06c755;
  --scroll-track:#050505; --scroll-thumb:#333;
}
html[data-theme="light"] {
  --bg:#f9fafb; --bg-2:#fff; --bg-3:#f3f4f6;
  --surface:#fff; --surface-2:#f3f4f6;
  --line:#e5e7eb; --line-2:#d1d5db;
  --accent:#e60000; --accent-2:#cc0000; --gold:#ff3333;
  --text:#111827; --text-2:#374151; --muted:#6b7280;
  --card:#fff; --card-line:#e5e7eb;
  --util-bar:#f3f4f6; --header:rgba(255,255,255,0.95);
  --footer:#f9fafb; --hover-bg:#f3f4f6;
  --ok:#06a84c;
  --scroll-track:#f3f4f6; --scroll-thumb:#d1d5db;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:'Prompt',sans-serif;background:var(--bg);color:var(--text);transition:background .3s,color .3s}
.font-bebas{font-family:'Prompt',sans-serif;letter-spacing:.02em}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:var(--scroll-track)}
::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:5px}
.no-scrollbar::-webkit-scrollbar{display:none}
.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}

.container-main{max-width:1440px;margin:0 auto;padding:0 20px}

/* Header */
.util-bar{background:var(--util-bar);color:var(--muted);font-size:11px;border-bottom:1px solid var(--line)}
.header-main{background:var(--header);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50;backdrop-filter:blur(12px)}
.site-logo{display:block;height:96px;width:auto;max-height:96px}
.theme-toggle{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:var(--surface);border:1px solid var(--line);color:var(--text);cursor:pointer;font-size:12px;font-weight:600}
.theme-toggle:hover{border-color:var(--accent)}
.theme-toggle .sun{display:none}.theme-toggle .moon{display:inline}
html[data-theme="light"] .theme-toggle .sun{display:inline}
html[data-theme="light"] .theme-toggle .moon{display:none}
.header-icon{display:inline-flex;flex-direction:column;align-items:center;gap:2px;color:var(--text-2);font-size:11px;position:relative;text-decoration:none;transition:color .2s}
.header-icon .fa{font-size:17px;color:var(--text);transition:color .2s}
.header-icon:hover{color:var(--accent)}
.header-icon:hover .fa{color:var(--accent)}
.cart-badge{position:absolute;top:-4px;right:-10px;background:var(--accent);color:#fff;font-size:10px;padding:2px 6px;border-radius:999px;font-weight:700;min-width:18px;text-align:center}
.cat-nav-inner{display:flex;gap:6px;overflow-x:auto;padding:8px 0;border-top:1px solid var(--line)}
.cat-link{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:10px;color:var(--text-2);font-size:13px;font-weight:500;white-space:nowrap}
.cat-link:hover{background:var(--hover-bg);color:var(--text)}
.cat-link.active{background:var(--accent);color:#fff}
.platinum-btn{margin-left:auto;background:linear-gradient(135deg,#3b3b3b,#1a1a1a);color:#ffd24a;border:1px solid #4a4a4a;padding:8px 14px;border-radius:10px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}

/* Breadcrumb + Hero */
.breadcrumb{font-size:12px;color:var(--muted);padding:18px 0 6px;display:flex;gap:8px;align-items:center}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--accent)}
.hero-builder{background:linear-gradient(135deg,#220000 0%,#0a0a0a 60%,#050505 100%);border:1px solid var(--card-line);border-radius:16px;padding:26px 24px;margin-bottom:18px;position:relative;overflow:hidden;color:#fff}
html[data-theme="light"] .hero-builder{background:linear-gradient(135deg,#fff0f0,#fff);color:var(--text)}
.hero-builder::before{content:"";position:absolute;inset:0;background-image:radial-gradient(circle at 80% 20%,rgba(230,0,0,.25),transparent 60%);pointer-events:none}
.hero-title{font-family:'Prompt',sans-serif;font-size:44px;line-height:1;letter-spacing:.02em;position:relative}
.hero-title .red{color:var(--accent)}
.hero-sub{color:var(--text-2);font-size:14px;margin-top:8px;position:relative;max-width:660px}
html[data-theme="dark"] .hero-sub{color:#d1d5db}

/* Builder layout */
.builder-grid{display:grid;grid-template-columns:350px 1fr;gap:22px;margin:20px 0 60px;align-items:start}
@media(max-width:1100px){.builder-grid{grid-template-columns:1fr}}

.progress-bar{background:var(--card);border:1px solid var(--card-line);border-radius:14px;padding:14px 18px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.progress-stats{display:flex;align-items:center;gap:14px}
.progress-ring{width:54px;height:54px;flex:none;position:relative}
.progress-ring svg{transform:rotate(-90deg)}
.progress-ring .ring-bg{stroke:var(--line-2);stroke-width:6;fill:none}
.progress-ring .ring-fg{stroke:var(--accent);stroke-width:6;fill:none;stroke-linecap:round;transition:stroke-dashoffset .4s}
.progress-ring .ring-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:var(--text)}
.progress-text .t1{font-size:15px;font-weight:700}
.progress-text .t2{font-size:12px;color:var(--muted);margin-top:2px}
.compat-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid}
.compat-badge.ok{background:rgba(6,199,85,.08);color:var(--ok);border-color:rgba(6,199,85,.4)}
.compat-badge.warn{background:rgba(230,0,0,.08);color:var(--accent);border-color:rgba(230,0,0,.35)}

/* Component rows */
.comp-row{background:var(--card);border:1px solid var(--card-line);border-radius:14px;padding:14px 16px;margin-bottom:12px;display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:14px;transition:border-color .2s,transform .15s}
.comp-row:hover{border-color:var(--accent)}
.comp-row.selected{border-color:var(--ok)}
.comp-row .icon{width:48px;height:48px;border-radius:12px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:20px;border:1px solid var(--line)}
.comp-row.selected .icon{background:rgba(6,199,85,.08);color:var(--ok);border-color:rgba(6,199,85,.35)}
.comp-row .meta{min-width:0}
.comp-row .name{font-size:14px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.comp-row .name .req{background:var(--accent);color:#fff;font-size:10px;font-weight:700;padding:2px 6px;border-radius:4px}
.comp-row .name .opt{background:var(--surface-2);color:var(--muted);font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;border:1px solid var(--line)}
.comp-row .desc{font-size:12px;color:var(--muted);margin-top:2px}
.comp-row .picked{font-size:13px;color:var(--text-2);margin-top:6px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.comp-row .picked .pill{background:var(--surface-2);border:1px solid var(--line);padding:3px 8px;border-radius:6px;font-size:11px;color:var(--text-2)}
.comp-row .picked .price{color:var(--accent);font-weight:700}
.comp-row .actions{display:flex;gap:8px;align-items:center}
.btn-pick{background:var(--accent);color:#fff;padding:9px 16px;border-radius:10px;font-size:13px;font-weight:600;border:none;cursor:pointer;white-space:nowrap}
.btn-pick:hover{background:var(--accent-2)}
.btn-change{background:var(--surface-2);color:var(--text);padding:9px 14px;border-radius:10px;font-size:13px;font-weight:600;border:1px solid var(--line);cursor:pointer;white-space:nowrap}
.btn-change:hover{border-color:var(--accent);color:var(--accent)}
.btn-remove{background:transparent;color:var(--muted);width:36px;height:36px;border-radius:10px;border:1px solid var(--line);cursor:pointer}
.btn-remove:hover{color:var(--accent);border-color:var(--accent)}

/* Summary panel */
.summary{background:var(--card);border:1px solid var(--card-line);border-radius:14px;padding:18px;position:sticky;top:160px;align-self:start}
.summary h3{font-size:15px;font-weight:700;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}
.sum-item{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:13px}
.sum-item:last-of-type{border:none}
.sum-item .lbl{color:var(--muted)}
.sum-item .val{color:var(--text);font-weight:600;text-align:right;max-width:60%}
.sum-item.empty .val{color:var(--muted);font-weight:400;font-style:italic}
.sum-total{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-top:10px}
.sum-total .row{display:flex;justify-content:space-between;font-size:13px;padding:4px 0}
.sum-total .row.grand{font-size:20px;font-weight:800;color:var(--accent);border-top:1px solid var(--line);padding-top:10px;margin-top:6px}
.sum-total .small{font-size:11px;color:var(--muted)}
.sum-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.btn-primary{background:var(--accent);color:#fff;padding:12px;border-radius:10px;font-weight:700;border:none;cursor:pointer;font-size:13px}
.btn-primary:hover{background:var(--accent-2)}
.btn-secondary{background:var(--surface-2);color:var(--text);padding:12px;border-radius:10px;font-weight:600;border:1px solid var(--line);cursor:pointer;font-size:13px}
.btn-secondary:hover{border-color:var(--accent)}
.btn-wide{grid-column:1/-1}

/* Preset chips */
.preset-row{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;margin-bottom:14px}
.preset-chip{flex:none;background:var(--card);border:1px solid var(--card-line);color:var(--text);padding:10px 14px;border-radius:12px;font-size:12.5px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:8px}
.preset-chip:hover{border-color:var(--accent)}
.preset-chip .meta{color:var(--muted);font-weight:400;font-size:11px}


/* New Layout Styles */
.builder-grid > section { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; }
.builder-grid > section::-webkit-scrollbar { width: 6px; }
.picker-area { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 20px; min-height: 500px; }
.picker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.picker-title { font-size: 20px; font-weight: 700; color: var(--text); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.picker-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); cursor: pointer; transition: all 0.2s; display:flex; flex-direction:column; gap:8px; }
.picker-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.picker-card .t-img { width: 100px; height: 100px; border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; align-self:center; margin-bottom: 8px; overflow: hidden; padding:4px;}
.picker-card .t-img img { width: 100%; height: 100%; object-fit: contain; }
.picker-card .t-img { width: 100px; height: 100px; border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; align-self:center; margin-bottom: 8px; overflow: hidden; padding:4px;}
.picker-card .t-img img { width: 100%; height: 100%; object-fit: contain; }
.picker-card .t-icon { width: 48px; height: 48px; border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; align-self:center; margin-bottom: 8px; }
.picker-card .n { font-size: 14px; font-weight: 700; line-height: 1.3; }
.picker-card .s { font-size: 12px; color: var(--muted); }
.picker-card .advice { font-size: 11px; margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.picker-card .advice { font-size: 11px; margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.picker-card .price-row { margin-top: auto; display:flex; justify-content:space-between; align-items:flex-end; }
.picker-card .p { font-size: 16px; font-weight: 700; color: var(--accent); }
.comp-row { cursor: pointer; padding: 10px 14px; grid-template-columns: 40px 1fr auto; gap: 10px; }
.comp-row.active-tab { border-color: var(--accent); background: var(--hover-bg); }
.comp-row .icon { width: 40px; height: 40px; font-size: 16px; }
.actions { display: none; } /* Hide old pick buttons */


/* New Layout Styles */
.builder-grid > section { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; }
.builder-grid > section::-webkit-scrollbar { width: 6px; }
.picker-area { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 20px; min-height: 500px; }
.picker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.picker-title { font-size: 20px; font-weight: 700; color: var(--text); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.picker-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); cursor: pointer; transition: all 0.2s; display:flex; flex-direction:column; gap:8px; }
.picker-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.picker-card .t-icon { width: 48px; height: 48px; border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; align-self:center; margin-bottom: 8px; }
.picker-card .n { font-size: 14px; font-weight: 700; line-height: 1.3; }
.picker-card .s { font-size: 12px; color: var(--muted); }
.picker-card .price-row { margin-top: auto; display:flex; justify-content:space-between; align-items:flex-end; }
.picker-card .p { font-size: 16px; font-weight: 700; color: var(--accent); }
.comp-row { cursor: pointer; padding: 10px 14px; grid-template-columns: 40px 1fr auto; gap: 10px; }
.comp-row.active-tab { border-color: var(--accent); background: var(--hover-bg); }
.comp-row .icon { width: 40px; height: 40px; font-size: 16px; }
.actions { display: none; } /* Hide old pick buttons */

/* Modal */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:100;display:none;align-items:center;justify-content:center;padding:20px}
.modal-overlay.show{display:flex}
.modal{background:var(--bg-2);border:1px solid var(--card-line);border-radius:16px;width:100%;max-width:820px;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}
.modal-head{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.modal-head h3{font-size:17px;font-weight:700}
.modal-close{width:36px;height:36px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);color:var(--text);cursor:pointer}
.modal-body{padding:16px 20px;overflow-y:auto;flex:1}
.search-mini{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px 14px;color:var(--text);width:100%;outline:none;font-size:13px;margin-bottom:12px}
.search-mini:focus{border-color:var(--accent)}
.opt-card{display:grid;grid-template-columns:60px 1fr auto;align-items:center;gap:14px;background:var(--card);border:1px solid var(--card-line);border-radius:12px;padding:12px;margin-bottom:8px;cursor:pointer}
.opt-card:hover{border-color:var(--accent)}
.opt-card .t-icon{width:60px;height:60px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:22px}
.opt-card .n{font-size:14px;font-weight:700;color:var(--text)}
.opt-card .s{font-size:12px;color:var(--muted);margin-top:3px}
.opt-card .p{font-size:17px;font-weight:700;color:var(--accent);white-space:nowrap}
.opt-card .p .old{font-size:11px;color:var(--muted);text-decoration:line-through;font-weight:400;display:block}

/* Footer */
footer{background:var(--footer);border-top:1px solid var(--line);padding:30px 0;color:var(--text-2)}
.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
@media(max-width:768px){.footer-grid{grid-template-columns:1fr 1fr}}
.footer-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:12px;text-transform:uppercase;letter-spacing:.06em}
.footer-link{display:block;color:var(--text-2);font-size:12px;padding:3px 0}
.footer-link:hover{color:var(--accent)}
.footer-bottom{border-top:1px solid var(--line);padding-top:16px;margin-top:22px;font-size:11px;color:var(--muted);display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}

/* Toast */
.toast{position:fixed;top:20px;right:20px;background:var(--card);border:1px solid var(--card-line);border-left:4px solid var(--accent);color:var(--text);padding:12px 18px;border-radius:10px;z-index:200;transform:translateX(120%);transition:transform .3s;font-size:13px}
.toast.show{transform:translateX(0)}
.toast.ok{border-left-color:var(--ok)}
