/* ============================================================
   Trang Danh Mục Sản Phẩm - Julyem Gemstones
   Template: woocommerce/taxonomy-product_cat.php
   ============================================================ */

:root {
    --jlpc-navy-1: #07294a;
    --jlpc-navy-2: #04203c;
    --jlpc-panel:  #0b3056;
    --jlpc-panel-2:#0a2b4c;
    --jlpc-gold:   #cfa56a;
    --jlpc-gold-soft: rgba(207, 165, 106, .25);
    --jlpc-line:   rgba(207, 165, 106, .22);
    --jlpc-text:   #d9e3ee;
    --jlpc-muted:  #8ea2b6;
    --jlpc-cream:  #f3ece0;
}

/* Bỏ padding mặc định của Flatsome để dải nền tràn viền */
body.tax-product_cat #content,
body.tax-product_cat .page-wrapper > .row,
body.tax-product_cat #content .page-wrapper,
body.post-type-archive-product #content,
body.post-type-archive-product .page-wrapper > .row,
body.post-type-archive-product #content .page-wrapper { padding-top: 0 !important; padding-bottom: 0 !important; }
body.tax-product_cat #content,
body.post-type-archive-product #content { margin-top: 0 !important; }

/* Full-bleed wrapper */
.jl-pc {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: linear-gradient(180deg, var(--jlpc-navy-1) 0%, var(--jlpc-navy-2) 100%);
    color: var(--jlpc-text);
    line-height: 1.6;
}
.jl-pc *, .jl-pc *::before, .jl-pc *::after { box-sizing: border-box; }

.jl-pc-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ============ HERO ============ */
.jl-pc-hero {
    position: relative;
    background:
        radial-gradient(900px 420px at 88% 18%, rgba(207, 165, 106, .16), transparent 60%),
        linear-gradient(180deg, #062b4d 0%, transparent 100%);
    border-bottom: 1px solid var(--jlpc-line);
    overflow: hidden;
}
.jl-pc-hero-inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 40px;
    align-items: center;
    padding: 40px 28px 54px;
}
.jl-pc-crumbs {
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--jlpc-muted);
    margin-bottom: 22px;
}
.jl-pc-crumbs a { color: var(--jlpc-muted); text-decoration: none; transition: color .2s; }
.jl-pc-crumbs a:hover { color: var(--jlpc-gold); }
.jl-pc-sep { margin: 0 8px; opacity: .6; }
.jl-pc-crumb-current { color: var(--jlpc-gold); }

.jl-pc-title {
    color: var(--jlpc-gold);
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1.08;
    letter-spacing: .06em;
    margin: 0 0 18px;
    text-transform: uppercase;
    font-weight: 600;
}
.jl-pc-tagline {
    font-size: 17px;
    color: var(--jlpc-text);
    max-width: 560px;
    margin: 0 0 30px;
}

.jl-pc-features {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.jl-pc-feature { text-align: center; }
.jl-pc-feature-ic {
    display: inline-flex;
    width: 58px; height: 58px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--jlpc-gold-soft);
    color: var(--jlpc-gold);
    margin-bottom: 12px;
    background: rgba(207, 165, 106, .06);
}
.jl-pc-feature-tx {
    display: block;
    font-size: 13.5px;
    color: var(--jlpc-text);
    max-width: 150px;
    margin: 0 auto;
}

