/* ============================================
   TRENDING PRODUCTS - COMPLETE REDESIGN FROM SCRATCH
   Brand New Card Design with Modern UI
   Clean, Minimal, Professional
   ============================================ */

/* ============================================
   SECTION STYLING - Blackish Background with Moon Effects
   ============================================ */

.trending-products-modern {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
    padding: 80px 20px !important;
    overflow: hidden;
}

/* Moon Effect - Large Circle Top Left */
.trending-products-modern::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Moon Effect - Medium Circle Bottom Right */
.trending-products-modern::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 35%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Section Header - Updated for Dark Background */
.section-header-modern {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

/* Dark/Light Mode Toggle Button */
.theme-toggle-btn {
    position: absolute;
    top: -60px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.theme-toggle-btn:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 24px rgba(147, 51, 234, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.theme-toggle-btn:active {
    transform: scale(1.05);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(147, 51, 234, 0.5);
    border-radius: 50px;
    color: #a855f7;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
    backdrop-filter: blur(10px);
}

.section-title-modern {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.section-title-modern .gradient-text {
    background: linear-gradient(135deg, #9333ea, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description-modern {
    font-size: 1.1rem;
    color: #9ca3af;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   PRODUCT GRID - New Layout
   ============================================ */

.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    max-width: 1250px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   PRODUCT CARD - PREMIUM GLASS MORPHISM DESIGN
   Dark theme with frosted glass effect
   ============================================ */

.product-card-modern {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-modern:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(147, 51, 234, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(147, 51, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

/* Top Badge - Glowing Effect */
.product-badge-modern {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    backdrop-filter: blur(10px);
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.product-badge-modern.hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
}

.product-badge-modern.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
}

.product-badge-modern.sale {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.6);
}

.product-badge-modern.trending {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6);
}

/* Image Section - Enhanced */
.product-image-modern {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.product-image-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.9) saturate(1.1);
}

.product-card-modern:hover .product-image-modern img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.05) saturate(1.2);
}

/* Dark gradient overlay on image */
.product-image-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    pointer-events: none;
}

/* REMOVE OVERLAY - Hide all overlay elements */
.product-overlay-modern,
.product-quick-actions,
.quick-action-btn {
    display: none !important;
}

/* ============================================
   PRODUCT CONTENT - GLASS MORPHISM STYLE
   ============================================ */

.product-content-modern {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Category Tag - Glowing Pill */
.product-category-modern {
    display: inline-block;
    width: fit-content;
    padding: 5px 14px;
    background: rgba(147, 51, 234, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 20px;
    font-size: 0.7rem;
    color: #c084fc;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

/* Product Title - White on Glass */
.product-title-modern {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 6px 0 0 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* REMOVE RATINGS - Hide completely */
.product-rating-modern,
.stars-modern,
.rating-count-modern {
    display: none !important;
}

/* ============================================
   DROPDOWN - INTEGRATED IN NEW DESIGN
   ============================================ */

.product-features-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

/* REMOVE ALL FEATURE TAGS except dropdown */
.feature-tag-modern:not(.plan-dropdown-mobile) {
    display: none !important;
}

/* Dropdown - Glass Style with Full Functionality */
.plan-dropdown-mobile {
    display: inline-block !important;
    width: 100% !important;
    padding: 12px 18px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23ffffff' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.plan-dropdown-mobile:hover {
    background: rgba(147, 51, 234, 0.3) !important;
    border-color: rgba(147, 51, 234, 0.6) !important;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4) !important;
}

.plan-dropdown-mobile:focus {
    outline: none !important;
    border-color: rgba(147, 51, 234, 0.8) !important;
    background: rgba(147, 51, 234, 0.2) !important;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2), 0 4px 16px rgba(147, 51, 234, 0.4) !important;
}

/* ============================================
   PRICING - GLASS STYLE WITH CUSTOM FONT
   ============================================ */

.product-price-modern {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin: 14px 0 16px 0;
    padding: 14px 0;
    position: relative;
}

/* Redesigned divider line with dots pattern */
.product-price-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(147, 51, 234, 0.6) 50%,
        transparent 100%);
}

.product-price-modern::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #9333ea, #a855f7);
    border-radius: 50%;
    box-shadow:
        -20px 0 0 -1px rgba(147, 51, 234, 0.4),
        20px 0 0 -1px rgba(147, 51, 234, 0.4),
        -40px 0 0 -2px rgba(147, 51, 234, 0.2),
        40px 0 0 -2px rgba(147, 51, 234, 0.2);
}

.price-current-modern {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(147, 51, 234, 0.5);
    font-family: 'Courier New', Courier, monospace;
    width: 100%;
    order: 1;
}

.price-original-modern {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    font-weight: 500;
    font-family: 'Courier New', Courier, monospace;
    order: 2;
}

.price-discount-modern {
    margin-left: auto;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3));
    backdrop-filter: blur(10px);
    color: #6ee7b7;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    font-family: 'Courier New', Courier, monospace;
    order: 3;
}

/* ============================================
   ACTIONS - GLASS MORPHISM BUTTONS
   ============================================ */

