/**
 * Handzom UI Kit: Category Showcase CSS
 * Fully isolated to .hz-collection-showcase
 */

.hz-collection-showcase {
    width: 100%;
    font-family: inherit;
}

/* Hero Section */
.hz-cs-hero {
    position: relative;
    padding: 80px 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: transparent;
}

.hz-cs-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.15;
}

.hz-cs-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    width: 100%;
}

.hz-cs-hero-title {
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 25px 0;
}

.hz-cs-hero-desc {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    line-height: 1.6;
    color: #666;
}

.hz-cs-hero-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(17, 17, 17, 0.4), transparent);
    margin: 30px auto 0 auto;
}

/* Subcategory Filters */
.hz-cs-subcat-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.hz-cs-subcat-btn {
    background: transparent;
    border: 1px solid #eaeaea;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.hz-cs-subcat-btn:hover,
.hz-cs-subcat-btn.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Toolbar */
.hz-cs-toolbar {
    position: relative;
    z-index: 99;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 40px;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    color: #888;
}

.hz-cs-toolbar-left,
.hz-cs-toolbar-right {
    flex: 1;
}

.hz-cs-toolbar-right {
    display: flex;
    justify-content: flex-end;
}

.hz-cs-toolbar-center {
    flex: 0 0 auto;
}

.hz-cs-product-count {
    font-size: 13px;
}

/* Sort Dropdown */
.hz-cs-sort-wrapper {
    position: relative;
}

.hz-cs-sort-toggle {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.3s;
}

.hz-cs-sort-toggle:hover,
.hz-cs-sort-toggle:focus,
.hz-cs-sort-toggle:active {
    color: #111 !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
}

.hz-cs-sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    width: 220px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.hz-cs-sort-wrapper.is-active .hz-cs-sort-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hz-cs-sort-option {
    display: block;
    padding: 8px 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.hz-cs-sort-option:hover {
    background: #f9f9f9;
    color: #111;
}

.hz-cs-sort-option input {
    display: none;
}

.hz-cs-sort-option input:checked+span {
    color: #bd9b78;
}

/* Grid */
.hz-cs-grid {
    display: grid;
    /* dynamically controlled */
}

/* Editorial Layout logic */
.hz-cs-grid.hz-cs-editorial .hz-cs-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 768px) {
    .hz-cs-grid.hz-cs-editorial .hz-cs-card:nth-child(1) {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Card */
.hz-cs-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    background: transparent;
}

.hz-cs-card-img-wrap {
    position: relative;
    overflow: hidden;
    background: #fbfaf8;
    /* Loro Piana cream background */
    aspect-ratio: 3/4;
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    /* Fix for Webkit rendering bug with absolute children in aspect-ratio grid cells */
    transform: translateZ(0);
    contain: paint layout;
}

/* Image Slider */
.hz-cs-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hz-cs-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.hz-cs-slide:first-child {
    opacity: 1;
    z-index: 2;
}

.hz-cs-slide img {
    width: 100%;
    height: 100%;
    object-fit: var(--hz-cs-img-fit, cover);
    object-position: var(--hz-cs-img-position, top center);
    transform: scale(var(--hz-cs-img-scale, 1));
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
    display: block;
}

/* Subtle Hover Zoom */
.hz-cs-card:hover .hz-cs-card-img-wrap.hz-cs-zoom .hz-cs-slide img {
    transform: scale(calc(var(--hz-cs-img-scale, 1) * 1.05));
}

/* Slider Nav Arrows */
.hz-cs-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
    color: #111 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.hz-cs-nav-btn svg {
    stroke: #111 !important;
    width: 16px;
    height: 16px;
}

.hz-cs-card:hover .hz-cs-nav-btn {
    opacity: 1;
    visibility: visible;
}

.hz-cs-prev {
    left: 10px;
}

.hz-cs-next {
    right: 10px;
}

.hz-cs-nav-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.hz-cs-wishlist-icon {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer;
    z-index: 10 !important;
    transition: transform 0.2s;
    color: #555;
    outline: none !important;
}

.hz-cs-wishlist-icon:hover,
.hz-cs-wishlist-icon:focus {
    transform: scale(1.1);
    color: #000;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
}

/* Filled State after Adding to Cart */
.hz-cs-wishlist-icon.added svg,
.hz-cs-wishlist-icon.hz-is-added svg {
    fill: #111;
    stroke: #111;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.hz-cs-wishlist-icon.added,
.hz-cs-wishlist-icon.hz-is-added {
    transform: scale(1.1);
}

/* Hide WooCommerce 'View Cart' link that appears after ajax add to cart */
.added_to_cart.wc-forward {
    display: none !important;
}

/* Card Content Container (Below Image) */
.hz-cs-card-content {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    padding: 15px 0 0 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.hz-cs-default-info,
.hz-cs-hover-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.hz-cs-add-cart-btn {
    display: inline-block;
    background: transparent !important;
    color: #3b82f6 !important;
    padding: 4px 0 0 0;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none !important;
    transition: color 0.3s;
}

.hz-cs-add-cart-btn:hover {
    color: #111 !important;
}

.hz-cs-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 2px 0;
    line-height: 1.4;
}

.hz-cs-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.3s;
}

.hz-cs-title a:hover {
    color: #666;
}

.hz-cs-material {
    font-size: 12px;
    color: #9d5d4d;
    margin-bottom: 5px;
}

.hz-cs-price {
    font-size: 13px;
    color: #111;
    font-weight: 500;
    margin: 0;
}

.hz-cs-price del {
    opacity: 0.5;
    margin-right: 8px;
    font-weight: 400;
}

.hz-cs-price ins {
    text-decoration: none;
}

/* Quick Add Button (Over Image) */
.hz-cs-quick-add {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 999;
    display: flex;
    justify-content: center;
}

.hz-cs-card:hover .hz-cs-quick-add {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.hz-cs-quick-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #111 !important;
    color: #fff !important;
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    width: 100%;
    max-width: 200px;
    transition: background 0.3s, transform 0.2s;
}

.hz-cs-quick-add-btn:hover {
    background: #000 !important;
    transform: scale(1.02);
}

.hz-cs-quick-add-btn svg {
    display: none;
}

@media (max-width: 768px) {
    /* Hide the round quick add button on mobile since they use the bookmark */
    .hz-cs-quick-add {
        display: none !important;
    }

    /* Force 2 columns on mobile for a denser, responsive look */
    .hz-cs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Reduce carousel arrow sizes so they don't cover the product */
    .hz-cs-nav-btn {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
    }
    .hz-cs-nav-btn svg {
        width: 10px !important;
        height: 10px !important;
    }
}

/* Empty State Message */
.hz-cs-no-products {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
    background: #fbfaf8;
    grid-column: 1 / -1;
}

/* Pagination */
.hz-cs-pagination-wrap {
    text-align: center;
    margin-top: 60px;
}

.hz-cs-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    background-color: #000;
    color: #fff;
    border: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.hz-cs-load-more:hover {
    background-color: #333;
}

.hz-cs-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hz-cs-spin 0.8s linear infinite;
    position: absolute;
}

