/* ── Tokens ── */
:root {
    --ink:        #0a0a0a;
    --ink-2:      #444;
    --ink-3:      #888;
    --ink-4:      #bbb;
    --surface:    #ffffff;
    --surface-2:  #f5f5f3;
    --surface-3:  #eeede9;
    --accent:     #d4380d;
    --accent-2:   #fff0ec;
    --accent-3:   #ffd8cc;
    --green:      #16a34a;
    --green-bg:   #f0fdf4;
    --border:     #e8e8e4;
    --border-2:   #d4d4ce;
    --r:          10px;
    --rs:         6px;
    --shadow-s:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-m:   0 4px 12px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
    --shadow-l:   0 12px 32px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);
}


/* ── Page header ── */
.pl-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 52px 0 0;
}
.pl-header-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 28px 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.pl-header-left {}
.pl-eyebrow {
    
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.pl-header h1 {
    
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: -.02em;
}
.pl-header-sub {
    font-size: .88rem;
    color: var(--ink-3);
    margin-top: 6px;
    font-weight: 400;
}
.pl-header-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    
    font-size: .75rem;
    font-weight: 600;
    color: var(--ink-3);
    letter-spacing: .04em;
    text-transform: uppercase;
    padding-bottom: 4px;
}
.pl-header-stat strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.03em;
    line-height: 1;
    
}

/* ── Filter nav (tabs below header) ── */
.pl-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 9;
}
.pl-nav-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.pl-nav-inner::-webkit-scrollbar { display: none; }

.pl-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    flex-shrink: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
}
.pl-tab img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: .4;
    transition: opacity .15s;
}
.pl-tab:hover { color: var(--ink); }
.pl-tab:hover img { opacity: .7; }
.pl-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.pl-tab.active img { opacity: 1; }

.pl-tab-count {
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    background: var(--surface-3);
    color: var(--ink-3);
    transition: background .15s, color .15s;
    
    letter-spacing: .02em;
}
.pl-tab.active .pl-tab-count {
    background: var(--ink);
    color: var(--surface);
}

/* ── Main layout ── */
.pl-body {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ── Toolbar ── */
.pl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 0 16px;
}
.pl-result-text {
    font-size: .8rem;
    color: var(--ink-3);
}
.pl-result-text strong { color: var(--ink); font-weight: 700; }
.pl-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Search */
.pl-search {
    position: relative;
}
.pl-search input {
    padding: 8px 14px 8px 34px;
    border: 1px solid var(--border-2);
    border-radius: var(--rs);
    
    font-size: .8rem;
    color: var(--ink);
    background: var(--surface);
    width: 200px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, width .2s;
}
.pl-search input::placeholder { color: var(--ink-4); }
.pl-search input:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(10,10,10,.06);
    width: 260px;
}
.pl-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    fill: var(--ink-4);
    pointer-events: none;
}

/* Sort */
.pl-sort {
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--border-2);
    border-radius: var(--rs);
    
    font-size: .8rem;
    color: var(--ink);
    background: var(--surface);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color .15s;
}
.pl-sort:focus { border-color: var(--ink); }

/* View toggle */
.pl-view-btns {
    display: flex;
    border: 1px solid var(--border-2);
    border-radius: var(--rs);
    overflow: hidden;
    background: var(--surface);
}
.pl-view-btn {
    padding: 7px 10px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--ink-4);
    transition: background .12s, color .12s;
}
.pl-view-btn svg { width: 16px; height: 16px; fill: currentColor; }
.pl-view-btn.active { background: var(--ink); color: var(--surface); }
.pl-view-btn + .pl-view-btn { border-left: 1px solid var(--border-2); }

/* ── Section heading ── */
.pl-section { transition: opacity .2s; }
.pl-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 0 14px;
}
.pl-section-head h2 {
    
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
}
.pl-section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.pl-section-count {
    font-size: .68rem;
    font-weight: 700;
    
    color: var(--ink-3);
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Grid ── */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding-bottom: 28px;
}
.pl-grid.list-view {
    grid-template-columns: 1fr;
    gap: 8px;
}

/* ── Card ── */
.pl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    animation: cardIn .3s ease both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.pl-card:hover {
    border-color: var(--border-2);
    box-shadow: var(--shadow-l);
    transform: translateY(-2px);
}
.pl-card.pl-hidden { display: none; }