.product-actions-modern {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: auto;
}

/* Add to Cart - Glass Effect */
.btn-add-cart-modern {
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(124, 58, 237, 0.4));
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(147, 51, 234, 0.5);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.3);
}

.btn-add-cart-modern:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.6), rgba(124, 58, 237, 0.6));
    border-color: rgba(147, 51, 234, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.5);
}

.btn-add-cart-modern:active {
    transform: translateY(-1px);
}

.btn-add-cart-modern i {
    font-size: 0.95rem;
}

/* WhatsApp Button - Glass Effect */
.btn-whatsapp-modern {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.4), rgba(18, 140, 126, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(37, 211, 102, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-modern:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.6), rgba(18, 140, 126, 0.6));
    border-color: rgba(37, 211, 102, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp-modern:active {
    transform: translateY(-1px);
}

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

@media (max-width: 768px) {
    .products-grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .product-content-modern {
        padding: 20px;
    }

    .product-title-modern {
        font-size: 1.2rem;
    }

    .price-current-modern {
        font-size: 1.75rem;
    }

    .section-header-modern {
        margin-bottom: 30px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .products-grid-modern {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   LIGHT MODE STYLES
   Activated when .light-mode class is added
   ============================================ */

.trending-products-modern.light-mode {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

/* Light mode moon effects - inverted colors */
.trending-products-modern.light-mode::before {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.08) 0%, rgba(147, 51, 234, 0.04) 40%, transparent 70%);
    border: 1px solid rgba(147, 51, 234, 0.1);
}

.trending-products-modern.light-mode::after {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, rgba(168, 85, 247, 0.03) 35%, transparent 70%);
    border: 1px solid rgba(168, 85, 247, 0.08);
}

/* Light mode section header */
.trending-products-modern.light-mode .section-badge {
    background: rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.3);
    color: #7c3aed;
    backdrop-filter: none;
}

.trending-products-modern.light-mode .section-title-modern {
    color: #111827;
}

.trending-products-modern.light-mode .section-description-modern {
    color: #6b7280;
}

/* Light mode toggle button */
.trending-products-modern.light-mode .theme-toggle-btn {
    background: rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.3);
}

/* Light mode cards */
.trending-products-modern.light-mode .product-card-modern {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(147, 51, 234, 0.15);
    box-shadow: 0 4px 20px rgba(147, 51, 234, 0.1);
}

.trending-products-modern.light-mode .product-card-modern:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(147, 51, 234, 0.3);
    box-shadow: 0 12px 40px rgba(147, 51, 234, 0.2);
}

/* Light mode image */
.trending-products-modern.light-mode .product-image-modern {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.trending-products-modern.light-mode .product-image-modern::after {
    background: linear-gradient(to top, rgba(147, 51, 234, 0.1), transparent);
}

/* Light mode content */
.trending-products-modern.light-mode .product-content-modern {
    background: rgba(249, 250, 251, 0.5);
}

/* Light mode category */
.trending-products-modern.light-mode .product-category-modern {
    background: rgba(147, 51, 234, 0.1);
    border-color: rgba(147, 51, 234, 0.2);
    color: #7c3aed;
    box-shadow: none;
}

/* Light mode title */
.trending-products-modern.light-mode .product-title-modern {
    color: #111827;
    text-shadow: none;
}

/* Light mode dropdown */
.trending-products-modern.light-mode .plan-dropdown-mobile {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23374151' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

.trending-products-modern.light-mode .plan-dropdown-mobile:hover {
    background: #ffffff !important;
    border-color: #9333ea !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.15) !important;
}

.trending-products-modern.light-mode .plan-dropdown-mobile:focus {
    background: #ffffff !important;
    border-color: #9333ea !important;
}

/* Light mode pricing */
.trending-products-modern.light-mode .price-current-modern {
    color: #111827;
    text-shadow: none;
}

.trending-products-modern.light-mode .price-original-modern {
    color: #9ca3af;
}

.trending-products-modern.light-mode .price-discount-modern {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
    border-color: #86efac;
}

/* Light mode buttons */
.trending-products-modern.light-mode .btn-add-cart-modern {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    border-color: #9333ea;
}

.trending-products-modern.light-mode .btn-add-cart-modern:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: #7c3aed;
}

.trending-products-modern.light-mode .btn-whatsapp-modern {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-color: #25D366;
}

.trending-products-modern.light-mode .btn-whatsapp-modern:hover {
    background: linear-gradient(135deg, #1faa52, #0f7a5f);
    border-color: #1faa52;
}

/* Light mode divider */
.trending-products-modern.light-mode .product-price-modern::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(147, 51, 234, 0.3) 50%,
        transparent 100%);
}

.trending-products-modern.light-mode .product-price-modern::after {
    background: linear-gradient(135deg, #9333ea, #a855f7);
    box-shadow:
        -20px 0 0 -1px rgba(147, 51, 234, 0.3),
        20px 0 0 -1px rgba(147, 51, 234, 0.3),
        -40px 0 0 -2px rgba(147, 51, 234, 0.15),
        40px 0 0 -2px rgba(147, 51, 234, 0.15);
}
