/* ==========================================
   HAIR PALACE — PRODUCT CATALOG / CATEGORY
   Match homepage Featured Products cards
   (white card, soft gold border, 1:1 image)
========================================== */

.hp-catalog-restyle {
    --hp-ink: #211126;
    --hp-gold: #d4af37;
    --hp-gold-soft: #e6c86a;
    --hp-purple: #6b2d7b;
    --hp-purple-deep: #4a1d56;
    --hp-cream: #faf7f4;
    --hp-line: #ebe4ef;
    --hp-muted: #7a7180;
    --hp-font-display: "Cormorant Garamond", Georgia, serif;
    --hp-font-body: "Manrope", system-ui, sans-serif;
    background: var(--hp-cream);
}

.hp-catalog-restyle .site-content,
.hp-catalog-restyle .content-area,
.hp-catalog-restyle .site-main,
.hp-catalog-restyle #content,
.hp-catalog-restyle .wrapper {
    background: transparent !important;
}

/* ---------- CATEGORY TITLE ---------- */
.hp-catalog-restyle .page-head {
    background: linear-gradient(90deg, var(--hp-purple-deep), var(--hp-purple)) !important;
    border: 0 !important;
    padding: 22px 0 !important;
    margin: 0 !important;
    position: relative;
}

.hp-catalog-restyle .page-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--hp-gold), transparent 70%);
}

.hp-catalog-restyle .page-head .page-title,
.hp-catalog-restyle .page-head h1 {
    font-family: var(--hp-font-display) !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    color: #fff !important;
    font-size: clamp(1.35rem, 3vw, 1.85rem) !important;
    margin: 0 !important;
}

.hp-catalog-restyle .page-head .breadcrumb-wrap,
.hp-catalog-restyle .page-head .breadcrumbs {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

.hp-catalog-restyle .page-head .breadcrumb-wrap a {
    color: var(--hp-gold-soft) !important;
}

.hp-catalog-restyle .woocommerce-products-header .woocommerce-products-header__title,
.hp-catalog-restyle .woocommerce .woocommerce-products-header h1 {
    display: none;
}

/* ---------- TOOLBAR ---------- */
.hp-catalog-restyle .woocommerce-result-count,
.hp-catalog-restyle .woocommerce-ordering {
    border: 1px solid rgba(212, 175, 55, 0.22) !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 22px rgba(33, 17, 38, 0.06);
    padding: 12px 14px !important;
    margin: 0 !important;
    font-family: var(--hp-font-body) !important;
    color: var(--hp-muted) !important;
    font-size: 12px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hp-catalog-restyle .woocommerce-ordering select {
    border: 0 !important;
    background: transparent !important;
    font-family: var(--hp-font-body) !important;
    font-weight: 600 !important;
    color: var(--hp-ink) !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px !important;
}

.hp-catalog-restyle .site-main > .woocommerce,
.hp-catalog-restyle .content-area .woocommerce {
    padding: 16px 0 40px;
}

.hp-catalog-restyle .woocommerce-products-header,
.hp-catalog-restyle .shop-item-filter-wrap,
.hp-catalog-restyle .woo-product-headings {
    margin: 16px 0 8px !important;
}

/* ---------- PRODUCT GRID (homepage match) ---------- */
.hp-catalog-restyle .woocommerce ul.products,
.hp-catalog-restyle ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px !important;
    margin: 16px 0 0 !important;
    padding: 0 4px !important;
    list-style: none !important;
}

.hp-catalog-restyle .woocommerce ul.products::before,
.hp-catalog-restyle .woocommerce ul.products::after,
.hp-catalog-restyle ul.products::before,
.hp-catalog-restyle ul.products::after {
    display: none !important;
    content: none !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product,
.hp-catalog-restyle ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    clear: none !important;
    padding: 0 !important;
    border: 1px solid rgba(212, 175, 55, 0.32) !important;
    background: #fff !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(33, 17, 38, 0.04), 0 10px 28px rgba(33, 17, 38, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    /* Visible even if JS inview fails */
    opacity: 1;
    transform: none;
}

.hp-catalog-restyle.hp-catalog-anim .woocommerce ul.products li.product,
.hp-catalog-restyle.hp-catalog-anim ul.products li.product {
    opacity: 0;
    transform: translateY(14px);
}

.hp-catalog-restyle.hp-catalog-anim .woocommerce ul.products li.product.hp-inview,
.hp-catalog-restyle.hp-catalog-anim ul.products li.product.hp-inview {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--hp-delay, 0ms);
}

.hp-catalog-restyle .woocommerce ul.products li.product:hover,
.hp-catalog-restyle ul.products li.product:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.7) !important;
    box-shadow: 0 14px 34px rgba(33, 17, 38, 0.12);
}

.hp-catalog-restyle .woocommerce ul.products li.product .product-inner,
.hp-catalog-restyle ul.products li.product .product-inner {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    text-align: left !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .woo-product-image,
.hp-catalog-restyle ul.products li.product .woo-product-image {
    margin: 0 !important;
    background: #f4f0f6;
    overflow: hidden;
    border: 0 !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.18) !important;
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
}

.hp-catalog-restyle .woocommerce ul.products li.product .woo-product-image a,
.hp-catalog-restyle ul.products li.product .woo-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.hp-catalog-restyle .woocommerce ul.products li.product img,
.hp-catalog-restyle ul.products li.product img {
    border-radius: 0 !important;
    border: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    transition: transform 0.45s ease;
}

