/*
 * Approved homepage category redesign only.
 *
 * The rest of the homepage continues to use the established native-home
 * styling in style.css. Category imagery is sourced from verified catalog
 * products and is intentionally displayed uncropped.
 */

.yms-home-category-redesign {
    --yms-category-ink: #211711;
    --yms-category-muted: #6f5140;
    --yms-category-brand: #963e08;
    --yms-category-paper: #f8f3ed;
    --yms-category-line: #ddc9b9;
    background: #fff !important;
}

.yms-home-category-redesign__head {
    max-width: 790px;
    margin: 0 auto 40px;
    text-align: center;
}

.yms-home-category-redesign__eyebrow {
    margin: 0 0 12px;
    color: var(--yms-category-brand);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.yms-home-category-redesign__head h2 {
    max-width: 720px;
    margin: 0 auto 16px;
    color: var(--yms-category-ink);
    font-size: clamp(34px, 3.4vw, 50px);
    line-height: 1.08;
}

.yms-home-category-redesign__head > p:last-child {
    max-width: 660px;
    margin: 0 auto;
    color: var(--yms-category-muted);
    font-size: 16px;
    line-height: 1.7;
}

.yms-home-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.yms-home-category-card {
    display: grid;
    grid-template-columns: 39% 61%;
    min-height: 305px;
    overflow: hidden;
    background: var(--yms-category-paper);
    border: 1px solid var(--yms-category-line);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.yms-home-category-card:hover,
.yms-home-category-card:focus-within {
    border-color: #b87a51;
    box-shadow: 0 18px 42px rgba(76, 44, 24, .10);
    transform: translateY(-3px);
}

.yms-home-category-card__media {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 22px 12px;
    background: #fff;
    border-right: 1px solid var(--yms-category-line);
}

.yms-home-category-card__image {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: contain;
    object-position: center;
    transition: transform .2s ease;
}

.yms-home-category-card:hover .yms-home-category-card__image {
    transform: scale(1.025);
}

.yms-home-category-card__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 28px 22px 25px;
}

.yms-home-category-card__body > span {
    margin-bottom: 15px;
    color: var(--yms-category-brand);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.yms-home-category-card__body h3 {
    margin: 0 0 10px;
    color: var(--yms-category-ink);
    font-size: 23px;
    font-weight: 850;
    line-height: 1.05;
}

.yms-home-category-card__body h3 a {
    color: inherit;
}

.yms-home-category-card__body p {
    margin: 0 0 20px;
    color: var(--yms-category-muted);
    font-size: 14px;
    line-height: 1.55;
}

.yms-home-category-card__link {
    display: inline-flex;
    min-height: 44px;
    margin-top: auto;
    align-items: center;
    gap: 10px;
    color: var(--yms-category-brand) !important;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.yms-home-category-card__link:hover,
.yms-home-category-card__link:focus-visible,
.yms-home-category-more a:hover,
.yms-home-category-more a:focus-visible {
    color: #6f2c06 !important;
    text-decoration: underline;
}

.yms-home-category-card a:focus-visible,
.yms-home-category-more a:focus-visible {
    outline: 3px solid #b25f24;
    outline-offset: 3px;
}

.yms-home-category-more {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin-top: 34px;
    color: var(--yms-category-ink);
    font-size: 14px;
}

.yms-home-category-more span {
    color: var(--yms-category-muted);
}

.yms-home-category-more a {
    color: var(--yms-category-ink);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #cba98f;
    text-underline-offset: 4px;
}

@media (max-width: 1199px) {
    .yms-home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .yms-home-category-redesign__head {
        margin-bottom: 30px;
    }

    .yms-home-category-redesign__head h2 {
        font-size: clamp(30px, 9vw, 40px);
    }

    .yms-home-category-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .yms-home-category-card {
        min-height: 285px;
    }
}

@media (max-width: 479px) {
    .yms-home-category-card {
        grid-template-columns: 42% 58%;
    }

    .yms-home-category-card__media {
        padding: 18px 8px;
    }

    .yms-home-category-card__image {
        height: 190px;
    }

    .yms-home-category-card__body {
        padding: 23px 16px 20px;
    }

    .yms-home-category-card__body h3 {
        font-size: 20px;
    }

    .yms-home-category-card__body p {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yms-home-category-card,
    .yms-home-category-card__image {
        transition: none;
    }
}
