.ebm-woo-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.ebm-woo-carousel__swiper {
    padding-bottom: 50px;
    /* Increased for pagination spacing */
    padding-top: 10px;
    /* Space for hover lift */
    padding-left: 10px;
    padding-right: 10px;
}

/* Ensure equal height slides */
.ebm-woo-carousel__swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* --- Card Styles --- */
.ebm-woo-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    border-radius: 16px;
    padding: 0;
    /* Remove default padding, controlled by inner elements */
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}



/* --- Image Area --- */
.ebm-woo-card__image-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Default aspect ratio handling if not set by PHP */
    display: block;
}

.ebm-woo-card__thumb {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ebm-woo-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image covers the area */
    transition: transform 0.5s ease;
    display: block;
}



/* Aspect Ratios */
.ebm-aspect-ratio-100 .ebm-woo-card__image-wrap {
    aspect-ratio: 1 / 1;
}

.ebm-aspect-ratio-125 .ebm-woo-card__image-wrap {
    aspect-ratio: 4 / 5;
}

.ebm-aspect-ratio-75 .ebm-woo-card__image-wrap {
    aspect-ratio: 4 / 3;
}

/* --- Sale Badge --- */
.ebm-woo-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff4d4f;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Content Area --- */
.ebm-woo-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.ebm-woo-card__title {
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.4;
    font-weight: 600;

    /* Line clamp for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    /* Alignment fix: Reserve space for 2 lines so pricing aligns */
    min-height: 2.8em;
}

.ebm-woo-card__title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.ebm-woo-card__rating {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    font-size: 14px;
}


.ebm-woo-card__rating .star-rating {
    float: none;
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 14px;
    width: 5.4em;
    font-family: 'ebm-star';
    font-weight: 400;
    margin: 0 auto;
    color: #FFC107;
}

.ebm-woo-card__rating .star-rating::before,
.ebm-woo-card__rating .star-rating span::before {
    font-family: 'ebm-star';
}

.ebm-woo-card__rating .star-rating::before {
    content: "\73\73\73\73\73";
    color: #d3ced2;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    opacity: 0.5;
    /* Default empty star opacity */
}

.ebm-woo-card__rating .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.ebm-woo-card__rating .star-rating span::before {
    content: "\53\53\53\53\53";
    top: 0;
    position: absolute;
    left: 0;
    color: #FFC107;
    /* Filled star color */
}

/* Fallback if 'star' font is not loaded (rare but possible) */
@font-face {
    font-family: 'ebm-star';
    src: url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAQ4AA4AAAAABFAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEQAAABWPFQAQmNtYXAAAAGIAAAAOgAAAUrEwM+cY3Z0IAAAAcQAAAAUAAAAFwH/AZlzZnNtAAAB2AAAAAYAAAAGiu8AAWdhc3AAAAHcAAAACAAAAAj//wADZ2x5ZgAAAewAAACWAAAA8J8y/GRoZWFkAAACtAAAAC0AAAA2D2bT0WhoZWEAAALcAAAAIAAAACQHiQGiaG10eAAAAvQAAAAWAAAAFgy1AABsb2NhAAADCAAAAA4AAAAOAO4A/m1heHAAAAMWAAAAHgAAACAAUABnbmFtZQAAAzgAAAFOAAACqWQu4ANwb3N0AAAEAAAAABQAAAAg/4YAMHjaY2BkYGAAYpZ8l/14fpuvDNIsDCBw8+vXBEj6/9f/TxgY2F6AuRwMTCBRAK7tC64AeNpjYGRgYGP438DAwMD//z8DCDAyoAIuAFjSA8R42mNgZGBg4GFgYgBhRgYQMN0D5TIAMQQAAlwAbgAAeNpjYGS8wziBgZWBg6mLaS8DA4MPhGZ8w2CP4Q8DA5vJ3ATIDOJ42mNgY5A4w8DGsIeBgeE/EwPDfzYGhgeM/wwM/xgY/jMzMDBIMTAwCDAwMABJBgYAfEcJ6gAAAAAAAf8BmQAAD7QAABOsAAQAAAB42mNgYNCBwjCGfwwPGB4w/GdgYFjFwMCwiYGB4T8DA8N/ZoY/jA/+/2d8wPCf4T8D4wMwD8j5z8DwH0gDAPhWESwAAAAAAQAB//8AD3jaY2BgYI/4/5chg+E/IwPDf0YI858hnOEvIwPDL0YI8x8jA8N/ZgYAAAAA//8AAHjaY2BkYGDgAWIxIGZiYARCESBmAfMYAAXAAFEAAHjaY2BkYGDgAWIxIGZiYARCViBmAfMYAAXbAFUAfQAAAAAAAFwA/gAAAHjaY2BgYGaQY2BkYGDhYmBjYGJgZACCQCUjlQyU/wAAAP//AA942mNgYWBg4GFgYmBhYGRgYFBnAAIWSBgEwPQ/EzL8Z0Jm/WdC5v9nYviPEgYAJ9QJ6AAAAA==') format('woff');
    font-weight: normal;
    font-style: normal;
}