.jl-pc-hero-media {
    position: relative;
    min-height: 320px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.jl-pc-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jl-pc-hero-orb {
    position: absolute; inset: 0;
    background:
        radial-gradient(closest-side at 64% 42%, rgba(207, 165, 106, .55), rgba(207, 165, 106, .1) 70%, transparent),
        radial-gradient(closest-side at 30% 78%, rgba(255, 255, 255, .18), transparent 70%),
        linear-gradient(150deg, #0d3a64, #061f38);
}

/* ============ BODY ============ */
.jl-pc-body { padding: 44px 0 60px; }
.jl-pc-body-inner {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 34px;
    align-items: start;
}

/* ---- Sidebar ---- */
.jl-pc-panel {
    background: linear-gradient(180deg, var(--jlpc-panel), var(--jlpc-panel-2));
    border: 1px solid var(--jlpc-line);
    border-radius: 10px;
    padding: 22px 22px 24px;
    margin-bottom: 24px;
}
.jl-pc-panel-title {
    color: var(--jlpc-gold);
    font-size: 16px;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--jlpc-line);
    font-weight: 600;
}

.jl-pc-catlist { list-style: none; margin: 0; padding: 0; }
.jl-pc-catlist li + li { margin-top: 4px; }
.jl-pc-catlist a {
    display: block;
    padding: 8px 12px;
    color: var(--jlpc-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    transition: background .2s, color .2s;
}
.jl-pc-catlist a:hover { color: var(--jlpc-gold); background: rgba(207, 165, 106, .07); }
.jl-pc-catlist a.is-active {
    color: var(--jlpc-gold);
    font-weight: 600;
    background: rgba(207, 165, 106, .1);
    box-shadow: inset 2px 0 0 var(--jlpc-gold);
}

.jl-pc-fgroup { margin-bottom: 22px; }
.jl-pc-fgroup-title {
    font-size: 14px;
    color: var(--jlpc-text);
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: .02em;
}
.jl-pc-checks { list-style: none; margin: 0; padding: 0; }
.jl-pc-checks li + li { margin-top: 9px; }
.jl-pc-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--jlpc-muted);
    transition: color .2s;
}
.jl-pc-check:hover { color: var(--jlpc-text); }
.jl-pc-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.jl-pc-check-box {
    flex: 0 0 auto;
    width: 17px; height: 17px;
    border: 1px solid var(--jlpc-gold-soft);
    border-radius: 4px;
    position: relative;
    transition: border-color .2s, background .2s;
}
.jl-pc-check input:checked + .jl-pc-check-box {
    background: var(--jlpc-gold);
    border-color: var(--jlpc-gold);
}
.jl-pc-check input:checked + .jl-pc-check-box::after {
    content: "";
    position: absolute;
    left: 5px; top: 1.5px;
    width: 5px; height: 9px;
    border: solid #06203c;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.jl-pc-check input:focus-visible + .jl-pc-check-box { outline: 2px solid var(--jlpc-gold); outline-offset: 2px; }
.jl-pc-check input:checked ~ .jl-pc-check-tx { color: var(--jlpc-text); }

/* Price slider */
.jl-pc-price { margin-bottom: 18px; }
.jl-pc-slider {
    position: relative;
    height: 26px;
    margin: 6px 2px 0;
}
.jl-pc-slider-track {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 4px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}
.jl-pc-slider-range {
    position: absolute;
    top: 0; bottom: 0;
    background: var(--jlpc-gold);
    border-radius: 4px;
}
.jl-pc-slider-h {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 26px;
    margin: 0;
    background: transparent;
    pointer-events: none;
}
.jl-pc-slider-h::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--jlpc-gold);
    border: 2px solid #06203c;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
    cursor: pointer;
}
.jl-pc-slider-h::-moz-range-thumb {
    pointer-events: auto;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--jlpc-gold);
    border: 2px solid #06203c;
    cursor: pointer;
}
.jl-pc-price-vals {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--jlpc-muted);
    margin-top: 8px;
}

