
/* =====================================
   PRODUCT CATEGORIES SECTION
===================================== */

.product-categories {
    width: 100%;
    padding: clamp(55px, 7vw, 95px) 24px;
    background: var(--body-color);
    color: var(--text-color);
}

.categories-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

/* SECTION HEADER */

.categories-header {
    max-width: 650px;
    margin: 0 auto 42px;
    text-align: center;
}

.categories-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1.7;
    opacity: 0.7;
}

.categories-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
}

.categories-title span {
    color: #B87950;
}

.categories-description {
    max-width: 560px;
    margin: 16px auto 0;
    font-size: 14px;
    line-height: 1.9;
    opacity: 0.78;
}

/* CATEGORY GRID */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

/* CATEGORY CARD */

.category-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--border-color, #E5E0D5);
    border-radius: 4px;
    overflow: hidden;
    background: var(--body-color);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #B87950;
}

/* IMAGE */

.category-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 4.5;
    overflow: hidden;
    background: var(--nav-colr);
}

.category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.6s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

/* IMAGE OVERLAY */

.category-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15),
        transparent 35%,
        rgba(0, 0, 0, 0.08)
    );
    pointer-events: none;
}

/* NUMBER */

.category-number {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;

    display: grid;
    place-items: center;
    min-width: 34px;
    height: 30px;
    padding: 0 8px;

    background: var(--body-color);
    color: var(--text-color);
    border-radius: 2px;

    font-size: 11px;
    font-weight: 600;
}

/* IMAGE ARROW */

.category-arrow {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 1;

    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;

    background: var(--body-color);
    color: var(--text-color);
    border-radius: 50%;

    font-size: 17px;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.category-card:hover .category-arrow {
    background: #263D32;
    color: #F8F6F1;
}

/* CARD CONTENT */

.category-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 21px 18px 20px;
}

.category-info h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
}

.category-info p {
    margin: 10px 0 20px;
    font-size: 12px;
    line-height: 1.9;
    opacity: 0.75;
}

/* CARD LINK */

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.8;
}

.category-link span {
    color: #B87950;
    transition: transform 0.25s ease;
}

.category-card:hover .category-link span {
    transform: translateX(4px);
}

/* BOTTOM CTA */

.categories-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-top: 42px;
    padding: 24px 28px;

    background: var(--nav-colr);
    border-radius: 4px;
}

.categories-footer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 500;
}

.categories-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 46px;
    padding: 12px 20px;

    background: #263D32;
    color: #F8F6F1;
    border: 1px solid #263D32;
    border-radius: 3px;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;

    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.categories-cta:hover {
    background: transparent;
    color: var(--text-color);
}

/* ACCESSIBILITY */

.category-card:focus-visible,
.categories-cta:focus-visible {
    outline: 2px solid #B87950;
    outline-offset: 4px;
}

/* TABLET */

@media (max-width: 1000px) {
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .category-image {
        aspect-ratio: 5 / 4;
    }

    .category-info h3 {
        font-size: 16px;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .product-categories {
        padding: 48px 18px;
    }

    .categories-header {
        margin-bottom: 28px;
    }

    .categories-eyebrow {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .categories-title {
        font-size: clamp(28px, 7vw, 36px);
        letter-spacing: -0.6px;
    }

    .categories-description {
        margin-top: 12px;
        font-size: 13px;
        line-height: 1.8;
    }

    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-image {
        aspect-ratio: 4 / 4.5;
    }

    .category-number {
        top: 9px;
        left: 9px;
        min-width: 29px;
        height: 26px;
        font-size: 10px;
    }

    .category-arrow {
        right: 9px;
        bottom: 9px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .category-info {
        padding: 14px 11px 15px;
    }

    .category-info h3 {
        font-size: 13px;
        line-height: 1.5;
    }

    .category-info p {
        margin: 8px 0 15px;
        font-size: 11px;
        line-height: 1.7;
    }

    .category-link {
        gap: 5px;
        font-size: 10px;
    }

    .categories-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        margin-top: 28px;
        padding: 20px 16px;
    }

    .categories-footer p {
        font-size: 13px;
    }

    .categories-cta {
        width: 100%;
    }
}

/* SMALL MOBILE */

@media (max-width: 360px) {
    .product-categories {
        padding-right: 12px;
        padding-left: 12px;
    }

    .categories-grid {
        gap: 9px;
    }

    .category-info {
        padding: 12px 9px;
    }

    .category-info h3 {
        font-size: 12px;
    }

    .category-info p {
        font-size: 10px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    .category-card,
    .category-image img,
    .category-arrow,
    .category-link span,
    .categories-cta {
        transition: none !important;
    }

    .category-card:hover {
        transform: none;
    }
}
