/* =====================================================
   MODERN PRODUCT CARDS STYLING
   Enhanced product card design with borders and effects
   ===================================================== */

/* Product Card Container */
.modern-product-card {
    margin-bottom: 0;
    padding: 0;
}

.product-card-inner {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-inner:hover {
    border-color: #555;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Product Image */
.modern-product-card .product-img {
    position: relative;
    overflow: hidden;
    background: #000;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.modern-product-card:hover .product-img img {
    transform: scale(1.1);
}

/* Sale Badge */
.modern-product-card .sale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hover Actions */
.product-hover-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.modern-product-card:hover .product-hover-actions {
    opacity: 1;
}

.quick-view-btn {
    background: linear-gradient(135deg, #a8741a 0%, #d4af37 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quick-view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.quick-view-btn i {
    margin-right: 8px;
}

/* Product Content */
.modern-product-card .product-content {
    padding: 15px 10px;
    background: #1a1a1a;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.product-category {
    display: inline-block;
    color: #999;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.modern-product-card .product-content h4 {
    margin: 8px 0 10px;
    min-height: 36px;
}

.modern-product-card .product-content h4 a {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-product-card .product-content h4 a:hover {
    color: #d4af37;
}

/* Price */
.modern-product-card .product-price-wrapper {
    margin: 10px 0;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modern-product-card .money {
    color: #d4af37;
    font-size: 18px;
    font-weight: 700;
}

.modern-product-card .product-price-old {
    margin-left: 10px;
}

.modern-product-card .product-price-old .money {
    color: #666;
    font-size: 13px;
    text-decoration: line-through;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    background: #4a5568;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #a8741a 0%, #d4af37 100%);
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.add-to-cart-btn i {
    margin-right: 8px;
}

/* Force Grid Layout only for tab containers (avoid touching generic carousel class) */
#new-arrivals-products,
#top-rated-products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Featured items custom grid: 2 large (top) + 3 medium (below) */
#embroprime-products {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
}
#embroprime-products .etsy-card.size-large { grid-column: span 3; }
#embroprime-products .etsy-card.size-medium { grid-column: span 2; }

/* Disable Owl Carousel wrappers only inside our product sections */
#embroprime-products.owl-carousel,
#new-arrivals-products.owl-carousel,
#top-rated-products.owl-carousel {
    display: grid !important;
}

/* Unwrap owl structure only inside our product containers */
#embroprime-products .owl-stage-outer,
#embroprime-products .owl-stage,
#embroprime-products .owl-item,
#new-arrivals-products .owl-stage-outer,
#new-arrivals-products .owl-stage,
#new-arrivals-products .owl-item,
#top-rated-products .owl-stage-outer,
#top-rated-products .owl-stage,
#top-rated-products .owl-item {
    display: contents !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide navigation only for product grids (not hero slider) */
#new-arrivals-products .owl-nav,
#new-arrivals-products .owl-dots,
#top-rated-products .owl-nav,
#top-rated-products .owl-dots {
    display: none !important;
}

/* Ensure hero slider shows only the first custom slide */
.slider-active .single-slider:not(:first-child) {
    display: none !important;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    #new-arrivals-products,
    #top-rated-products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    #embroprime-products { grid-template-columns: repeat(4, 1fr) !important; gap: 16px !important; }
    #embroprime-products .etsy-card.size-large { grid-column: span 2; }
    #embroprime-products .etsy-card.size-medium { grid-column: span 1; }
}

@media (max-width: 991px) {
    #new-arrivals-products,
    #top-rated-products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    #embroprime-products { grid-template-columns: repeat(3, 1fr) !important; gap: 14px !important; }
    .modern-product-card .product-img { height: 180px; }
}

@media (max-width: 767px) {
    #new-arrivals-products,
    #top-rated-products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #embroprime-products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .modern-product-card .product-img { height: 160px; }
    .modern-product-card .product-content { padding: 10px 8px; }
    .modern-product-card .money { font-size: 14px; }
}

@media (max-width: 480px) {
    #new-arrivals-products,
    #top-rated-products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #embroprime-products { grid-template-columns: 1fr !important; gap: 10px !important; }
}

/* Loading State */
.watch-slider-active.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watch-slider-active.loading::after {
    content: "Loading products...";
    color: #999;
    font-size: 16px;
}
