/* v2 Category page — clean editorial layout, no facets/sort/limit chrome.
   Loads after _base + _pcard. */

/* Hide Journal3 column-left/right and content_top/bottom we don't render. */
.v2-cat-com .module.module-newsletter { display: none !important; }

.v2-section {
    padding: 32px 0;
}
.v2-section__title {
    font-family: var(--ff-head);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 24px;
    letter-spacing: -0.2px;
}

/* ---------- BREADCRUMBS ---------- */
.v2-breadcrumbs {
    padding: 16px 0 8px;
    font-family: var(--ff-body);
    font-size: 13px;
    color: var(--ink-muted);
    border-bottom: 1px solid var(--border);
}
.v2-breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}
.v2-breadcrumbs a {
    color: var(--ink-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 8px;
}
.v2-breadcrumbs a:hover { color: var(--brand-teal); }
.v2-breadcrumbs__sep {
    margin-left: 6px;
    font-size: 14px;
    color: var(--ink-muted);
    opacity: 0.5;
}
.v2-breadcrumbs [aria-current="page"] {
    color: var(--ink);
    font-weight: 500;
}

/* ---------- CATEGORY HERO (v1 parity: centered title, image+text below) ---------- */
.v2-cat-hero {
    padding: 28px 32px;
    margin: 16px 0 32px;
    background: var(--bg-section);
    border-radius: 12px;
}
.v2-cat-hero__title {
    font-family: var(--ff-head);
    font-size: 32px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 24px;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.v2-cat-hero__title::before,
.v2-cat-hero__title::after {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    background: var(--brand-teal);
    border-radius: 2px;
}
.v2-cat-hero__cols {
    display: grid;
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}
.v2-cat-hero__media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--bg-white);
    width: 100%;
    max-width: 280px;
    box-shadow: 0 8px 32px rgba(28, 32, 33, 0.12);
}
.v2-cat-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.v2-cat-hero__text {
    min-width: 0;
}
.v2-cat-hero__desc {
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-secondary);
    /* Clamp like v1 — keeps hero compact, full text on product page */
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.v2-cat-hero__desc h2,
.v2-cat-hero__desc h3 {
    font-family: var(--ff-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 14px;
    line-height: 1.25;
}
.v2-cat-hero__desc p { margin: 0 0 14px; }
.v2-cat-hero__desc p:last-child { margin-bottom: 0; }
.v2-cat-hero__desc strong { color: var(--ink); }

/* ---------- SUBCATEGORY SLIDER ---------- */
.v2-cat-slider {
    padding: 24px 0 16px;
    overflow: hidden;
}
.v2-cat-slider .v2-section__title {
    margin-bottom: 20px;
}

/* ---------- PRODUCTS GRID ---------- */
.v2-cat-products {
    padding-top: 48px;
}
.v2-cat-products__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 14px;
}
.v2-cat-products__count {
    font-family: var(--ff-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    padding-left: 14px;
    border-left: 3px solid var(--brand-teal);
    line-height: 1.2;
}
.v2-cat-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px 24px;
    align-items: start;
}
.v2-cat-products__grid .v2-pcard {
    width: 100%;
    /* Stretch to row height so Add to Cart sits on a shared baseline. */
    height: 100%;
}
.v2-cat-products__grid .v2-pcard__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

/* Pagination — re-style OC's default markup just enough to fit. */
.v2-cat-products__pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    font-family: var(--ff-body);
}
.v2-cat-products__pagination .pagination,
.v2-cat-products__pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}
.v2-cat-products__pagination li a,
.v2-cat-products__pagination li span {
    display: inline-block;
    padding: 8px 12px;
    color: var(--ink-secondary);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
}
.v2-cat-products__pagination li.active a,
.v2-cat-products__pagination li.active span,
.v2-cat-products__pagination li a:hover {
    background: var(--brand-teal);
    color: #fff;
    border-color: var(--brand-teal);
}

.v2-cat-products__empty {
    text-align: center;
    padding: 64px 0;
}
.v2-cat-products__empty p {
    font-size: 16px;
    color: var(--ink-muted);
    margin: 0 0 24px;
}

/* ---------- NEWSLETTER (matches home) ---------- */
.v2-cat-com .v2-newsletter {
    background: #4D7F95;
    padding: 56px 0;
    margin-top: 48px;
    text-align: center;
    color: #fff;
}
.v2-cat-com .v2-newsletter__title {
    font-family: var(--ff-head);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.3px;
}
.v2-cat-com .v2-newsletter__sub {
    font-family: var(--ff-body);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px;
}
.v2-cat-com .v2-newsletter__form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
}
.v2-cat-com .v2-newsletter__form input {
    flex: 1 1 auto;
    padding: 12px 16px;
    border: 0;
    border-radius: var(--radius);
    font-family: var(--ff-body);
    /* 16px+ avoids iOS Safari auto-zoom on focus. */
    font-size: 16px;
    color: var(--ink);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .v2-cat-hero__cols { grid-template-columns: 1fr; gap: 20px; }
    .v2-cat-hero__media { max-width: 100%; aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
    .v2-cat-hero { padding: 16px 0 24px; }
    .v2-cat-hero__title { font-size: 24px; margin-bottom: 16px; }
    .v2-cat-hero__media { aspect-ratio: 4 / 3; }
    .v2-cat-hero__desc { font-size: 14px; line-height: 1.6; -webkit-line-clamp: 6; }

    .v2-section__title { font-size: 20px; }
    .v2-cat-slider .v2-hscroll__track { grid-auto-columns: 200px; }

    .v2-cat-products { padding-top: 24px; }
    .v2-cat-products__bar { margin-bottom: 16px; padding-bottom: 10px; }
    .v2-cat-products__grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
    .v2-cat-products__grid .v2-pcard__media { aspect-ratio: 1 / 1; }

    .v2-cat-products__grid .v2-pcard__actions { gap: 4px; }
    .v2-cat-products__grid .v2-pcard__cart {
        min-height: 44px;
        font-size: 13px;
        padding: 9px 6px;
        letter-spacing: 0.3px;
    }
    .v2-cat-products__grid .v2-pcard__wish { width: 44px; min-height: 44px; }
    .v2-cat-products__grid .v2-pcard__name { font-size: 14px; }
    .v2-cat-products__grid .v2-pcard__desc { display: none; }
    .v2-cat-products__grid .v2-pcard__price { font-size: 14px; margin: 4px 0 8px; }

    .v2-cat-com .v2-newsletter__form { flex-direction: column; }
}
