/* =====================================================
   Woo Showcase for Elementor — Frontend Styles
   ===================================================== */

/* --- Grid Container --- */
.wse-products-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

.wse-no-products {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* --- Product Card --- */
.wse-product-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.wse-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* --- Image Wrapper (ratio box) --- */
.wse-product-image {
    position: relative;
    overflow: hidden;
}

.wse-image-inner {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.wse-image-inner img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.wse-product-card:hover .wse-image-inner img {
    transform: scale(1.05);
}

/* --- Badges --- */
.wse-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.wse-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.4;
}

.wse-badge--sale { background-color: #e44d26; }
.wse-badge--new  { background-color: #27ae60; }

/* --- Hover Overlay Action Buttons --- */
.wse-card-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.wse-product-card:hover .wse-card-overlay {
    opacity: 1;
    transform: translateX(0);
}

.wse-overlay-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.wse-overlay-btn:hover {
    background: #0a0a0a;
    color: #fff;
    transform: scale(1.1);
}

.wse-wishlist-btn.wse-wishlisted {
    background: #e44d26;
    color: #fff;
}

/* --- Card Body --- */
.wse-product-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* --- Category Label --- */
.wse-product-category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
}

/* --- Title --- */
.wse-product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.wse-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.wse-product-title a:hover {
    color: #555;
}

/* --- Star Ratings (overrides WC styles) --- */
.wse-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.wse-product-rating .star-rating {
    font-size: 13px;
    color: #f5a623;
}

.wse-rating-count {
    font-size: 11px;
    color: #aaa;
}

/* --- Price --- */
.wse-product-price {
    margin-top: 2px;
}

.wse-product-price .price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.wse-product-price del {
    font-size: 13px;
    color: #bbb;
    font-weight: 400;
    margin-right: 4px;
}

.wse-product-price ins {
    text-decoration: none;
    color: #e44d26;
}

/* --- Short Description --- */
.wse-product-excerpt {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    margin-top: 2px;
}

/* --- Add to Cart Button --- */
.wse-add-to-cart {
    display: inline-block;
    margin-top: auto;
    padding: 9px 16px;
    background: #0a0a0a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-align: center;
    line-height: 1.4;
}

.wse-add-to-cart:hover {
    background: #444;
    color: #fff;
    text-decoration: none;
}

.wse-add-to-cart:active {
    transform: scale(0.97);
}

.wse-add-to-cart.added {
    background: #27ae60;
}

.wse-add-to-cart.loading {
    opacity: 0.75;
    pointer-events: none;
}

/* --- Quick View Modal --- */
.wse-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.wse-modal-overlay.wse-active {
    display: flex;
    animation: wseFadeIn 0.2s ease;
}

@keyframes wseFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wse-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 780px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    animation: wseSlideUp 0.25s ease;
}

@keyframes wseSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wse-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    color: #555;
    transition: background 0.2s;
}

.wse-modal-close:hover {
    background: #ddd;
}

.wse-modal-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.wse-modal-image {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}

.wse-modal-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.wse-modal-details {
    flex: 1;
    min-width: 220px;
}

.wse-modal-details h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.wse-modal-details .price {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    display: block;
}

.wse-modal-details .wse-modal-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.wse-modal-details .wse-add-to-cart {
    width: 100%;
    padding: 12px;
    font-size: 13px;
}

/* --- Loading spinner inside modal --- */
.wse-modal-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 14px;
}

.wse-modal-loading::after {
    content: '';
    display: block;
    width: 32px; height: 32px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: wseSpin 0.7s linear infinite;
    margin: 12px auto 0;
}

@keyframes wseSpin {
    to { transform: rotate(360deg); }
}

/* --- Responsive fallback --- */
@media (max-width: 480px) {
    .wse-modal {
        padding: 24px 18px;
    }

    .wse-modal-content {
        flex-direction: column;
    }

    .wse-modal-image {
        max-width: 100%;
    }
}
