/* ================================================================
   PATTERN — shop.css  (Malabar Gold inspired archive layout)
   Classes prefixed with .pgm- (Pattern Gold Malabar)
   ================================================================ */

/* ── Category Hero ─────────────────────────────────────────────── */
.pgm-cat-hero {
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-color: #0d0b08;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 36px;
}
.pgm-cat-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 55%, transparent 100%);
}
.pgm-cat-hero-content { position: relative; z-index: 2; }

.pgm-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; letter-spacing: .06em;
    margin-bottom: 14px;
}
.pgm-breadcrumb a { color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; }
.pgm-breadcrumb a:hover { color: var(--gold); }
.pgm-breadcrumb span { color: rgba(255,255,255,.35); }
.pgm-breadcrumb > span:last-child { color: rgba(255,255,255,.8); }

.pgm-cat-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 400;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.1;
}
.pgm-cat-hero-desc {
    font-size: 14px; color: rgba(255,255,255,.6);
    max-width: 520px; line-height: 1.65; margin: 0 0 16px;
}
.pgm-cat-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pgm-trust-badge {
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: rgba(255,255,255,.7);
    border: .5px solid rgba(255,255,255,.2);
    padding: 4px 12px; border-radius: 20px;
    background: rgba(255,255,255,.04);
}
.pgm-count-badge { color: var(--gold); border-color: rgba(212,175,55,.4); background: rgba(212,175,55,.07); }

/* ── Category Pills ─────────────────────────────────────────────── */
.pgm-pills-wrap {
    background: var(--bg-card, #111);
    border-bottom: .5px solid rgba(212,175,55,.12);
    padding: 12px 0;
    position: sticky;
    top: 72px;
    z-index: 80;
    transition: box-shadow .25s;
}
.pgm-pills-wrap.is-stuck { box-shadow: 0 4px 24px rgba(0,0,0,.5); }
.pgm-pills {
    display: flex; gap: 8px;
    overflow-x: auto; scrollbar-width: none;
    padding: 2px 0;
}
.pgm-pills::-webkit-scrollbar { display: none; }
.pgm-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 18px; border-radius: 24px;
    font-size: 12px; letter-spacing: .06em;
    border: .5px solid rgba(212,175,55,.2);
    color: var(--text-mid, #aaa);
    text-decoration: none;
    white-space: nowrap; flex-shrink: 0;
    background: transparent;
    transition: all .2s;
}
.pgm-pill:hover, .pgm-pill.is-active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212,175,55,.07);
}
.pgm-pill-count { font-size: 10px; opacity: .6; }

/* ── Main Layout ─────────────────────────────────────────────────── */
.pgm-shop-main { padding: 36px 0 80px; }
.pgm-layout {
    display: grid;
    grid-template-columns: 248px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Filter Sidebar ──────────────────────────────────────────────── */
.pgm-sidebar {
    position: sticky;
    top: 132px;
    border: .5px solid rgba(212,175,55,.12);
    border-radius: 10px;
    background: rgba(212,175,55,.02);
    overflow: hidden;
}
.pgm-sidebar-inner { padding: 0; }
.pgm-sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: .5px solid rgba(212,175,55,.1);
}
.pgm-sidebar-title {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--cream, #f0e6c8);
}
.pgm-clear-btn {
    font-size: 11px; color: var(--gold); background: none; border: none;
    cursor: pointer; letter-spacing: .06em; padding: 0;
}
.pgm-clear-btn:hover { text-decoration: underline; }