/* List view card */
.pl-grid.list-view .pl-card {
    flex-direction: row;
    border-radius: var(--rs);
}
.pl-grid.list-view .pl-img-wrap {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    border-bottom: none;
}
.pl-grid.list-view .pl-card-body {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
}
.pl-grid.list-view .pl-name { flex: 1; min-width: 140px; -webkit-line-clamp: 1; }
.pl-grid.list-view .pl-price-row { margin-top: 0; }
.pl-grid.list-view .pl-stock { margin-top: 0; }
.pl-grid.list-view .pl-card-foot {
    flex-direction: row;
    padding: 0 14px 0 0;
    align-self: center;
    gap: 6px;
    flex-shrink: 0;
}
.pl-grid.list-view .pl-badges { top: 8px; left: 8px; }

/* Badges */
.pl-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 3;
}
.pl-badge {
    font-size: .6rem;
    font-weight: 800;
    
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.5;
}
.pl-badge-sale { background: var(--accent); color: #fff; }
.pl-badge-oos  { background: var(--ink); color: #fff; }

/* Image */
.pl-img-wrap {
    background: var(--surface-2);
    height: 170px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.pl-slide {
    display: flex;
    height: 100%;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.pl-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    flex-shrink: 0;
}

/* Arrows */
.pl-arr {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, box-shadow .15s;
    z-index: 2;
    box-shadow: var(--shadow-s);
}
.pl-arr svg { width: 10px; height: 10px; fill: var(--ink); }
.pl-arr-l { left: 6px; }
.pl-arr-r { right: 6px; }
.pl-img-wrap:hover .pl-arr { opacity: 1; }
.pl-arr:hover { box-shadow: var(--shadow-m); }

/* Dots */
.pl-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
}
.pl-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink-4);
    cursor: pointer;
    transition: background .15s, width .15s;
}
.pl-dot.on { background: var(--ink); width: 12px; border-radius: 2px; }

/* No image */
.pl-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ink-4);
    font-size: .68rem;
    
    letter-spacing: .05em;
    text-transform: uppercase;
}
.pl-no-img svg { width: 28px; height: 28px; fill: var(--border-2); }

/* Card body */
.pl-card-body {
    padding: 10px 12px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pl-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.pl-sku {
    font-size: .62rem;
    font-weight: 600;
    
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.pl-cat-tag {
    font-size: .6rem;
    font-weight: 700;
    
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--surface-3);
    color: var(--ink-3);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}
.pl-name {
    
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.pl-model {
    font-size: .65rem;
    color: var(--ink-4);
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price */
.pl-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 3px;
    flex-wrap: wrap;
}
.pl-price {
    
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.01em;
}
.pl-old {
    font-size: .72rem;
    color: var(--ink-4);
    text-decoration: line-through;
}
.pl-pct {
    font-size: .6rem;
    font-weight: 800;
    
    letter-spacing: .05em;
    color: var(--accent);
    background: var(--accent-2);
    border: 1px solid var(--accent-3);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Stock */
.pl-stock {
    font-size: .68rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    
}
.pl-stock-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pl-stock.in .pl-stock-dot { background: var(--green); }
.pl-stock.out .pl-stock-dot { background: var(--ink-4); }
.pl-stock.in { color: var(--green); }
.pl-stock.out { color: var(--ink-4); }

/* Footer buttons */
.pl-card-foot {
    padding: 8px 10px 10px;
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.pl-btn {
    flex: 1;
    padding: 7px 8px;
    border-radius: var(--rs);
    font-size: .73rem;
    font-weight: 600;
    
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1;
}
.pl-btn svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; }
.pl-btn-outline {
    border-color: var(--border-2);
    color: var(--ink-2);
    background: var(--surface);
}
.pl-btn-outline:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.pl-btn-solid {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
}
.pl-btn-solid:hover:not([disabled]) { background: #222; }
.pl-btn-solid[disabled] { opacity: .3; cursor: not-allowed; background: var(--ink-4); border-color: var(--ink-4); }

/* Empty */
.pl-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-4);
}
.pl-empty svg { width: 36px; height: 36px; fill: var(--border); margin-bottom: 10px; }
.pl-empty p { font-size: .82rem; }

.pl-spacer { height: 72px; }

@media (max-width: 600px) {
    .pl-toolbar { flex-direction: column; align-items: stretch; }
    .pl-tools { flex-wrap: wrap; }
    .pl-search input, .pl-search input:focus { width: 100%; }
}