.jl-pc-filter-btn {
    width: 100%;
    margin-top: 6px;
    padding: 11px 16px;
    background: transparent;
    border: 1px solid var(--jlpc-gold);
    color: var(--jlpc-gold);
    border-radius: 6px;
    font-size: 13.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.jl-pc-filter-btn:hover { background: var(--jlpc-gold); color: #06203c; }

/* ---- Main ---- */
.jl-pc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--jlpc-line);
}
.jl-pc-count { margin: 0; font-size: 14.5px; color: var(--jlpc-muted); }
.jl-pc-sort { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.jl-pc-sort-lb { font-size: 14px; color: var(--jlpc-muted); white-space: nowrap; flex: 0 0 auto; }
.jl-pc-sort-sel { white-space: nowrap; }
.jl-pc-sort, .jl-pc-sort-sel, .jl-pc-sort-lb { margin-bottom: 0; }
.jl-pc-sort-sel {
    background: var(--jlpc-panel);
    border: 1px solid var(--jlpc-line);
    color: var(--jlpc-text);
    padding: 9px 36px 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    height: auto;
    cursor: pointer;
    appearance: none;
    -webkit-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 fill='none' stroke='%23cfa56a' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.jl-pc-sort-sel:focus { outline: none; border-color: var(--jlpc-gold); }

.jl-pc-grid {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.jl-pc-card {
    position: relative;
    background: linear-gradient(180deg, #0d3a64 0%, #0a2c4d 58%, #082544 100%);
    border: 1px solid var(--jlpc-line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.jl-pc-card:hover {
    transform: translateY(-6px);
    border-color: var(--jlpc-gold);
    box-shadow: 0 22px 44px rgba(0, 0, 0, .45),
                0 0 0 1px var(--jlpc-gold-soft),
                0 18px 40px rgba(207, 165, 106, .14);
}
.jl-pc-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(160deg, #fbf7f0, #ede3d2);
}
/* Đường chỉ vàng ngăn giữa ảnh và phần thân */
.jl-pc-card-media::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--jlpc-gold), transparent);
    opacity: .7;
}
.jl-pc-card-media img,
.jl-pc-card-media .jl-pc-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.jl-pc-card:hover .jl-pc-card-media img { transform: scale(1.06); }
.jl-pc-wish {
    position: absolute;
    top: 12px; right: 12px;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--jlpc-gold-soft);
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: var(--jlpc-gold);
    display: inline-flex;
    align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: background .2s, color .2s, transform .2s;
}
.jl-pc-wish svg { width: 19px !important; height: 19px !important; flex: none; }
.jl-pc-wish:hover { background: var(--jlpc-gold); color: #fff; transform: scale(1.08); }

.jl-pc-card-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.jl-pc-card-title {
    font-size: 15.5px;
    line-height: 1.5;
    margin: 0 0 12px;
    font-weight: 500;
    min-height: 2.85em;
}
.jl-pc-card-title a {
    color: var(--jlpc-text);
    text-decoration: none;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jl-pc-card-title a:hover { color: var(--jlpc-gold); }
.jl-pc-card-price {
    color: var(--jlpc-gold);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .01em;
    margin-bottom: 16px;
}
/* Ép màu gold cho cả các span con của WooCommerce (mặc định màu đen) */
.jl-pc-card-price .woocommerce-Price-amount,
.jl-pc-card-price .amount,
.jl-pc-card-price bdi,
.jl-pc-card-price ins,
.jl-pc-card-price .woocommerce-Price-currencySymbol { color: var(--jlpc-gold) !important; }
.jl-pc-card-price del,
.jl-pc-card-price del .woocommerce-Price-amount,
.jl-pc-card-price del bdi { color: var(--jlpc-muted) !important; font-weight: 400; font-size: 14px; margin-right: 6px; }
.jl-pc-card-price ins { text-decoration: none; }
.jl-pc-card-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--jlpc-gold);
    color: var(--jlpc-gold);
    background: transparent;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background .25s, color .25s, box-shadow .25s;
}
.jl-pc-card-btn::after {
    content: "";
    width: 15px; height: 15px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .25s;
}
.jl-pc-card-btn:hover {
    background: linear-gradient(135deg, #e7c690, var(--jlpc-gold));
    color: #06203c;
    box-shadow: 0 10px 22px rgba(207, 165, 106, .28);
}
.jl-pc-card-btn:hover::after { transform: translateX(3px); }

.jl-pc-empty { text-align: center; padding: 40px 0 20px; color: var(--jlpc-muted); }
.jl-pc-empty p { margin-bottom: 18px; }
.jl-pc-empty .jl-pc-card-btn { display: inline-block; }

/* Pagination */
.jl-pc-pagination { margin-top: 40px; }
.jl-pc-pagination .page-numbers {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0; padding: 0;
}
.jl-pc-pagination .page-numbers li { margin: 0; }
.jl-pc-pagination a.page-numbers,
.jl-pc-pagination span.page-numbers {
    display: inline-flex;
    align-items: center; justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 6px;
    border: 1px solid var(--jlpc-line);
    border-radius: 6px;
    color: var(--jlpc-text);
    text-decoration: none;
    font-size: 14px;
    transition: background .2s, color .2s, border-color .2s;
}
.jl-pc-pagination a.page-numbers:hover { border-color: var(--jlpc-gold); color: var(--jlpc-gold); }
.jl-pc-pagination span.page-numbers.current {
    background: var(--jlpc-gold);
    border-color: var(--jlpc-gold);
    color: #06203c;
    font-weight: 600;
}
.jl-pc-pagination .page-numbers.dots { border-color: transparent; }

/* ============ VÌ SAO... ============ */
.jl-pc-why {
    background: linear-gradient(180deg, #061f3a, #03182e);
    border-top: 1px solid var(--jlpc-line);
    padding: 56px 0 64px;
}
.jl-pc-why-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 0 0 44px;
    text-align: center;
}
.jl-pc-why-tx {
    color: var(--jlpc-gold);
    font-size: clamp(19px, 2.3vw, 26px);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
}
.jl-pc-why-orn {
    flex: 0 0 auto;
    width: clamp(40px, 8vw, 110px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--jlpc-gold));
}
.jl-pc-why-orn:last-child { background: linear-gradient(90deg, var(--jlpc-gold), transparent); }

.jl-pc-stones {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 26px;
}
.jl-pc-stone { text-align: center; }
.jl-pc-stone-orb {
    display: inline-block;
    width: 84px; height: 84px;
    border-radius: 50%;
    margin-bottom: 16px;
    background:
        radial-gradient(circle at 33% 28%, rgba(255, 255, 255, .55), transparent 42%),
        radial-gradient(circle at 68% 76%, rgba(0, 0, 0, .35), transparent 52%),
        var(--c, #cfa56a);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .12);
    border: 2px solid rgba(207, 165, 106, .45);
}
.jl-pc-stone-name {
    color: var(--jlpc-gold);
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 0 0 10px;
    font-weight: 600;
}
.jl-pc-stone-desc {
    font-size: 13px;
    color: var(--jlpc-muted);
    margin: 0;
    max-width: 200px;
    margin-inline: auto;
}

/* ============ TRUST BADGES ============ */
.jl-pc-trust {
    background: var(--jlpc-cream);
    color: #5b4a33;
}
.jl-pc-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-top: 34px;
    padding-bottom: 34px;
}
.jl-pc-trust-item { display: flex; align-items: center; gap: 14px; }
.jl-pc-trust-ic { flex: 0 0 auto; color: #b58f56; }
.jl-pc-trust-tx h3 {
    margin: 0 0 4px;
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7a5f30;
    font-weight: 700;
}
.jl-pc-trust-tx p { margin: 0; font-size: 13px; color: #6f6049; line-height: 1.5; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .jl-pc-hero-inner { grid-template-columns: 1fr; }
    .jl-pc-hero-media { min-height: 240px; order: -1; }
    .jl-pc-body-inner { grid-template-columns: 220px 1fr; gap: 24px; }
    .jl-pc-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .jl-pc-stones { grid-template-columns: repeat(3, 1fr); gap: 30px; }
    .jl-pc-trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .jl-pc-container { padding: 28px 18px; }
    .jl-pc-features { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    .jl-pc-body-inner { grid-template-columns: 1fr; }
    .jl-pc-sidebar { order: 2; }
    .jl-pc-grid { grid-template-columns: repeat(2, 1fr); }
    .jl-pc-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }
    .jl-pc-stones { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
    .jl-pc-grid { grid-template-columns: 1fr; }
    .jl-pc-features { grid-template-columns: 1fr 1fr; }
}