/* Filter groups */
.pgm-fgroup { border-bottom: .5px solid rgba(255,255,255,.05); }
.pgm-fgroup-head {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px;
    background: none; border: none; cursor: pointer;
    font-size: 11px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--cream, #f0e6c8); text-align: left;
}
.pgm-fgroup-head:hover { color: var(--gold); }
.pgm-chevron { transition: transform .2s; color: var(--text-dim, #666); flex-shrink: 0; }
.pgm-fgroup-head.is-open .pgm-chevron { transform: rotate(180deg); }
.pgm-fgroup-body { padding: 4px 18px 14px; display: block; }

/* Price inputs */
.pgm-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pgm-price-wrap { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pgm-price-wrap label { font-size: 10px; color: var(--text-dim, #666); letter-spacing: .06em; }
.pgm-pinput {
    width: 100%; padding: 7px 10px;
    background: rgba(255,255,255,.05);
    border: .5px solid rgba(212,175,55,.2);
    border-radius: 5px; color: var(--cream, #f0e6c8);
    font-size: 12px; box-sizing: border-box;
    font-family: var(--font-body, sans-serif);
}
.pgm-pinput:focus { outline: none; border-color: var(--gold); }
.pgm-dash { color: var(--text-dim, #666); flex-shrink: 0; font-size: 14px; }
.pgm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.pgm-preset {
    padding: 4px 10px; border-radius: 4px;
    font-size: 11px; border: .5px solid rgba(212,175,55,.2);
    background: transparent; color: var(--text-dim, #666); cursor: pointer;
    transition: all .2s;
}
.pgm-preset:hover, .pgm-preset.is-active { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,.06); }

/* Checkboxes */
.pgm-check-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0; font-size: 12px; color: var(--text-mid, #aaa);
    cursor: pointer; transition: color .15s;
}
.pgm-check-row:hover { color: var(--cream, #f0e6c8); }
.pgm-check-row input { width: 14px; height: 14px; cursor: pointer; accent-color: var(--gold); }
.pgm-metal-dot { width: 14px; height: 14px; border-radius: 50%; border: .5px solid rgba(255,255,255,.2); flex-shrink: 0; }

.pgm-apply-btn {
    width: 100%; padding: 12px 0;
    background: var(--gold); color: #000;
    border: none; font-size: 11px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase;
    cursor: pointer; transition: opacity .2s;
}
.pgm-apply-btn:hover { opacity: .88; }

/* ── Grid Area ───────────────────────────────────────────────────── */
.pgm-grid-area { min-width: 0; }

/* Toolbar */
.pgm-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    padding-bottom: 16px;
    border-bottom: .5px solid rgba(212,175,55,.1);
    margin-bottom: 28px;
}
.pgm-total-count { font-size: 12px; color: var(--text-dim, #666); letter-spacing: .05em; }
.pgm-toolbar-right { display: flex; align-items: center; gap: 10px; }
.pgm-sort {
    padding: 7px 30px 7px 12px; border-radius: 5px;
    background: rgba(255,255,255,.05);
    border: .5px solid rgba(212,175,55,.2);
    color: var(--cream, #f0e6c8); font-size: 12px;
    font-family: var(--font-body, sans-serif);
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23D4AF37' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.pgm-sort option { background: #111; }
.pgm-mob-filter {
    display: none; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 6px;
    border: .5px solid rgba(212,175,55,.25);
    background: transparent; color: var(--gold);
    font-size: 12px; font-weight: 600; cursor: pointer;
}

/* ── Category Sections ──────────────────────────────────────────── */
.pgm-section { margin-bottom: 52px; }
.pgm-section:last-of-type { margin-bottom: 0; }
.pgm-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: .5px solid rgba(212,175,55,.12);
}
.pgm-section-title {
    font-family: var(--font-serif);
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 400;
    color: var(--cream, #f0e6c8);
    margin: 0;
}
.pgm-section-view-all {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold); text-decoration: none;
    border-bottom: .5px solid rgba(212,175,55,.3);
    padding-bottom: 1px;
    white-space: nowrap; flex-shrink: 0;
    transition: letter-spacing .2s;
}
.pgm-section-view-all:hover { letter-spacing: .2em; }

/* ── 4-Column Product Grid ──────────────────────────────────────── */
.pgm-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: start;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pgm-pagination { margin-top: 48px; }
.pgm-page-nav {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; flex-wrap: wrap;
}
.pgm-page-num, .pgm-page-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-width: 38px; height: 38px; padding: 0 14px;
    border-radius: 6px;
    border: .5px solid rgba(212,175,55,.15);
    color: var(--text-mid, #aaa);
    text-decoration: none; font-size: 13px;
    transition: all .2s;
}
.pgm-page-num { padding: 0; width: 38px; }
.pgm-page-num:hover, .pgm-page-btn:hover { border-color: rgba(212,175,55,.4); color: var(--gold); }
.pgm-page-num.is-active { border-color: var(--gold); background: rgba(212,175,55,.1); color: var(--gold); font-weight: 600; }
.pgm-page-ellipsis { color: var(--text-dim, #666); padding: 0 4px; }

/* ── No Products ─────────────────────────────────────────────────── */
.pgm-empty { text-align: center; padding: 80px 0; }
.pgm-empty-icon { font-size: 56px; margin-bottom: 16px; opacity: .25; }
.pgm-empty h2 { font-family: var(--font-serif); font-size: 24px; color: var(--cream, #f0e6c8); margin-bottom: 10px; }
.pgm-empty p { font-size: 14px; color: var(--text-dim, #666); margin-bottom: 24px; }

/* ── Trending Section ────────────────────────────────────────────── */
.pgm-trending-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #0d0c08 100%);
    border-top: .5px solid rgba(212,175,55,.1);
    padding: 72px 0 80px;
}
.pgm-trending-head { margin-bottom: 28px; }
.pgm-trending-grid { /* inherits .pgm-4col */ }

/* ── Mobile Filter Backdrop ─────────────────────────────────────── */
.pgm-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 899;
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
}
.pgm-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* ── Responsive ─────────────────────────────────────────────────── */

/* Between 1200px–1440px: sidebar + 4 columns */
@media (max-width: 1279px) {
    .pgm-layout { grid-template-columns: 220px 1fr; gap: 24px; }
    .pgm-4col { gap: 16px; }
}

/* Collapse sidebar at 1024px → show mobile filter button */
@media (max-width: 1023px) {
    .pgm-layout { grid-template-columns: 1fr; }
    .pgm-mob-filter { display: inline-flex; }
    .pgm-sidebar {
        position: fixed; top: 0; left: -100%; bottom: 0;
        width: min(300px, 88vw); z-index: 900;
        border-radius: 0;
        overflow-y: auto;
        transition: left .3s ease;
        border: none;
        box-shadow: 4px 0 32px rgba(0,0,0,.7);
    }
    .pgm-sidebar.is-open { left: 0; }
    .pgm-backdrop { display: block; }
    /* Without sidebar → 4 col still fit on tablet */
    .pgm-4col { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}

@media (max-width: 767px) {
    .pgm-4col { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pgm-cat-hero { min-height: 220px; }
    .pgm-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .pgm-trending-section { padding: 48px 0 56px; }
}

@media (max-width: 479px) {
    .pgm-4col { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pgm-pills-wrap { top: 60px; }
}