.hp-catalog-restyle .woocommerce ul.products li.product:hover img,
.hp-catalog-restyle ul.products li.product:hover img {
    transform: scale(1.04);
}

.hp-catalog-restyle .woocommerce ul.products li.product .woocommerce-loop-product__title,
.hp-catalog-restyle .woocommerce ul.products li.product h2,
.hp-catalog-restyle .woocommerce ul.products li.product h3,
.hp-catalog-restyle ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--hp-font-body) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--hp-ink) !important;
    line-height: 1.35 !important;
    padding: 12px 12px 4px !important;
    margin: 0 !important;
    text-align: left !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .price,
.hp-catalog-restyle ul.products li.product .price {
    font-family: var(--hp-font-body) !important;
    font-weight: 700 !important;
    color: var(--hp-purple) !important;
    font-size: 14px !important;
    padding: 0 12px 12px !important;
    margin: 0 !important;
    text-align: left !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .price span,
.hp-catalog-restyle ul.products li.product .price span {
    color: inherit !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .button,
.hp-catalog-restyle .woocommerce ul.products li.product a.button,
.hp-catalog-restyle ul.products li.product .button,
.hp-catalog-restyle ul.products li.product a.button,
.hp-catalog-restyle .woocommerce ul.products li.product a.add_to_cart_button,
.hp-catalog-restyle .woocommerce ul.products li.product a.product_type_simple,
.hp-catalog-restyle .woocommerce ul.products li.product a.product_type_variable {
    font-family: var(--hp-font-body) !important;
    background: var(--hp-ink) !important;
    border: 1px solid var(--hp-ink) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 12px 14px !important;
    padding: 10px 14px !important;
    display: inline-block !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .button:hover,
.hp-catalog-restyle .woocommerce ul.products li.product a.button:hover,
.hp-catalog-restyle ul.products li.product .button:hover,
.hp-catalog-restyle .woocommerce ul.products li.product a.add_to_cart_button:hover {
    background: var(--hp-gold) !important;
    border-color: var(--hp-gold) !important;
    color: var(--hp-ink) !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .star-rating {
    display: none !important;
}

.hp-catalog-restyle .woocommerce ul.products li.product .product-compare-wishlist {
    opacity: 0.92;
}

/* ---------- PAGINATION ---------- */
.hp-catalog-restyle .woocommerce nav.woocommerce-pagination ul {
    border: 0 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.hp-catalog-restyle .woocommerce nav.woocommerce-pagination ul li {
    border: 0 !important;
}

.hp-catalog-restyle .woocommerce nav.woocommerce-pagination ul li a,
.hp-catalog-restyle .woocommerce nav.woocommerce-pagination ul li span {
    border-radius: 10px !important;
    border: 1px solid rgba(212, 175, 55, 0.25) !important;
    min-width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #fff !important;
    color: var(--hp-ink) !important;
    box-shadow: 0 6px 16px rgba(33, 17, 38, 0.06);
    font-family: var(--hp-font-body) !important;
    font-weight: 600;
}

.hp-catalog-restyle .woocommerce nav.woocommerce-pagination ul li span.current,
.hp-catalog-restyle .woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--hp-ink) !important;
    border-color: var(--hp-ink) !important;
    color: var(--hp-gold) !important;
}

/* ---------- TABLET / DESKTOP ---------- */
@media (min-width: 768px) {
    .hp-catalog-restyle .woocommerce ul.products,
    .hp-catalog-restyle ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px !important;
        padding: 0 8px !important;
    }

    .hp-catalog-restyle .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .hp-catalog-restyle .woocommerce ul.products li.product h2,
    .hp-catalog-restyle .woocommerce ul.products li.product h3 {
        font-size: 14px !important;
    }

    .hp-catalog-restyle .woocommerce ul.products li.product .price {
        font-size: 15px !important;
    }

    .hp-catalog-restyle .woocommerce ul.products li.product .button,
    .hp-catalog-restyle .woocommerce ul.products li.product a.button {
        font-size: 12px !important;
        padding: 10px 16px !important;
    }
}

@media (min-width: 1100px) {
    .hp-catalog-restyle .woocommerce ul.products,
    .hp-catalog-restyle ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px !important;
        padding: 0 12px !important;
    }

    .hp-catalog-restyle .page-head {
        padding: 28px 0 !important;
    }
}

@media (max-width: 767px) {
    .hp-catalog-restyle .woocommerce ul.products,
    .hp-catalog-restyle ul.products {
        gap: 10px !important;
    }

    .hp-catalog-restyle .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .hp-catalog-restyle .woocommerce ul.products li.product h2,
    .hp-catalog-restyle .woocommerce ul.products li.product h3 {
        font-size: 12.5px !important;
        padding: 10px 10px 2px !important;
    }

    .hp-catalog-restyle .woocommerce ul.products li.product .price {
        font-size: 13px !important;
        padding: 0 10px 10px !important;
    }

    .hp-catalog-restyle .woocommerce ul.products li.product .button,
    .hp-catalog-restyle .woocommerce ul.products li.product a.button {
        margin: 0 10px 12px !important;
        width: calc(100% - 20px);
        text-align: center;
    }
}
