/**
 * Happy Pens Core — Brand All Models
 */

.hpc-brand-all-models {
    --hpc-bam-text: #161311;
    --hpc-bam-muted: #5f5a54;
    --hpc-bam-gold: #b08a52;
    --hpc-bam-bg: #FAF8F5;
    --hpc-bam-border: #dfd6ca;
    --hpc-bam-white: #ffffff;

    width: 100%;
    color: var(--hpc-bam-text);
}

.hpc-brand-all-models,
.hpc-brand-all-models * {
    box-sizing: border-box;
}


/* =========================================================
   BREADCRUMBS
========================================================= */

.hpc-brand-all-models__breadcrumbs {
    margin: 0 0 28px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.hpc-brand-all-models__breadcrumb-list {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
}

.hpc-brand-all-models__breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--hpc-bam-muted);
}

.hpc-brand-all-models__breadcrumb-item + .hpc-brand-all-models__breadcrumb-item::before {
    content: "/";
    color: #9a938b;
}

.hpc-brand-all-models__breadcrumb-item a {
    color: var(--hpc-bam-muted);
    text-decoration: none;
}

.hpc-brand-all-models__breadcrumb-item a:hover,
.hpc-brand-all-models__breadcrumb-item a:focus {
    color: #9e641d;
    text-decoration: none;
}


/* =========================================================
   HEADER
========================================================= */

.hpc-brand-all-models__header {
    margin: 0 0 34px;
}