.ebm-woo-card__price {
    font-weight: 700;
    color: #222;
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.ebm-woo-card__price del {
    color: #999;
    font-weight: 400;
    font-size: 0.9em;
    text-decoration: line-through;
}

.ebm-woo-card__price ins {
    text-decoration: none;
}

/* --- Button --- */
.ebm-woo-card__cart {
    margin-top: auto;
}

.ebm-woo-card__cart a.button {
    background: #111;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    /* Pill shape */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    /* Full width button on card */
    border: 1px solid transparent;
}

.ebm-woo-card__cart a.button:hover {
    background: #333;
}

.ebm-woo-card__cart a.button.loading {
    opacity: 0.7;
    cursor: wait;
}

.ebm-woo-card__cart a.button.added::after {
    font-family: WooCommerce;
    content: "\e017";
    margin-left: 8px;
    vertical-align: bottom;
}

/* --- Navigation --- */
.ebm-woo-carousel__nav {
    pointer-events: none;
    /* Let clicks pass through the container, but enable for buttons */
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.ebm-woo-carousel__nav .ebm-woo-carousel__prev,
.ebm-woo-carousel__nav .ebm-woo-carousel__next {
    width: 44px;
    height: 44px;
    background: #ffffff;
    color: #222;
    border-radius: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    /* Re-enable clicks */
    position: absolute;
}

/* Inside Positioning */
.ebm-arrows-inside .ebm-woo-carousel__prev {
    left: 10px;
}

.ebm-arrows-inside .ebm-woo-carousel__next {
    right: 10px;
}

/* Outside Positioning */
.ebm-arrows-outside {
    width: auto;
    left: -60px;
    right: -60px;
}

.ebm-arrows-outside .ebm-woo-carousel__prev {
    left: 0;
}

.ebm-arrows-outside .ebm-woo-carousel__next {
    right: 0;
}


/* But keep overflow hidden on specific parts if needed, usually overflow:visible on the main wrapper is key */
/* Swiper container itself usually needs overflow hidden for the track, but we moved nav outside swiper-container if possible, 
   or allow it to overflow. 
   In our HTML structure: .ebm-woo-carousel -> .ebm-woo-carousel__swiper -> .swiper-wrapper
   Navigation is INSIDE .ebm-woo-carousel__swiper currently. 
   We need to ensure .ebm-woo-carousel__swiper has overflow:visible if we want arrows outside it?
   Actually, standard Swiper with overflow:hidden will clip. 
   Let's check the structure in PHP:
   <div class="ebm-woo-carousel ...">
      <div class="ebm-woo-carousel__swiper ..."> ... wrapper ... pagination ... nav ... </div>
   </div>
   
   To allow arrows outside, .ebm-woo-carousel__swiper needs overflow:visible, OR we must rely on padding.
   Better approach: overflow:visible on swiper container, but overflow:hidden on a wrapper AROUND existing slides? 
   No, usually just `overflow:visible` on the swiper-container works if we don't need to clip slides strictly at the edge.
   OR, we add padding to the container so arrows sit in the padding.
*/

.ebm-woo-carousel__swiper {
    overflow: visible;
    /* Prevent clipping of outside arrows/shadows */
    padding: 20px 0;
    /* Vertical padding for shadows */
}

/* Add horizontal padding when arrows are outside to prevent them hitting screen edge if full width */
.ebm-woo-carousel.ebm-arrows-outside {
    padding-left: 50px;
    padding-right: 50px;
}


.ebm-woo-carousel__nav .ebm-woo-carousel__prev:hover,
.ebm-woo-carousel__nav .ebm-woo-carousel__next:hover {
    background: #111;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.ebm-woo-carousel__nav .ebm-woo-carousel__prev.swiper-button-disabled,
.ebm-woo-carousel__nav .ebm-woo-carousel__next.swiper-button-disabled {
    opacity: 0.5;
    cursor: auto;
    pointer-events: none;
}

/* Pagination */
.ebm-woo-carousel__pagination {
    bottom: -5px !important;
    /* Adjust since we added padding-bottom */
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {

    /* Force inside on smaller screens or reduce outside distance */
    .ebm-arrows-outside {
        left: -20px;
        right: -20px;
    }

    /* Reset container padding on mobile if needed */
    .ebm-woo-carousel.ebm-arrows-outside {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 600px) {
    .ebm-woo-card__content {
        padding: 16px;
    }

    .ebm-woo-card__title {
        font-size: 15px;
    }

    .ebm-woo-card__cart a.button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* --- Actions Overlay --- */
.ebm-woo-card__image-wrap {
    position: relative;
    /* Ensure parent works for absolute positioning */
}

.ebm-woo-card__actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    display: flex;
    gap: 10px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ebm-woo-card:hover .ebm-woo-card__actions,
.ebm-woo-card.is-active .ebm-woo-card__actions {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Dim the image on hover for better contrast */


/* Base style for action buttons */
.ebm-woo-card__actions a.button,
.ebm-woo-card__actions .ebm-woo-card__action-btn {
    width: 44px;
    /* Slightly larger touch target */
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: #222;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 18px;
    text-decoration: none;
    line-height: 1;
}

/* Hover effects */
.ebm-woo-card__actions a.button:hover,
.ebm-woo-card__actions .ebm-woo-card__action-btn:hover {
    background: #222;
    color: #fff;
}

/* Add to Cart specific overrides to make it an icon */
.ebm-woo-card__actions a.button {
    font-size: 0 !important;
    /* Hide text */
    position: relative;
    overflow: hidden;
    /* Ensure no unwanted styles from theme */
    min-width: unset;
}

.ebm-woo-card__actions a.button::before {
    font-family: 'eicons';
    content: '\e8cc';
    /* eicon-cart-medium */
    font-size: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.ebm-woo-card__actions a.button.added::before {
    content: '\e017';
    /* check icon */
}

.ebm-woo-card__actions a.button.loading {
    opacity: 0.8;
}

.ebm-woo-card__actions a.button.loading::after {
    display: none;
    /* Hide default loader if any */
}


/* Wishlist Button */
.ebm-wishlist-btn i {
    pointer-events: none;
}

/* =========================================
   SKIN: CLASSIC (Default)
   ========================================= */
.ebm-skin-classic .ebm-woo-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.ebm-skin-classic .ebm-woo-card__content {
    text-align: center;
    padding: 20px;
}

.ebm-skin-classic .ebm-woo-card__title {
    font-weight: 600;
}

/* =========================================
   SKIN: MODERN (Overlay / Card Focus)
   ========================================= */
.ebm-skin-modern .ebm-woo-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
}



.ebm-skin-modern .ebm-woo-card__image-wrap {
    /* Make image slightly taller or just distinct */
}

/* Move actions to bottom right or different position for Modern? 
   Let's keep centered but make buttons distinctive */
.ebm-skin-modern .ebm-woo-card__actions .button,
.ebm-skin-modern .ebm-woo-card__actions .ebm-woo-card__action-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    border-radius: 8px;
    /* Squared with radius */
}

.ebm-skin-modern .ebm-woo-card__actions .button:hover,
.ebm-skin-modern .ebm-woo-card__actions .ebm-woo-card__action-btn:hover {
    background: #000;
    color: #fff;
}

.ebm-skin-modern .ebm-woo-card__content {
    text-align: left;
    /* Alignment change */
    padding: 24px;
}

.ebm-skin-modern .ebm-woo-card__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.ebm-skin-modern .ebm-woo-card__price {
    justify-content: flex-start;
    /* Align left */
    font-size: 1.1rem;
    color: #111;
}

.ebm-skin-modern .ebm-woo-card__rating {
    justify-content: flex-start;
}

.ebm-skin-modern .ebm-woo-card__cart a.button {
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #000;
}


/* =========================================
   SKIN: MINIMAL (Clean)
   ========================================= */
.ebm-skin-minimal .ebm-woo-card {
    border: none;
    box-shadow: none;
    /* No shadow */
    background: transparent;
    border-radius: 0;
}

.ebm-skin-minimal .ebm-woo-card:hover {
    transform: none;
    /* No movement */
    box-shadow: none;
}

.ebm-skin-minimal .ebm-woo-card__image-wrap {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #f5f5f5;
    /* Placeholder bg */
}

.ebm-skin-minimal .ebm-woo-card__content {
    padding: 0;
    /* Remove padding */
    text-align: left;
}

.ebm-skin-minimal .ebm-woo-card__title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.ebm-skin-minimal .ebm-woo-card__price {
    justify-content: flex-start;
    font-weight: 400;
    color: #555;
    font-size: 0.95rem;
}

.ebm-skin-minimal .ebm-woo-card__rating {
    display: none;
    /* Hide rating for minimal, or make very subtle */
}

/* Minimal 'Add to Cart' - maybe just a text link or simple icon? 
   Let's keep button but very subtle */
.ebm-skin-minimal .ebm-woo-card__cart a.button {
    background: transparent;
    color: #000;
    border: 1px solid #eee;
    padding: 8px 16px;
    border-radius: 4px;
    width: auto;
    display: inline-block;
    font-size: 13px;
}

.ebm-skin-minimal .ebm-woo-card__cart a.button:hover {
    border-color: #000;
    background: transparent;
    transform: none;
    box-shadow: none;
}