.hz-cs-load-more.is-loading span {
    opacity: 0;
}

.hz-cs-load-more.is-loading .hz-cs-spinner {
    display: block;
}

@keyframes hz-cs-spin {
    to {
        transform: rotate(360deg);
    }
}

.hz-cs-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    text-decoration: none;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.hz-cs-pagination .page-numbers.current,
.hz-cs-pagination .page-numbers:hover {
    background-color: #000;
    color: #fff;
}

/* Filter Toggle Button */
.hz-cs-filter-toggle {
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #333;
    padding: 5px 10px;
    transition: color 0.3s;
    user-select: none;
    -webkit-user-select: none;
}

.hz-cs-filter-toggle:hover,
.hz-cs-filter-toggle:focus,
.hz-cs-filter-toggle:active {
    color: #000 !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
}

/* Off-Canvas Drawer */
.hz-cs-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hz-cs-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.hz-cs-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: #fff;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.hz-cs-drawer.is-open {
    right: 0;
}

.hz-cs-drawer-close {
    position: absolute;
    top: 35px;
    right: 40px;
    left: auto;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 50%;
    background: #111 !important;
    background-color: #111 !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, opacity 0.3s;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hz-cs-drawer:not(.is-open) .hz-cs-drawer-close {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hz-cs-drawer-close::before,
.hz-cs-drawer-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 1.5px;
    background: #fff !important;
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.hz-cs-drawer-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.hz-cs-drawer-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.hz-cs-drawer-close:hover {
    background: #000 !important;
    background-color: #000 !important;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .hz-cs-drawer {
        width: 100% !important;
        right: -100% !important;
    }

    .hz-cs-drawer.is-open {
        right: 0 !important;
    }

    .hz-cs-drawer-close {
        right: 25px;
        top: 30px;
    }

    .hz-cs-drawer-header {
        padding: 35px 25px 20px;
    }

    .hz-cs-drawer-body {
        padding: 0 25px 20px;
    }

    .hz-cs-apply-btn {
        margin: 20px 25px 25px !important;
        width: calc(100% - 50px) !important;
    }
}