.hpc-brand-all-models__title {
    margin: 0;
    color: var(--hpc-bam-text);
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.hpc-brand-all-models__total-count {
    margin-top: 10px;
    color: var(--hpc-bam-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.3;
}


/* =========================================================
   TOOLBAR
========================================================= */

.hpc-brand-all-models__toolbar {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.6fr)
        minmax(220px, 0.7fr)
        minmax(270px, 0.8fr);
    width: 100%;
    margin: 0;
    padding: 18px 0;
    align-items: center;
    gap: 22px;
    border-top: 1px solid var(--hpc-bam-border);
    border-bottom: 1px solid var(--hpc-bam-border);
}

.hpc-brand-all-models__control {
    display: flex;
    min-width: 0;
    align-items: center;
}

.hpc-brand-all-models__control--search {
    display: block;
}

.hpc-brand-all-models__control--inline {
    flex-direction: row;
    gap: 10px;
}

.hpc-brand-all-models__control-label {
    flex: 0 0 auto;
    color: var(--hpc-bam-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.hpc-brand-all-models__search-wrap {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    overflow: hidden;
    color: var(--hpc-bam-text);
    background: var(--hpc-bam-white);
    border: 1px solid var(--hpc-bam-border);
    border-radius: 2px;
    box-shadow: none;
}

.hpc-brand-all-models__search-icon {
    display: block;
    width: 17px;
    height: 17px;
    margin-left: 14px;
    flex: 0 0 17px;
    color: #706a64;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.hpc-brand-all-models__search,
.hpc-brand-all-models__era,
.hpc-brand-all-models__sort {
    width: 100%;
    min-height: 42px;
    margin: 0;
    color: var(--hpc-bam-text);
    background: var(--hpc-bam-white);
    border: 1px solid var(--hpc-bam-border);
    border-radius: 2px;
    box-shadow: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.25;
}

.hpc-brand-all-models__search {
    min-width: 0;
    min-height: 40px;
    padding: 9px 12px 9px 10px !important;
    flex: 1 1 auto;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0;
    -webkit-appearance: none;
    appearance: none;
}

.hpc-brand-all-models__search::-webkit-search-decoration,
.hpc-brand-all-models__search::-webkit-search-cancel-button,
.hpc-brand-all-models__search::-webkit-search-results-button,
.hpc-brand-all-models__search::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.hpc-brand-all-models__era,
.hpc-brand-all-models__sort {
    min-width: 0;
    padding: 8px 34px 8px 11px;
}

.hpc-brand-all-models__control--inline .hpc-brand-all-models__era,
.hpc-brand-all-models__control--inline .hpc-brand-all-models__sort {
    flex: 1 1 auto;
}

.hpc-brand-all-models__search-wrap:focus-within,
.hpc-brand-all-models__era:focus,
.hpc-brand-all-models__sort:focus {
    border-color: var(--hpc-bam-gold);
    outline: 1px solid var(--hpc-bam-gold);
    outline-offset: 0;
}

.hpc-brand-all-models__search:focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.hpc-brand-all-models__results-bar {
    display: flex;
    min-height: 44px;
    padding: 13px 0 10px;
    align-items: center;
    justify-content: flex-end;
}

.hpc-brand-all-models__results-count {
    color: var(--hpc-bam-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.3;
}


/* =========================================================
   MODEL LIST
========================================================= */

.hpc-brand-all-models__list {
    width: 100%;
    border-top: 1px solid var(--hpc-bam-border);
}

.hpc-brand-all-models__item {
    display: grid;
    grid-template-columns: minmax(0, 68%) minmax(230px, 32%);
    width: 100%;
    min-height: 150px;
    margin: 0;
    padding: 20px 0;
    align-items: center;
    color: var(--hpc-bam-text);
    background: transparent;
    border-bottom: 1px solid var(--hpc-bam-border);
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.hpc-brand-all-models__item:hover,
.hpc-brand-all-models__item:focus {
    color: var(--hpc-bam-text);
    background: rgba(176, 138, 82, 0.045);
    text-decoration: none;
    outline: none;
}

.hpc-brand-all-models__item[hidden] {
    display: none !important;
}

.hpc-brand-all-models__item--disabled {
    cursor: default;
}

.hpc-brand-all-models__item--disabled:hover,
.hpc-brand-all-models__item--disabled:focus {
    background: transparent;
}


/* The media column has a standard minimum height, but deliberately no
   maximum height or forced aspect ratio. A one-pen reference image remains
   compact; an image containing several generations can make the row taller. */
.hpc-brand-all-models__media {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 108px;
    padding: 0 42px 0 8px;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.hpc-brand-all-models__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    margin: 0;
    object-fit: contain;
    object-position: center;
}

.hpc-brand-all-models__image-placeholder {
    display: block;
    width: 100%;
    min-height: 108px;
    background:
        linear-gradient(
            135deg,
            rgba(176, 138, 82, 0.05),
            rgba(23, 20, 17, 0.025)
        );
    border: 1px solid rgba(223, 214, 202, 0.65);
}

.hpc-brand-all-models__content {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 108px;
    padding: 8px 48px 8px 28px;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--hpc-bam-border);
}

.hpc-brand-all-models__model-name {
    margin: 0;
    color: var(--hpc-bam-text);
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(20px, 1.8vw, 27px);
    font-weight: 700;
    line-height: 1.2;
}

.hpc-brand-all-models__period {
    margin-top: 7px;
    color: var(--hpc-bam-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.015em;
    line-height: 1.3;
}

.hpc-brand-all-models__fillings {
    display: block;
    margin-top: 10px;
    color: var(--hpc-bam-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.hpc-brand-all-models__major-versions {
    display: flex;
    margin-top: 13px;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.hpc-brand-all-models__major-version {
    display: block;
    color: var(--hpc-bam-text);
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.hpc-brand-all-models__arrow {
    position: absolute;
    top: 50%;
    right: 11px;
    color: var(--hpc-bam-gold);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    transform: translate(0, -50%);
    transition: transform 0.18s ease;
}

.hpc-brand-all-models__item:hover .hpc-brand-all-models__arrow,
.hpc-brand-all-models__item:focus .hpc-brand-all-models__arrow {
    transform: translate(4px, -50%);
}

.hpc-brand-all-models__empty {
    padding: 34px 0;
    color: var(--hpc-bam-muted);
    border-bottom: 1px solid var(--hpc-bam-border);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-align: center;
}

.hpc-brand-all-models--error {
    padding: 18px 20px;
    border: 1px solid #d9a5a5;
    background: #fff4f4;
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 980px) {

    .hpc-brand-all-models__toolbar {
        grid-template-columns:
            minmax(220px, 1.25fr)
            minmax(190px, 0.8fr)
            minmax(230px, 0.9fr);
        gap: 14px;
    }

    .hpc-brand-all-models__control--inline {
        gap: 8px;
    }

    .hpc-brand-all-models__item {
        grid-template-columns: minmax(0, 60%) minmax(250px, 40%);
    }

    .hpc-brand-all-models__media {
        padding-right: 26px;
    }

    .hpc-brand-all-models__content {
        padding-left: 22px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .hpc-brand-all-models__breadcrumbs {
        margin-bottom: 22px;
        font-size: 12px;
    }

    .hpc-brand-all-models__header {
        margin-bottom: 26px;
    }

    .hpc-brand-all-models__title {
        font-size: 32px;
    }

    .hpc-brand-all-models__toolbar {
        grid-template-columns: 1fr;
        padding: 16px 0 18px;
        gap: 12px;
    }

    .hpc-brand-all-models__control--inline {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
    }

    .hpc-brand-all-models__results-bar {
        justify-content: flex-start;
    }

    .hpc-brand-all-models__item {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 20px 0 18px;
    }

    .hpc-brand-all-models__media {
        min-height: 86px;
        padding: 0 0 16px;
    }

    .hpc-brand-all-models__image-placeholder {
        min-height: 86px;
    }

    .hpc-brand-all-models__content {
        min-height: 0;
        padding: 16px 40px 0 0;
        border-top: 1px solid rgba(223, 214, 202, 0.7);
        border-left: 0;
    }

    .hpc-brand-all-models__model-name {
        font-size: 21px;
    }

    .hpc-brand-all-models__major-version {
        font-size: 16px;
    }

    .hpc-brand-all-models__arrow {
        top: 25px;
        right: 5px;
        transform: none;
    }

    .hpc-brand-all-models__item:hover .hpc-brand-all-models__arrow,
    .hpc-brand-all-models__item:focus .hpc-brand-all-models__arrow {
        transform: translateX(4px);
    }
}