/* Category detail page styles. Header/footer styles remain in header.css and footer.css. */

.detail-banner {
    position: relative;
    width: 100%;
    height: 316px;
    overflow: hidden;
}

.detail-banner-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.detail-page-name {
    margin: 0 0 24px;
    color: #000;
    font-size: 40px;
    font-weight: 500;
    text-align: center;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
    font-size: 16px;
}

.detail-breadcrumb a {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.breadcrumb-chevron {
    font-size: 24px;
    line-height: 1;
}

.available-products {
    width: 100%;
    margin: 0;
}

.product-filter {
    min-height: 100px;
    padding: 18px clamp(20px, 6.95vw, 100px);
    background: #F9F1E7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.filter-left,
.filter-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-left img {
    width: 19px;
    height: 19px;
    object-fit: contain;
}

.filter-left span,
.filter-right label {
    font-size: 18px;
    color: #000;
}

.filter-divider {
    display: block;
    width: 2px;
    height: 37px;
    background: #9F9F9F;
}

.results-summary {
    font-size: 14px !important;
}

.filter-right input,
.filter-right select {
    min-height: 45px;
    border: 0;
    background: #fff;
    padding: 0 12px;
    font: inherit;
    font-size: 16px;
}

.filter-right input {
    width: 65px;
    text-align: center;
}

.filter-right select {
    min-width: 150px;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    padding: 56px clamp(20px, 4.86vw, 70px) 0;
}

.product-card {
    position: relative;
    flex: 0 0 calc((100% - 96px) / 4);
    min-width: 220px;
    max-width: 300px;
    cursor: pointer;
}

.display-content {
    height: 100%;
    background: #F4F5F7;
}

.card-content {
    position: relative;
    width: 100%;
    aspect-ratio: 285 / 301;
    overflow: hidden;
    background: #F4F5F7;
}

.card-content > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #898989;
    background: #F4F5F7;
}

.discount-percent {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    background: #E97171;
    font-size: 14px;
}

.card-footer {
    min-height: 130px;
    padding: 15px 15px 20px;
    background: #F4F5F7;
}

.footer-name {
    margin: 0;
    color: #333;
    font-size: 22px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.footer-desc {
    margin: 5px 0 0;
    color: #898989;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 0;
}

.current-price {
    margin: 8px 0 0;
    color: #333;
    font-size: 17px;
    font-weight: 500;
}

.original-price {
    margin: 8px 0 0;
    color: #B0B0B0;
    font-size: 13px;
    font-weight: 300;
    text-decoration: line-through;
}

.hover-content {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    background: rgba(0, 0, 0, .5);
    transition: opacity .3s ease;
    pointer-events: none;
}

.product-card:hover .hover-content {
    opacity: 1;
}

.overlay-items {
    position: relative;
    width: 100%;
    height: 100%;
}

.hover-content .action {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(202px, 85%);
    min-height: 48px;
    border: 0;
    background: #fff;
    color: #B88E2F;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    pointer-events: auto;
}

.sub-action-list {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 24px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
}

.sub-action-list a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    pointer-events: auto;
}

.sub-action-list img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.empty-products {
    width: 100%;
    padding: 40px 0;
    color: #898989;
    text-align: center;
}

.pagination {
    margin: 60px 0 70px;
}

.pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    padding: 0 18px;
    border-radius: 10px;
    background: #F9F1E7;
    color: #000;
    font-size: 18px;
    text-decoration: none;
}

.pagination a.active,
.pagination a:hover {
    background: #B88E2F;
    color: #fff;
}

.features {
    min-height: 270px;
    margin-top: 85px;
    padding: 40px clamp(20px, 2.8vw, 40px);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background: #FAF3EA;
}

.feature_card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.feature-copy .feature-name {
    margin: 0 0 12px;
    color: #242424;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 600;
}

.feature-copy .feature-desc {
    margin: 0;
    color: #898989;
    font-size: 15px;
    line-height: 1.4;
}

@media (max-width: 1000px) {
    .product-card {
        flex-basis: calc((100% - 64px) / 3);
    }

    .product-filter {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .detail-banner {
        height: 220px;
    }

    .detail-page-name {
        font-size: 32px;
    }

    .product-list {
        gap: 18px;
        padding-top: 30px;
    }

    .product-card {
        flex-basis: calc((100% - 18px) / 2);
        min-width: 0;
    }

    .card-footer {
        padding: 10px;
    }

    .footer-name {
        font-size: 17px;
    }

    .current-price {
        font-size: 14px;
    }

    .original-price {
        font-size: 12px;
    }

    .filter-left,
    .filter-right {
        flex-wrap: wrap;
        gap: 12px;
    }

    .results-summary {
        flex-basis: 100%;
    }

    .features {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .product-card {
        flex-basis: 100%;
        max-width: 320px;
    }
}

/* ================================
   CATEGORY PRODUCT GRID
================================ */

.category-products-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    padding: 32px 5%;
}

/* Product card */

.category-products-content .product_card {
    position: relative;
    min-width: 0;
    background: #F4F5F7;
    overflow: hidden;
}

/* Normal card content */

.category-products-content .display_content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-products-content .card_content {
    position: relative;
    width: 100%;
    aspect-ratio: 285 / 301;
    overflow: hidden;
}

.category-products-content .card_content > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Discount badge */

.category-products-content .discount-percent {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #E97171;
    color: #FFFFFF;
    font-size: 14px;
}

/* Product information */

.category-products-content .card_footer {
    flex: 1;
    padding: 16px;
}

.category-products-content .footer_name {
    margin: 0 0 8px;
    color: #3A3A3A;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.category-products-content .footer_desc {
    margin: 0 0 8px;
    color: #898989;
    font-size: 16px;
    line-height: 1.5;
}

.category-products-content .price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.category-products-content .current_price {
    margin: 0;
    color: #3A3A3A;
    font-size: 18px;
    font-weight: 600;
}

.category-products-content .original_price {
    margin: 0;
    color: #B0B0B0;
    font-size: 14px;
    text-decoration: line-through;
}

/* Hover overlay */

.category-products-content .hover_content {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(58, 58, 58, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.category-products-content .product_card:hover .hover_content {
    opacity: 1;
    visibility: visible;
}

.category-products-content .overlay_items {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.category-products-content .overlay_items > .action {
    display: block;
    width: 100%;
    padding: 12px 8px;
    border: none;
    background: #FFFFFF;
    color: #B88E2F;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.category-products-content .sub_action_list {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.category-products-content .sub_action_list a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #FFFFFF;
    text-decoration: none;
}

.category-products-content .sub_action {
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-products-content .sub_action .icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.category-products-content .sub_action .content {
    margin: 0;
    font-size: 14px;
}

/* Missing image */

.category-products-content .product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #898989;
    background: #EAEAEA;
}

/* Empty category */

.empty-products {
    grid-column: 1 / -1;
    padding: 40px 0;
    color: #898989;
    text-align: center;
}

/* Responsive grid */

@media (max-width: 1100px) {
    .category-products-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .category-products-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 24px 4%;
    }

    .category-products-content .footer_name {
        font-size: 18px;
    }

    .category-products-content .footer_desc {
        font-size: 14px;
    }

    .category-products-content .current_price {
        font-size: 16px;
    }

    .category-products-content .card_footer {
        padding: 12px;
    }
}

@media (max-width: 420px) {
    .category-products-content {
        grid-template-columns: 1fr;
    }
}
