/* ==========================================================
   Category Archive Cards — pixel match
   Enqueue this after your theme stylesheet.
   Font used for the title: Playfair Display (serif).
   Add to functions.php if not already loaded:
   wp_enqueue_style('playfair-display','https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&display=swap');
   ========================================================== */


.custom-category-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin: 0;
    padding: 0;
}

.custom-category-grid .product-category {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
}

.custom-category-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 18px rgba(20, 20, 20, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}

.custom-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(20, 20, 20, 0.16);
}

/* ---------- Image / hero area ---------- */

.custom-category-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #1c1c1c;
}

.custom-category-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

/* bottom gradient so eyebrow/title stay legible */
.custom-category-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 45%,
        rgba(0, 0, 0, 0.55) 78%,
        rgba(0, 0, 0, 0.72) 100%
    );
    pointer-events: none;
}

/* badges, top right */
.custom-category-badges {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cc-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1;
}

.cc-badge--dark {
    background: rgba(26, 24, 22, 0.82);
    color: #ffffff;
}

.cc-badge--accent {
    background: #b9822f;
    color: #ffffff;
}

/* eyebrow + title, bottom left of image */
.custom-category-overlay-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    z-index: 2;
    padding: 0 28px;
}

.cc-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e6dcc9;
    margin-bottom: 6px;
}

.cc-title {
    margin: 0;
    padding: 0;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: 38px;
    line-height: 1.1;
    color: #ffffff;
}

/* ---------- Body (description) ---------- */

.custom-category-body {
    padding: 26px 28px 22px;
    flex: 1;
}

.cc-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: #4b4b4b;
}

/* ---------- Footer ---------- */

.custom-category-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 28px;
    background: #f7f4ef;
    border-top: 1px solid #e9e3d7;
}

.cc-footer-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2a37;
    white-space: nowrap;
}

.cc-icon-check {
    width: 20px;
    height: 20px;
    color: #1f2a37;
    flex-shrink: 0;
}

.cc-footer-explore {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b9822f;
    white-space: nowrap;
}

.cc-icon-arrow {
    width: 18px;
    height: 18px;
    color: #1f2a37;
    transition: transform 0.2s ease;
}

.custom-category-card:hover .cc-icon-arrow {
    transform: translateX(4px);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .custom-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .custom-category-grid {
        grid-template-columns: 1fr;
    }

    .cc-title {
        font-size: 30px;
    }

    .custom-category-footer {
        flex-wrap: wrap;
    }
}

/* ==========================================================
   Category filter bar (sits above the category grid)
   ========================================================== */

.cc-filter-bar {
    background: transparent;
    border: 1px solid #e9e3d7;
    border-radius: 10px;
    margin: 0 0 28px;
    overflow-x: auto;
}

.cc-filter-scroll {
    display: flex;
    align-items: stretch;
    overflow-x: auto;

}


.cc-filter-tab {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2a2a2a;
    text-decoration: none !important;
    border-right: 1px solid #e9e3d7;
    background: white;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.cc-filter-tab:last-child {
    border-right: none;
}

.cc-filter-tab:hover {
    background: rgba(0, 0, 0, 0.04);
}

.cc-filter-tab.is-active {
    background: #1a1a1a;
    color: #ffffff;
    margin: 6px;
    border-radius: 6px;
    border-right: none;
}

.cc-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: #2a2a2a;
    background: #e7e2d7;
    border-radius: 4px;
}

.cc-filter-tab.is-active .cc-filter-count {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.cc-filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 4px;
}

.cc-filter-badge--new {
    color: #ffffff;
    background: #b9822f;
}

@media (max-width: 600px) {
    .cc-filter-tab {
        padding: 13px 18px;
        font-size: 12px;
    }
}   
   
   

.custom-category-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin: 0;
    padding: 0;
}
.custom-category-grid .product-category {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
}

.custom-category-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 18px rgba(20, 20, 20, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}

.custom-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(20, 20, 20, 0.16);
}

/* ---------- Image / hero area ---------- */

.custom-category-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1c1c1c;
}

.custom-category-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

/* bottom gradient so eyebrow/title stay legible */
.custom-category-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 45%,
        rgba(0, 0, 0, 0.55) 78%,
        rgba(0, 0, 0, 0.72) 100%
    );
    pointer-events: none;
}

