/* =====================================================
   CUSTOM PRODUCT CARD (Blocksy Pro + WooCommerce)
   DARK THEME
===================================================== */

/* =====================================================
   Card Wrapper
===================================================== */

.woocommerce ul.products li.product.wc-card {
    padding: 0 !important;
    margin: 0 0 0px !important;
    background: transparent !important;
    border: 0 !important;
    height: 100%;
    display: flex;
}

.wc-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 26px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    background: #171717;
    transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* =====================================================
   Media
===================================================== */

.wc-card__media {
    position: relative;
    background: #1f1f1f;
    overflow: hidden;
}

.wc-card__link {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.wc-card__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.001);
    transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1);
}

.wc-card__sale-thread {
    position: absolute;
    z-index: 20;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wc-card__sale-thread-path {
    x: 1px;
    y: 1px;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    rx: 25px;
    ry: 25px;
    fill: none;
    stroke: var(--sale-thread-color, #ff2f3d);
    stroke-width: 1.5px;
    stroke-linecap: round;
    stroke-dasharray: var(--sale-thread-dash, 16 84);
    stroke-opacity: 0.74;
    animation: wc-card-sale-thread-orbit 8.4s linear infinite;
    vector-effect: non-scaling-stroke;
}

/* The low per-layer opacity applies only to the complete gradient markup. */
.wc-card__sale-thread--gradient .wc-card__sale-thread-path {
    stroke-opacity: 0.12;
}

@keyframes wc-card-sale-thread-orbit {
    from {
        stroke-dashoffset: var(--sale-thread-offset, 0px);
    }
    to {
        stroke-dashoffset: calc(var(--sale-thread-offset, 0px) - 100px);
    }
}

/* =====================================================
   Sale Badge
===================================================== */

.wc-card__badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 10;
    background: #ec2053;
    color: #fff;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 8px;
    box-shadow:
        0 0 12px rgba(236, 32, 83, 0.28),
        0 8px 20px rgba(0, 0, 0, 0.24);
    transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* =====================================================
   Content
===================================================== */

.wc-card__content {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.wc-card__cat,
.wc-card__cat a {
    font-size: 8px;
    line-height: 1.2;
    color: #9a9a9a;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
}

/* =====================================================
   Title
===================================================== */

.wc-card__title {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -0.02em;
    min-height: calc(21px * 1.25 * 2);
}

.wc-card__title a {
    color: #f5f5f5;
    text-decoration: none;
    text-transform: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* =====================================================
   Attribute Pills
===================================================== */

.wc-card__attrs {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 8px;
    margin-top: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 14px;
    scrollbar-width: none;
    position: relative;
}

.wc-card__attrs::-webkit-scrollbar {
    height: 0;
}

.wc-card__pill {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #262626;
    color: #f0f0f0;
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    padding: 0 !important;
    white-space: nowrap;
    user-select: none;
    scroll-snap-align: start;
    letter-spacing: -0.02em;
}

.wc-card__attrs::after {

}

/* =====================================================
   Footer
===================================================== */

.wc-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wc-card__sold-out-text {
    margin: 0;
    padding-left: 2px;
    color: #9a9a9a;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
}

/* =====================================================
   Price + Action Pill
===================================================== */

.wc-card__purchase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
    min-width: 0;
}

.wc-card__price {
    min-width: 0;
    flex: 1 1 92px;
    color: #f7f7f7;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
}

.wc-card__price .price {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 4px 8px;
    margin: 0 !important;
    color: inherit !important;
}

/* Keep sale and regular prices on one shared left edge. */
.wc-card__price .sale-price {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    margin: 0 !important;
    color: inherit !important;
    vertical-align: top;
}

.wc-card__price .sale-price ins {
    order: 0;
}

.wc-card__price .sale-price del {
    order: 2;
}

.wc-card__price .amount,
.wc-card__price bdi,
.wc-card__price ins {
    color: inherit !important;
    background: transparent !important;
    text-decoration: none !important;
}

.wc-card__price del {
    width: 100%;
    margin: 0 !important;
    color: #858585 !important;
    font-size: 12px;
    font-weight: 550;
    line-height: 1;
    opacity: 1 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1.25px;
}

.wc-card__price--unavailable {
    color: #858585;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta {
    --wc-card-action-size: 40px;
    --wc-card-action-icon: 16px;

    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 99px !important;
    background: #232323 !important;
    background-image: none !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 9px 22px rgba(0, 0, 0, 0.32) !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta > a,
.woocommerce ul.products li.product.wc-card .wc-card__cta > button,
.woocommerce ul.products li.product.wc-card .wc-card__cta > span.wc-card__cart {
    width: var(--wc-card-action-size) !important;
    height: var(--wc-card-action-size) !important;
    min-width: var(--wc-card-action-size) !important;
    min-height: var(--wc-card-action-size) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    line-height: 0 !important;
    font-size: 0 !important;
    text-decoration: none !important;
    appearance: none;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta > a:not(.wc-card__cart),
.woocommerce ul.products li.product.wc-card .wc-card__cta > button:not(.wc-card__cart) {
    background: transparent !important;
    background-image: none !important;
    color: #f5f5f5 !important;
    box-shadow: none !important;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.woocommerce ul.products li.product.wc-card .wc-card__cta .ct-icon-container,
.woocommerce ul.products li.product.wc-card .wc-card__cta > a:not(.wc-card__cart) span,
.woocommerce ul.products li.product.wc-card .wc-card__cta > button:not(.wc-card__cart) span {
    width: var(--wc-card-action-icon) !important;
    height: var(--wc-card-action-icon) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta > a:not(.wc-card__cart) svg:not(.ct-button-loader),
.woocommerce ul.products li.product.wc-card .wc-card__cta > button:not(.wc-card__cart) svg:not(.ct-button-loader) {
    width: var(--wc-card-action-icon) !important;
    height: var(--wc-card-action-icon) !important;
    display: block !important;
    margin: 0 !important;
    fill: currentColor;
    transform: scale(1.08) translateY(-0.5px) !important;
    transform-origin: center !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta .ct-button-loader {
    display: none !important;
    animation: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta .ct-button-loader * {
    animation: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cart {
    position: relative;
    box-sizing: border-box !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #111111 !important;
    box-shadow: none !important;
    transition:
        transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
        opacity 160ms ease;
}

.woocommerce ul.products li.product.wc-card .wc-card__cart::before {
    display: none;
}

.wc-card__cart-icon {
    position: relative;
    z-index: 1;
    width: var(--wc-card-action-icon);
    height: var(--wc-card-action-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wc-card__cart-icon svg {
    width: var(--wc-card-action-icon);
    height: var(--wc-card-action-icon);
    display: block;
    color: currentColor;
    stroke: none;
    fill: currentColor;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.woocommerce ul.products li.product.wc-card .wc-card__cart--disabled {
    background: #363636 !important;
    background-image: none !important;
    color: #7d7d7d !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cart.added {
    background: #ffffff !important;
    color: #111111 !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cart.loading {
    opacity: 0.68;
}

/* =====================================================
   Wishlist States
===================================================== */

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive {
    position: relative;
    box-shadow: none !important;
    filter: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive::before,
.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive::after {
    content: none !important;
    display: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive[data-button-state*="active"] {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: none !important;
    filter: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive[data-button-state*="active"] svg:not(.ct-button-loader),
.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive[data-button-state*="active"] svg:not(.ct-button-loader) path {
    color: #111111 !important;
    fill: #111111 !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive .ct-icon-container {
    position: relative;
    z-index: 1;
    box-shadow: none !important;
    filter: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive .ct-heart-fill {
    transform: scale(0.25);
    transform-origin: center;
    filter: blur(4px);
    transition:
        opacity 160ms cubic-bezier(0.2, 0, 0, 1),
        transform 160ms cubic-bezier(0.2, 0, 0, 1),
        filter 160ms cubic-bezier(0.2, 0, 0, 1);
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive[data-button-state*="active"] .ct-heart-fill {
    fill: #111111 !important;
    opacity: 1 !important;
    transform: scale(1);
    filter: blur(0);
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive[data-button-state*="active"] svg:not(.ct-button-loader) {
    box-shadow: none !important;
    filter: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta
.ct-wishlist-button-archive[data-button-state*="loading"] {
    opacity: 0.68;
    pointer-events: none;
}

/* =====================================================
   Focus + Motion
===================================================== */

.wc-card__link:focus-visible,
.wc-card__title a:focus-visible,
.woocommerce ul.products li.product.wc-card .wc-card__cta > a:focus-visible,
.woocommerce ul.products li.product.wc-card .wc-card__cta > button:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 3px;
}

.woocommerce ul.products li.product.wc-card .wc-card__cta > a:active,
.woocommerce ul.products li.product.wc-card .wc-card__cta > button:active {
    transform: scale(0.96) !important;
    transition-duration: 120ms;
}

@media (hover: hover) and (pointer: fine) {
    .wc-card__inner:hover {
        transform: translateY(-6px);
    }

    .wc-card__inner:hover .wc-card__link img {
        transform: scale(1.035);
    }

    .wc-card__inner:hover .wc-card__badge {
        transform: translateY(-2px);
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cta > a:not(.wc-card__cart):hover,
    .woocommerce ul.products li.product.wc-card .wc-card__cta > button:not(.wc-card__cart):hover {
        transform: translateY(-2px);
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cart:hover {
        transform: translateY(-2px) scale(1.04);
        background: #ffffff !important;
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cart:hover .wc-card__cart-icon svg {
        transform: translateX(1px) rotate(-2deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-card__inner,
    .wc-card__link img,
    .wc-card__sale-thread,
    .wc-card__badge,
    .woocommerce ul.products li.product.wc-card .wc-card__cta,
    .woocommerce ul.products li.product.wc-card .wc-card__cta > a,
    .woocommerce ul.products li.product.wc-card .wc-card__cta > button,
    .wc-card__cart-icon svg {
        transition-duration: 120ms !important;
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cta
    .ct-wishlist-button-archive::before,
    .woocommerce ul.products li.product.wc-card .wc-card__cta
    .ct-wishlist-button-archive .ct-heart-fill {
        transition-duration: 120ms !important;
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cta
    .ct-wishlist-button-archive::before,
    .woocommerce ul.products li.product.wc-card .wc-card__cta
    .ct-wishlist-button-archive .ct-heart-fill {
        transform: none !important;
        filter: none !important;
        transition-property: opacity !important;
    }

    .wc-card__sale-thread-path {
        animation: none;
        stroke-dashoffset: calc(var(--sale-thread-offset, 0px) - 12px);
    }

    .wc-card__inner:hover,
    .wc-card__inner:hover .wc-card__link img,
    .wc-card__inner:hover .wc-card__badge,
    .woocommerce ul.products li.product.wc-card .wc-card__cta > a:hover,
    .woocommerce ul.products li.product.wc-card .wc-card__cta > button:hover,
    .woocommerce ul.products li.product.wc-card .wc-card__cart:hover .wc-card__cart-icon svg {
        transform: none !important;
    }
}

/* =====================================================
   Brand Icon
===================================================== */

.wc-card__brand-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 1px;
    border-radius: 4px;
}

/* =====================================================
   Mobile
===================================================== */

@media (max-width: 768px) {
    .wc-card__content {
        padding: 14px 10px 16px;
    }

    .wc-card__title {
        font-size: 16px;
        min-height: calc(18px * 1.25 * 2);
    }

    .wc-card__pill {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .wc-card__sold-out-text {
        font-size: 8px;
    }

    .wc-card__purchase {
        align-items: center;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .wc-card__price {
        flex: 1 1 auto;
        font-size: 14px;
        white-space: nowrap;
    }

    .wc-card__price .price {
        gap: 2px 4px;
    }

    .wc-card__price del {
        font-size: 10px;
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cta {
        min-height: 40px;
        gap: 2px !important;
        padding: 0 !important;
        border-radius: 99px !important;
    }
}

@media (max-width: 380px) {
    .wc-card__content {
        padding-inline: 8px;
    }

    .wc-card__price {
        font-size: 13px;
    }

    .wc-card__price del {
        font-size: 9px;
    }

    .woocommerce ul.products li.product.wc-card .wc-card__cta {
        --wc-card-action-size: 36px;
        --wc-card-action-icon: 16px;

        min-height: 40px;
        gap: 1px !important;
        padding: 1px !important;
    }
}
