/* ==========================================================
   Elementor Product Card
========================================================== */
.epc-card {
	margin-top:30px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    transition: all .3s ease;
    box-sizing: border-box;
}

/* ==========================================================
   Empty-state notice (shown only in the Elementor editor
   when no product can be resolved).
========================================================== */

.epc-card.epc-empty {
    padding: 24px;
    background: #f7f7f7;
    border: 1px dashed #c3c3c3;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================
   Image wrapper
========================================================== */

.epc-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.epc-image {
    position: relative;
    display: block;
    overflow: hidden;
    line-height: 0;
    text-decoration: none;
}

/* Colour overlay (controlled via Elementor style controls) */
.epc-image::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
    background-color: transparent;
    transition: opacity .35s ease;
}

.epc-card:hover .epc-image::after {
    opacity: 1;
}

.epc-image img {
    display: block;
    width: 100%;
    height: 315px;
    transition: transform .35s ease, opacity .35s ease, filter .35s ease;
    object-fit: contain;
	object-position:center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
	    filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.22));
}

.epc-primary-image {
    position: relative;
    z-index: 1;
}

.epc-secondary-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 2;
    transition: opacity .35s ease, visibility .35s ease, transform .35s ease;
}

/* Hover state — show secondary image, scale both. */
.epc-card:hover .epc-secondary-image {
    opacity: 1;
    visibility: visible;
}

.epc-card:hover .epc-primary-image {
    opacity: 0;
}

/* Hover-effect variants (prefix_class on the widget). */
.epc-hover-zoom .epc-card:hover .epc-primary-image,
.epc-hover-zoom .epc-card:hover .epc-secondary-image {
    transform: scale(1.05);
}

.epc-hover-zoom .epc-card:hover .epc-primary-image {
    filter: brightness(.95);
}

.epc-hover-fade .epc-card:hover .epc-secondary-image {
    transform: none;
}

.epc-hover-none .epc-card:hover .epc-primary-image,
.epc-hover-none .epc-card:hover .epc-secondary-image {
    transform: none;
}

/* ==========================================================
   Badges
========================================================== */

.epc-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.epc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 4px;
    color: #fff;
    transition: transform .35s ease;
}

.epc-sale-badge {
    background-color: #ef4444;
}

.epc-stock-badge.in-stock {
    background-color: #16a34a;
}

.epc-stock-badge.out-of-stock {
    background-color: #dc2626;
}

.epc-card:hover .epc-badge {
    transform: translateY(-2px);
}

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

.epc-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.epc-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.epc-title a {
    color: inherit;
    text-decoration: none;
    transition: color .25s ease;
}

.epc-price {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.epc-price del {
    opacity: .6;
    margin-right: 6px;
}

.epc-price ins {
    text-decoration: none;
}

/* ==========================================================
   Rating (WooCommerce default markup)
========================================================== */

.epc-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.epc-rating .star-rating {
    float: none;
    margin: 0;
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 1em;
    width: 5.4em;
    font-family: 'star';
}

.epc-rating .star-rating::before {
    content: "\73\73\73\73\73";
    color: #d3d3d3;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}

.epc-rating .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.epc-rating .star-rating span::before {
    content: "\53\53\53\53\53";
    top: 0;
    position: absolute;
    left: 0;
}

.epc-rating-count {
    font-size: 13px;
    opacity: .7;
}

/* ==========================================================
   Description
========================================================== */

.epc-description {
    line-height: 1.7;
}

.epc-description p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   Meta (categories, etc.)
========================================================== */

.epc-meta-item {
    line-height: 1.5;
    font-size: 14px;
}

.epc-meta-item--categories {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
    opacity: .8;
}

.epc-meta-item--categories a {
    text-decoration: none;
    color: inherit;
    transition: color .25s ease;
}

/* ==========================================================
   Add-to-cart actions
========================================================== */

.epc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.epc-button,
.epc-actions .button,
.epc-actions .added_to_cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background-color: #111827;
    transition: all .25s ease;
}

.epc-button:hover,
.epc-actions .button:hover,
.epc-actions .added_to_cart:hover {
    color: #fff;
    background-color: #1f2937;
}

.epc-button:focus,
.epc-actions .button:focus,
.epc-actions .added_to_cart:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.epc-button.loading,
.epc-actions .button.loading {
    opacity: .7;
    pointer-events: none;
}

.epc-button.added,
.epc-actions .button.added {
    background-color: #16a34a;
}

.epc-actions .added_to_cart {
    margin-left: 0;
}

/* Full-width button variant (Elementor style switch). */
.epc-button-full-width .epc-actions {
    display: block;
}

.epc-button-full-width .epc-button,
.epc-button-full-width .epc-actions .button,
.epc-button-full-width .epc-actions .added_to_cart {
    display: flex;
    width: 100%;
}

/* ==========================================================
   Responsive
========================================================== */

@media (max-width: 767px) {

    .epc-content {
        gap: 10px;
    }

    .epc-actions {
        flex-direction: column;
    }

    .epc-actions .button,
    .epc-button {
        width: 100%;
    }

    .epc-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
}