/* badges, top right */
.custom-category-badges {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cc-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1;
}

.cc-badge--dark {
    background: rgba(26, 24, 22, 0.82);
    color: #ffffff;
}

.cc-badge--accent {
    background: #b9822f;
    color: #ffffff;
}

/* eyebrow + title, bottom left of image */
.custom-category-overlay-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    z-index: 2;
    padding: 0 10px;
}

.cc-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e6dcc9;
    margin-bottom: 6px;
}

.cc-title {
    margin: 0;
    padding: 0;
    font-family: "Domine", Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.1;
    color: #ffffff;
    text-align: left;
}

/* ---------- Body (description) ---------- */

.custom-category-body {
    padding: 10px;
    text-align: left;
    flex: 1;
}

.cc-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: #4b4b4b;
}

/* ---------- Footer ---------- */

.custom-category-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 28px;
    background: #f7f4ef;
    border-top: 1px solid #e9e3d7;
}

.cc-footer-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2a37;
    white-space: nowrap;
}

.cc-icon-check {
    width: 20px;
    height: 20px;
    color: #1f2a37;
    flex-shrink: 0;
}

.cc-footer-explore {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b9822f;
    white-space: nowrap;
}

.cc-icon-arrow {
    width: 18px;
    height: 18px;
    color: #1f2a37;
    transition: transform 0.2s ease;
}

.custom-category-card:hover .cc-icon-arrow {
    transform: translateX(4px);
}


/* Tablet */
@media (max-width: 1024px) {

    .custom-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .custom-category-overlay-text {
        bottom: 18px;
        padding: 0 18px;
    }

    .cc-title {
        font-size: 18px;
    }

    .custom-category-body {
        padding: 16px 18px;
    }

    .cc-description {
        font-size: 15px;
    }

    .custom-category-footer {
        padding: 16px 18px;
    }
}


/* Mobile */
@media (max-width: 767px) {

    .custom-category-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        width: 100%;
    }

    .custom-category-grid .product-category {
        width: 100% !important;
        max-width: 100% !important;
    }

    .custom-category-card {
        width: 100%;
        border-radius: 12px;
    }

    /* Slightly shorter image on mobile */
    .custom-category-image {
        aspect-ratio: 16 / 11;
    }

    .custom-category-badges {
        top: 12px;
        right: 12px;
        gap: 6px;
        max-width: calc(100% - 24px);
    }

    .cc-badge {
        font-size: 9px;
        padding: 6px 10px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .custom-category-overlay-text {
        left: 0;
        right: 0;
        bottom: 16px;
        padding: 0 16px;
    }

    .cc-eyebrow {
        font-size: 10px;
        letter-spacing: 0.14em;
        margin-bottom: 5px;
    }

    .cc-title {
        font-size: clamp(24px, 8vw, 30px);
        line-height: 1.08;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .custom-category-body {
        padding: 14px 16px;
    }

    .cc-description {
        font-size: 14px;
        line-height: 1.55;
    }

    .custom-category-footer {
        padding: 14px 16px;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .cc-footer-count {
        font-size: 12px;
        gap: 6px;
        min-width: 0;
    }

    .cc-icon-check {
        width: 17px;
        height: 17px;
    }

    .cc-footer-explore {
        font-size: 11px;
        gap: 5px;
    }

    .cc-icon-arrow {
        width: 16px;
        height: 16px;
    }
}


/* Small phones */
@media (max-width: 400px) {

    .custom-category-grid {
        gap: 16px;
    }

    .custom-category-image {
        aspect-ratio: 3 / 4;
    }

    .custom-category-overlay-text {
        bottom: 14px;
        padding: 0 14px;
    }

    .cc-eyebrow {
        font-size: 9px;
    }

    .cc-title {
        font-size: 18px;
    }

    .custom-category-body {
        padding: 13px 14px;
    }

    .cc-description {
        font-size: 13px;
    }

    .custom-category-footer {
        padding: 13px 14px;
    }

    .cc-footer-count {
        font-size: 11px;
    }

    .cc-footer-explore {
        font-size: 10px;
    }
    
    .custom-category-footer {
        flex-direction: column;
    }
}


/* Very small phones */
@media (max-width: 340px) {

    .custom-category-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .cc-footer-explore {
        width: 100%;
        justify-content: space-between;
    }

    .cc-title {
        font-size: 22px;
    }
}