/* ═══════════════════════════════════════════════════════════════
   Parinhall — Shop / Category Page Styles
   shop.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── Scrollbar helpers ─────────────────────────────────────── */
.ph-scroller { scrollbar-width: none; -ms-overflow-style: none; }
.ph-scroller::-webkit-scrollbar { display: none; }
.ph-thin::-webkit-scrollbar { width: 4px; }
.ph-thin { scrollbar-width: thin; scrollbar-color: #D8D2C8 transparent; }

/* ═══════════════════════════════════════════════════════════════
   CATEGORY HERO
   ═══════════════════════════════════════════════════════════════ */
.ph-cat-hero {
    background: linear-gradient(130deg, #1B7A8C 0%, #2E8FA0 55%, #7ABCC8 100%);
    position: relative;
    overflow: hidden;
}

.ph-cat-hero__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 120% at 90% 50%, rgba(255,255,255,.14), transparent 60%);
    pointer-events: none;
}

.ph-cat-hero__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 32px;
    position: relative;
}

/* Breadcrumb */
.ph-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 12.5px; color: rgba(255,255,255,.75); }
.ph-breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
.ph-breadcrumb a:hover { color: #fff; }
.ph-breadcrumb__sep { opacity: .6; }
.ph-breadcrumb span:last-child { color: #fff; font-weight: 500; }

/* WooCommerce breadcrumb overrides */
.ph-cat-hero .woocommerce-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.75); margin: 0 0 14px; }
.ph-cat-hero .woocommerce-breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.ph-cat-hero .woocommerce-breadcrumb a:hover { color: #fff; }

.ph-cat-hero__body {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.ph-cat-hero__text { flex: 1; min-width: 0; }

.ph-cat-hero__title {
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: clamp(32px, 3.5vw, 46px);
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.ph-cat-hero__desc {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    margin-top: 6px;
    font-weight: 300;
    max-width: 480px;
    line-height: 1.7;
}

.ph-cat-hero__chip {
    flex-shrink: 0;
    text-align: center;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 14px;
    padding: 14px 24px;
}

.ph-cat-hero__chip-count {
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: 32px;
    color: #fff;
    line-height: 1.1;
}

.ph-cat-hero__chip-label {
    font-size: 12px;
    color: rgba(255,255,255,.8);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   SUBCATEGORY PILLS — sticky strip
   ═══════════════════════════════════════════════════════════════ */
.ph-subcat-bar {
    background: #fff;
    border-bottom: 1px solid rgba(32,38,31,.08);
    position: sticky;
    top: 96px; /* adjust if header height changes */
    z-index: 50;
}

.ph-subcat-bar__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-block: 10px;
}

.ph-subcat-pill {
    padding: 7px 16px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s;
    border: 1.5px solid rgba(32,38,31,.12);
    background: #fff;
    color: #5B6358;
    text-decoration: none;
    flex-shrink: 0;
}

.ph-subcat-pill:hover {
    border-color: #20261F;
    color: #20261F;
}

.ph-subcat-pill--active {
    background: #20261F;
    border-color: #20261F;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT: sidebar + products
   ═══════════════════════════════════════════════════════════════ */
.ph-shop-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 32px 80px;
    display: grid;
    grid-template-columns: 252px 1fr;
    gap: 24px;
    align-items: start;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.ph-sidebar {
    position: sticky;
    top: 160px;
    max-height: calc(100vh - 172px);
    overflow-y: auto;
    padding-left: 4px;
}

.ph-sidebar__card {
    background: #fff;
    border: 1px solid rgba(32,38,31,.08);
    border-radius: 14px;
    overflow: hidden;
}

/* Sidebar header */
.ph-sidebar__hdr {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(32,38,31,.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ph-sidebar__hdr-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #20261F;
}

.ph-sidebar__clear {
    font-size: 12px;
    color: #E2734A;
    text-decoration: none;
    transition: text-decoration .15s;
}

.ph-sidebar__clear:hover { text-decoration: underline; }

/* Filter section */
.ph-filter-section { border-bottom: 1px solid rgba(32,38,31,.06); }

.ph-filter-section__toggle {
    width: 100%;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #20261F;
    text-align: right;
    user-select: none;
}

.ph-filter-section__body { padding: 0 18px 14px; }

/* Brand checkboxes */
.ph-filter-check {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 0;
    cursor: pointer;
    text-decoration: none;
    color: #5B6358;
    font-size: 13px;
    transition: color .15s;
}

.ph-filter-check--on { color: #1B7A8C; }

.ph-filter-check__box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid rgba(32,38,31,.2);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}

.ph-filter-check__box--on {
    border-color: #1B7A8C;
    background: #1B7A8C;
}

.ph-filter-count {
    font-size: 11px;
    color: #A6AC9E;
    background: #F4F1EB;
    border-radius: 8px;
    padding: 2px 7px;
    margin-right: auto;
}

/* Price bar */
.ph-price-bar {
    height: 4px;
    background: #F0EDE8;
    border-radius: 4px;
    position: relative;
    margin: 4px 0 12px;
}

.ph-price-bar__fill {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to left, #1B7A8C, #7ABCC8);
    border-radius: 4px;
    width: 100%;
}

.ph-price-presets {
    display: flex;
    gap: 7px;
    margin-top: 10px;
}

.ph-price-preset {
    flex: 1;
    text-align: center;
    padding: 5px 0;
    border-radius: 7px;
    font-size: 11.5px;
    cursor: pointer;
    border: 1px solid rgba(32,38,31,.12);
    background: transparent;
    color: #5B6358;
    text-decoration: none;
    transition: all .2s;
}

.ph-price-preset:hover { border-color: #1B7A8C; color: #1B7A8C; }
.ph-price-preset--active { border-color: #1B7A8C; background: #E0F2F5; color: #1B7A8C; }

/* Rating rows */
.ph-rating-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 9px;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    color: #5B6358;
    font-size: 12px;
    transition: background .2s;
}

.ph-rating-row:hover { background: #F4F1EB; }
.ph-rating-row--active { background: #E0F2F5; color: #1B7A8C; }

.ph-stars { color: #E2734A; letter-spacing: 1px; font-size: 13px; }

/* Skin type pills */
.ph-skin-pills { display: flex; flex-wrap: wrap; gap: 7px; }

.ph-skin-pill {
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    cursor: pointer;
    border: 1.5px solid rgba(32,38,31,.14);
    background: transparent;
    color: #5B6358;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}

.ph-skin-pill:hover { border-color: #1B7A8C; color: #1B7A8C; }
.ph-skin-pill--on { border-color: #1B7A8C; background: #E0F2F5; color: #1B7A8C; }

/* Sale / Stock toggles */
.ph-filter-toggles { padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; }

.ph-filter-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-decoration: none;
    color: #20261F;
    font-size: 13px;
}

.ph-toggle {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #D8D2C8;
    position: relative;
    transition: background .25s;
    flex-shrink: 0;
}

.ph-toggle--on { background: #1B7A8C; }

.ph-toggle__knob {
    position: absolute;
    top: 3px;
    right: 21px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: right .25s;
}

.ph-toggle--on .ph-toggle__knob { right: 3px; }

/* ═══════════════════════════════════════════════════════════════
   SORT BAR
   ═══════════════════════════════════════════════════════════════ */
.ph-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.ph-sort-bar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ph-sort-bar__count { font-size: 13.5px; color: #5B6358; }
.ph-sort-bar__count strong { color: #20261F; font-weight: 600; }

.ph-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #E0F2F5;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    color: #1B7A8C;
}

.ph-chip__x {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: .7;
    text-decoration: none;
    color: #1B7A8C;
    transition: opacity .15s;
}

.ph-chip__x:hover { opacity: 1; }

/* Sort dropdown */
.ph-sort-dropdown { position: relative; }

.ph-sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid rgba(32,38,31,.12);
    border-radius: 10px;
    padding: 7px 14px;
    cursor: pointer;
    background: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    color: #20261F;
    transition: border-color .2s;
}

.ph-sort-btn:hover { border-color: #1B7A8C; }

.ph-sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid rgba(32,38,31,.1);
    border-radius: 12px;
    box-shadow: 0 16px 32px -16px rgba(32,38,31,.28);
    min-width: 200px;
    z-index: 20;
    overflow: hidden;
}

.ph-sort-item {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    color: #5B6358;
    text-decoration: none;
    transition: background .15s;
    font-weight: 400;
}

.ph-sort-item:hover { background: #F4F1EB; }
.ph-sort-item--active { color: #1B7A8C; background: #F0FAFB; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════
   4-COLUMN PRODUCT GRID
   ═══════════════════════════════════════════════════════════════ */
.ph-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── Product Card ──────────────────────────────────────────── */
.ph-card {
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    border: 1px solid rgba(32,38,31,.07);
    cursor: pointer;
    transition: transform .3s, box-shadow .3s;
    position: relative;
}

.ph-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -18px rgba(32,38,31,.32);
}

/* Image wrapper */
.ph-card__img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1.15;
    overflow: hidden;
    text-decoration: none;
}

.ph-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ph-card__gradient-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(85% 65% at 28% 14%, rgba(255,255,255,.26), transparent 55%);
}

.ph-card__placeholder {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    font-family: 'Markazi Text', serif;
    font-size: 15px;
    color: rgba(255,255,255,.5);
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
}

/* Discount badge — top-right */
.ph-card__disc {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #E2734A;
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

/* Label badge — top-left */
.ph-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(251,249,245,.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-size: 10px;
    color: #1B7A8C;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Wishlist button — bottom-left */
.ph-card__wish {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(251,249,245,.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    padding: 0;
}

.ph-card__wish:hover { background: #fff; }
.ph-card__wish--active svg { fill: #E2734A; stroke: #E2734A; }

/* Color swatches — bottom-right of image */
.ph-card__swatches {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.ph-card__swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: inline-block;
    flex-shrink: 0;
}

/* Card body */
.ph-card__body { padding: 11px 12px 12px; }

.ph-card__brand {
    font-size: 10.5px;
    color: #8A9382;
    margin-bottom: 2px;
}

.ph-card__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    color: #20261F;
    text-decoration: none;
}

.ph-card__name:hover { color: #1B7A8C; }

.ph-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
}

.ph-card__rating .ph-stars { font-size: 11px; }

.ph-card__review-cnt { font-size: 11px; color: #A6AC9E; }

/* Card footer: price + add button */
.ph-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 6px;
}

.ph-card__price { flex: 1; min-width: 0; }

/* WooCommerce price overrides inside card */
.ph-card__price .price { display: flex; flex-direction: column; }
.ph-card__price .price del { font-size: 11px; color: #A6AC9E; }
.ph-card__price .price del .woocommerce-Price-amount { font-size: 11px; color: #A6AC9E; }
.ph-card__price .price ins { text-decoration: none; }
.ph-card__price .price ins .woocommerce-Price-amount { font-size: 14px; color: #1B7A8C; font-weight: 600; }
.ph-card__price .price .woocommerce-Price-amount { font-size: 14px; color: #1B7A8C; font-weight: 600; }

/* Add-to-cart circular button */
.ph-card__add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #20261F;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s;
    padding: 0;
}

.ph-card__add:hover { background: #E2734A; }
.ph-card__add:disabled { background: #1B7A8C; cursor: default; }

.ph-card__outofstock {
    font-size: 11px;
    color: #A6AC9E;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   LOAD MORE / PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.ph-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.ph-load-more-btn {
    background: #fff;
    border: 1.5px solid rgba(32,38,31,.14);
    border-radius: 22px;
    padding: 12px 32px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    color: #20261F;
    text-decoration: none;
    transition: all .25s;
    display: inline-block;
}

.ph-load-more-btn:hover { border-color: #1B7A8C; color: #1B7A8C; }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.ph-empty-state {
    text-align: center;
    padding: 80px 32px;
}

.ph-empty-state__title {
    font-family: 'Markazi Text', serif;
    font-size: 28px;
    color: #8A9382;
    margin-bottom: 10px;
}

.ph-empty-state__sub {
    font-size: 14px;
    color: #A6AC9E;
    margin-bottom: 22px;
}

.ph-empty-state__btn {
    background: #E2734A;
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 11px 24px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background .25s;
}

.ph-empty-state__btn:hover { background: #C9541F; }

/* ═══════════════════════════════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════════════════════════════ */
.ph-back-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 82;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #20261F;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 13px 26px -11px rgba(20,26,18,.5);
    transition: background .25s, opacity .3s, transform .3s;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
}

.ph-back-top--show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ph-back-top:hover { background: #E2734A; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .ph-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .ph-shop-layout {
        grid-template-columns: 1fr;
        padding: 16px 20px 60px;
    }
    .ph-sidebar {
        position: static;
        max-height: none;
    }
    .ph-product-grid { grid-template-columns: repeat(2, 1fr); }
    .ph-cat-hero__inner { padding: 20px; }
    .ph-subcat-bar__inner { padding: 0 20px; }
    .ph-subcat-bar { top: 64px; }
}

@media (max-width: 560px) {
    .ph-product-grid { grid-template-columns: 1fr; }
    .ph-cat-hero__body { flex-direction: column; align-items: flex-start; }
}
