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

/* =====================================================
   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 {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e6e6e6;
    border-radius: 21px;
    box-shadow: 0px 14px 30px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

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

.wc-card__media {
    position: relative;
    background: #f1f1f1;
}

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

.wc-card__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =====================================================
   ACTIONS — HARD OVERRIDE
===================================================== */

.woocommerce ul.products li.product.wc-card .wc-card__actions {
    --btn: 34px;
    --ico: 18px;
    --wish-boost: 1.12;

    position: absolute;
    top: 10px;
    right: 10px;

    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    box-shadow: none !important;
    z-index: 10;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions * {
    box-shadow: none !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions > a,
.woocommerce ul.products li.product.wc-card .wc-card__actions > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: var(--btn) !important;
    height: var(--btn) !important;
    min-width: var(--btn) !important;
    min-height: var(--btn) !important;

    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;

    background: #fff !important;
    color: #111 !important;

    text-decoration: none !important;
    line-height: 0 !important;
    font-size: 0 !important;

    box-shadow: 0 8px 18px rgba(0,0,0,.14) !important;
    transition: transform .15s ease, box-shadow .15s ease;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions > a:hover,
.woocommerce ul.products li.product.wc-card .wc-card__actions > button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,.18) !important;
}

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

.woocommerce ul.products li.product.wc-card .wc-card__actions > a.ct-wishlist-button-archive,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wishlist"],
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wish"] {
    padding: 0 !important;
    min-width: var(--btn) !important;
    min-height: var(--btn) !important;
    line-height: 0 !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions > a.ct-wishlist-button-archive span,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wishlist"] span,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wish"] span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions > a.ct-wishlist-button-archive svg,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wishlist"] svg,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wish"] svg {
    width: var(--ico) !important;
    height: var(--ico) !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    line-height: 0 !important;
    transform: scale(var(--wish-boost)) translateY(-0.5px) !important;
    transform-origin: center !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions .ct-icon-container {
    width: var(--ico) !important;
    height: var(--ico) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

.woocommerce ul.products li.product.wc-card .wc-card__actions > a.ct-wishlist-button-archive::before,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a.ct-wishlist-button-archive::after,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wishlist"]::before,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wishlist"]::after,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wish"]::before,
.woocommerce ul.products li.product.wc-card .wc-card__actions > a[class*="wish"]::after {
    content: "" !important;
    width: var(--ico) !important;
    height: var(--ico) !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: scale(var(--wish-boost)) translateY(-0.5px) !important;
    transform-origin: center !important;
}

/* =====================================================
   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;
}

/* =====================================================
   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: #888888;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

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

.wc-card__title a {
    color: var(--theme-palette-color-4);
    text-decoration: none;
    text-transform: uppercase;
    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: #f8f8f8;
    color: #222;
    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;
}

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

/* =====================================================
   CTA Button — Light Version
===================================================== */

.wc-card__cta {
    width: 100%;
    min-height: 36px;
    padding: 8px 8px 8px 14px !important;
    box-sizing: border-box;

    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-radius: 16px !important;
    border: 1px #e6e6e6 solid;
    background: #ffffff !important;
    color: #000000 !important;
    text-decoration: none !important;

    box-shadow: 0 8px 18px rgba(0,0,0,.06);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.wc-card__cta:hover {
    transform: translateY(-2px);
    background: #ffffff !important;
    border-color: #dddddd !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.10);
    color: #111111 !important;
}

.wc-card__cta:focus,
.wc-card__cta:active,
.wc-card__cta:visited {
    color: #111111 !important;
    text-decoration: none !important;
}

.wc-card__cta:active {
    transform: translateY(0);
}

.wc-card__cta-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 0;
    flex: 1 1 auto;
}

.wc-card__cta-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    color: #000000;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
    line-height: 1.05;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.wc-card__cta-price .price {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
    gap: 4px 8px;
    color: inherit !important;
    margin: 0 !important;
}

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

.wc-card__cta-price del {
    color: #a1a1a1 !important;
    font-size: 13px;
    line-height: 1;
    opacity: 1 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    width: 100%;
    text-align: left !important;
    margin: 0 !important;
}

.wc-card__cta-price ins {
    text-align: left !important;
    margin: 0 !important;
}

/* подпись под ценой убрана */
.wc-card__cta-meta {
    display: none !important;
}

.wc-card__cta-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #11FCC0;
    background: linear-gradient(135deg, #11FCC0, #25D2C5);
    color: #111111;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

.wc-card__cta-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    color: #111111;
    stroke: currentColor;
    fill: none;
}

.wc-card__cta--variable {
    background: #ffffff;
    color: #ffffff !important;
}

.wc-card__cta--disabled {
    background: linear-gradient(180deg, #fafafa 0%, #f1f1f1 100%) !important;
    border-color: #e6e6e6 !important;
    color: #8c8c8c !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 8px 18px rgba(0,0,0,0.04);
}

.wc-card__cta--disabled .wc-card__cta-price,
.wc-card__cta--disabled .wc-card__cta-price .price,
.wc-card__cta--disabled .wc-card__cta-price .amount,
.wc-card__cta--disabled .wc-card__cta-price bdi,
.wc-card__cta--disabled .wc-card__cta-price ins {
    color: #7f7f7f !important;
}

.wc-card__cta--disabled .wc-card__cta-price del {
    color: #b2b2b2 !important;
}

.wc-card__cta--disabled .wc-card__cta-icon {
    background: linear-gradient(135deg, #ededed 0%, #dfdfdf 100%);
    color: #7d7d7d;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 0 0 1px rgba(0,0,0,0.03);
}

.wc-card__cta--disabled .wc-card__cta-icon svg {
    color: #7d7d7d;
    stroke: currentColor;
}

.wc-card__cta.added {
    background: #ffffff !important;
    border-color: #dcdcdc !important;
}

.wc-card__cta.loading {
    opacity: .86;
}

/* =====================================================
   Wishlist Active State
===================================================== */

.woocommerce ul.products li.product.wc-card
.wc-card__actions
button.ct-wishlist-button-archive[data-button-state="active"]
svg .ct-heart-fill {
    fill: #ec2053 !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 14px 16px;
    }

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

    .woocommerce ul.products li.product.wc-card .wc-card__actions {
        top: 8px;
        right: 8px;
        gap: 10px;
    }

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

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

    .wc-card__cta {
        min-height: 36px;
        padding: 8px 8px 8px 14px !important;
        border-radius: 16px !important;
        gap: 12px;
    }

    .wc-card__cta-price {
        font-size: 14px;
    }

    .wc-card__cta-price del {
        font-size: 11px;
    }

    .wc-card__cta-icon {
        width: 32px;
        height: 32px;
    }

    .wc-card__cta-icon svg {
        width: 16px;
        height: 16px;
    }
}