/**
 * SX1 Shared Product Card Styles
 * Used by: Carousel & Product Browser
 */

:root {
    --c-border-radius: 0px;
}

/*
====== PRODUCT CARD ======
*/
.sx1-product-card,
.sx1-carousel-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: var(--c-border-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sx1-product-card:hover,
.sx1-carousel-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: #01a850;
}

/*
====== PRODUCT HEADER (Title - Green, Centered) ======
*/
.sx1-card-header {
    padding: 15px 15px 0 15px;
    text-align: center;
    background-color: #ffffff;
    min-height: 90px;
}

.sx1-card-product-title {
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sx1-card-product-title a {
    color: #01a850;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sx1-card-product-title a:hover {
    color: #018a42;
}

/*
====== PRODUCT IMAGE ======
*/
.sx1-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    margin: 0 auto;
    max-width: 250px;
}

.sx1-card-image a {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.sx1-card-image img {
    width: 100%;
    height: 100% !important;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sx1-product-card:hover .sx1-card-image img,
.sx1-carousel-item:hover .sx1-card-image img {
    transform: scale(1.05);
}

/* New Badge - 8-pointed star (two overlapping squares) */
.sx1-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    left: 10px;
    color: #ffffff;
    width: 40px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1.2;
    z-index: 12;
}

/* First square (background) */
.sx1-card-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: #e67e22;
    transform: translate(-50%, -50%) rotate(15deg);
    z-index: -2;
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.4);
}

/* Second square rotated 45 degrees */
.sx1-card-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: #e67e22;
    transform: translate(-50%, -50%) rotate(60deg);
    z-index: -1;
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.4);
}

/*
====== PRODUCT INFO (Description & Button) ======
*/
.sx1-card-info {
    padding: 15px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.sx1-card-excerpt {
    flex-grow: 1;           /* Kitölti a szabad helyet a gomb felett */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* A szöveget az elem aljára tolja */
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    text-align: center;
    min-height: 65px;
}

/*
====== SHARED BUTTON STYLES (Quick View / Details) ======
*/
.sx1-card-actions {
    height: auto;
    display: flex;
    justify-content: center; /* Always center */
    align-items: center;
    margin-top: auto;
    position: relative; /* For absolute positioning of video btn */
}

.sx1-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    background-color: #01a850;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--c-border-radius);
    transition: all 0.3s ease;
    border: 2px solid #01a850;
    cursor: pointer;
    white-space: nowrap;
    max-width: 300px;
    width: auto;
    margin-right: 20px; /* Space for video button */
}

/* Video Button - Absolute positioned to the right */
.sx1-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    color: #01a850 !important;
    background-color: #ffffff !important;
    text-decoration: none;
    border-radius: var(--c-border-radius);
    transition: all 0.3s ease;
    border: 1px solid #01a850;
    cursor: pointer;
    padding: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.sx1-video-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
    pointer-events: none; /* Click passes through to button */
}

.sx1-details-btn::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.sx1-details-btn:hover {
    background-color: #ffffff;
    color: #01a850 !important;
    border: 2px solid #01a850;
    /*transform: translateY(-2px);*/
    box-shadow: 0 4px 12px rgba(1, 168, 80, 0.3);
}

.sx1-details-btn:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2301a850' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E");
}

.sx1-video-btn:hover {
    color: #ffffff !important;
    background-color: #01a850 !important;
    border: 2px solid #01a850;
    /*transform: translateY(-50%) translateY(-2px); !* Keep vertical centering + lift *!*/
    box-shadow: 0 4px 12px rgba(1, 168, 80, 0.3);
}

/* ---- PDF DOWNLOAD ---- */
.sx1-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #ffffff;
    border: 2px solid #01a850;
    color: #01a850;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2rem;
    border-radius: 0px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sx1-pdf-btn:hover {
    color: #ffffff;
    background-color: #01a850 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 168, 80, 0.3);
}

.sx1-pdf-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/*
====== RESPONSIVE DESIGN ======
*/

/* Tablet (under 1024px) */
@media screen and (max-width: 1023px) {
    .sx1-card-product-title {
        font-size: 17px;
        min-height: 48px;
    }
    
    .sx1-card-excerpt {
        font-size: 13px;
        min-height: 60px;
    }
    
    .sx1-card-badge {
        width: 48px;
        height: 48px;
        font-size: 10px;
    }
}

/* Mobile (under 768px) */
@media screen and (max-width: 767px) {
    .sx1-card-header {
        padding: 12px 10px 0 10px;
    }
    
    .sx1-card-product-title {
        font-size: 16px;
        min-height: 44px;
    }
    
    .sx1-card-info {
        padding: 12px 15px 15px 15px;
        gap: 12px;
    }
    
    .sx1-card-excerpt {
        font-size: 13px;
        min-height: 55px;
    }
    
    .sx1-details-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .sx1-details-btn::before {
        width: 16px;
        height: 16px;
    }
    
    /* Video button responsive */
    .sx1-video-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .sx1-video-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    /* Smaller badge on mobile */
    .sx1-card-badge {
        width: 45px;
        height: 45px;
        font-size: 10px;
        top: -18px;
        left: 8px;
    }

    .sx1-pdf-btn {
        padding: 8px 12px;
        font-size: 14px !important;
    }
}

/* Small Mobile (under 480px) */
@media screen and (max-width: 479px) {
    .sx1-card-product-title {
        font-size: 15px;
        min-height: 42px;
    }
    
    .sx1-card-excerpt {
        font-size: 12px;
        min-height: 50px;
    }
    
    .sx1-details-btn {
        padding: 9px 20px;
        font-size: 13px;
    }
    
    .sx1-details-btn::before {
        width: 15px;
        height: 15px;
    }
    
    /* Video button small mobile */
    .sx1-video-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
    
    .sx1-video-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    /* Even smaller badge on small mobile */
    .sx1-card-badge {
        width: 42px;
        height: 42px;
        font-size: 14px;
        top: 20px;
        left: 6px;
    }
}