.hz-cs-drawer-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid #eee;
}

.hz-cs-drawer-title {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111;
}

.hz-cs-drawer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.hz-cs-reset-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #888;
    padding: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s;
}

.hz-cs-reset-btn:hover {
    color: #111;
    background: transparent !important;
    background-color: transparent !important;
}

.hz-cs-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px 40px;
}

/* Accordions */
.hz-cs-accordion {
    border-bottom: 1px solid #eee;
}

.hz-cs-accordion-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}

.hz-cs-acc-icon {
    position: relative;
    width: 12px;
    height: 12px;
}

.hz-cs-acc-icon::before,
.hz-cs-acc-icon::after {
    content: '';
    position: absolute;
    background-color: #666;
    transition: transform 0.3s ease;
}

.hz-cs-acc-icon::before {
    top: 5px;
    left: 0;
    width: 12px;
    height: 1px;
}

.hz-cs-acc-icon::after {
    top: 0;
    left: 5px;
    width: 1px;
    height: 12px;
}

.hz-cs-accordion.is-active .hz-cs-acc-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.hz-cs-accordion-body {
    display: none;
    padding-bottom: 25px;
}

/* Radio & Checkbox Styles */
.hz-cs-radio-label,
.hz-cs-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: color 0.2s;
}

.hz-cs-radio-label:last-child,
.hz-cs-checkbox-label:last-child {
    margin-bottom: 0;
}

.hz-cs-radio-label:hover,
.hz-cs-checkbox-label:hover {
    color: #111;
}

.hz-cs-radio-label input[type="radio"],
.hz-cs-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hz-cs-checkbox-label input[type="checkbox"] {
    border-radius: 2px;
}

.hz-cs-radio-label input[type="radio"]:checked {
    border-color: #bd9b78;
}

.hz-cs-radio-label input[type="radio"]:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #bd9b78;
    border-radius: 50%;
}

.hz-cs-checkbox-label input[type="checkbox"]:checked {
    background: #bd9b78;
    border-color: #bd9b78;
}

.hz-cs-checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
}

/* Size Grid */
.hz-cs-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hz-cs-size-box {
    cursor: pointer;
}

.hz-cs-size-box input {
    display: none;
}

.hz-cs-size-box span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid #eee;
    font-size: 12px;
    color: #555;
    transition: all 0.2s;
}

.hz-cs-size-box:hover span {
    border-color: #ccc;
    color: #111;
}

.hz-cs-size-box input:checked+span {
    background: #bd9b78;
    border-color: #bd9b78;
    color: #fff;
}

/* Footer */
.hz-cs-drawer-footer {
    padding: 30px 40px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hz-cs-reset-btn {
    background: transparent;
    border: none;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}

.hz-cs-reset-btn:hover {
    color: #111;
}

.hz-cs-apply-btn {
    margin: 20px 40px 40px;
    width: calc(100% - 80px);
    background: #111 !important;
    background-color: #111 !important;
    color: #fff !important;
    border: none !important;
    padding: 18px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.hz-cs-apply-btn:hover {
    background: #000 !important;
    background-color: #000 !important;
}
