/**
 * Rankella Products - Custom Styles
 * Modern, Premium Design System
 */

/* ========================================
   CSS Variables & Root Styles
======================================== */
:root {
    --rkl-primary: #6366f1;
    --rkl-primary-dark: #4f46e5;
    --rkl-secondary: #8b5cf6;
    --rkl-accent: #06b6d4;
    --rkl-gold: #f59e0b;
    --rkl-success: #10b981;
    --rkl-dark: #0f172a;
    --rkl-dark-soft: #1e293b;
    --rkl-gray: #64748b;
    --rkl-light: #f1f5f9;
    --rkl-white: #ffffff;
    
    --rkl-gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --rkl-gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --rkl-gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --rkl-gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    
    --rkl-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --rkl-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --rkl-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --rkl-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --rkl-shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    --rkl-radius-sm: 8px;
    --rkl-radius: 12px;
    --rkl-radius-lg: 20px;
    --rkl-radius-xl: 28px;
    
    --rkl-font-display: 'Clash Display', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --rkl-font-body: 'Kumbh Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   Base & Reset
======================================== */
.rankella-shop-wrapper {
    font-family: var(--rkl-font-body);
    color: var(--rkl-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.rankella-shop-wrapper * {
    box-sizing: border-box;
}

.rankella-shop-wrapper .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Hero Section
======================================== */
.rankella-shop-hero {
    background: var(--rkl-gradient-hero);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.rankella-shop-hero .hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.rankella-shop-hero .hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.rankella-shop-hero .hero-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.rankella-shop-hero h1 {
    font-family: var(--rkl-font-display);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    color: var(--rkl-white);
    margin: 0 0 20px;
    line-height: 1.1;
}

.rankella-shop-hero .gradient-text {
    background: var(--rkl-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rankella-shop-hero .hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* Custom Price Banner */
.custom-price-banner {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    border: 2px solid var(--rkl-gold);
    padding: 16px 32px;
    border-radius: var(--rkl-radius-lg);
    margin-top: 20px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.5); }
}

.custom-price-banner .price-icon {
    font-size: 32px;
}

.custom-price-banner .price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.custom-price-banner .price-label {
    font-size: 12px;
    color: #fcd34d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.custom-price-banner .price-amount {
    font-family: var(--rkl-font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--rkl-gold);
}

/* Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.floating-element.fe-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.floating-element.fe-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    bottom: -50px;
    left: 10%;
    animation-delay: 2s;
}

.floating-element.fe-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    top: 30%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* ========================================
   Products Section
======================================== */
.rankella-products-section {
    padding: 80px 0;
    background: var(--rkl-light);
    position: relative;
}

.rankella-products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: var(--rkl-gradient-hero);
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 100%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    position: relative;
    z-index: 2;
}

/* ========================================
   Product Card
======================================== */
.product-card {
    background: var(--rkl-white);
    border-radius: var(--rkl-radius-lg);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--rkl-shadow-lg);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--rkl-shadow-xl), var(--rkl-shadow-glow);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--rkl-gradient-primary);
    transition: height 0.3s ease;
}

.product-card.accent-teal::before {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.product-card.accent-purple::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.product-card.accent-gold::before {
    background: var(--rkl-gradient-gold);
}

.product-card:hover::before {
    height: 6px;
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.1) 0%, transparent 50%);
}

.product-card:hover .card-glow {
    opacity: 1;
}

/* Product Image */
.product-image-wrapper {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--rkl-dark-soft);
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-btn {
    background: var(--rkl-white);
    color: var(--rkl-dark);
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-card:hover .view-btn {
    transform: translateY(0);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--rkl-gradient-gold);
    color: var(--rkl-white);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.product-badge.popular {
    background: var(--rkl-gradient-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Product Content */
.product-content {
    padding: 28px;
}

.product-title {
    font-family: var(--rkl-font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--rkl-dark);
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 14px;
    color: var(--rkl-gray);
    margin: 0 0 20px;
    line-height: 1.6;
}

/* Product Features */
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.product-features .feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--rkl-gray);
    background: var(--rkl-light);
    padding: 6px 12px;
    border-radius: 100px;
}

.product-features .feature-icon {
    color: var(--rkl-success);
    font-weight: bold;
}

/* Product Footer */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--rkl-light);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price .original-price {
    font-size: 14px;
    color: var(--rkl-gray);
    text-decoration: line-through;
}

.product-price .current-price {
    font-family: var(--rkl-font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--rkl-dark);
}

.product-price .price-suffix {
    font-size: 12px;
    color: var(--rkl-gray);
    font-weight: 500;
}

/* Buy Now Button */
.buy-now-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--rkl-gradient-primary);
    color: var(--rkl-white);
    border: none;
    padding: 14px 24px;
    border-radius: 100px;
    font-family: var(--rkl-font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.buy-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.buy-now-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.buy-now-btn:hover::before {
    opacity: 1;
}

.buy-now-btn .btn-icon {
    transition: transform 0.3s ease;
}

.buy-now-btn:hover .btn-icon {
    transform: translateX(4px);
}

.accent-gold .buy-now-btn {
    background: var(--rkl-gradient-gold);
}

.accent-gold .buy-now-btn:hover {
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* ========================================
   Trust Section
======================================== */
.trust-section {
    background: var(--rkl-white);
    padding: 60px 0;
    border-top: 1px solid var(--rkl-light);
    border-bottom: 1px solid var(--rkl-light);
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--rkl-gray);
    font-size: 14px;
    font-weight: 500;
}

.trust-badge .trust-icon {
    font-size: 24px;
}

/* ========================================
   FAQ Section
======================================== */
.faq-section {
    background: var(--rkl-gradient-dark);
    padding: 80px 0;
}

.faq-section .section-title {
    font-family: var(--rkl-font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--rkl-white);
    text-align: center;
    margin: 0 0 48px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--rkl-radius);
    padding: 24px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.faq-item h4 {
    font-family: var(--rkl-font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--rkl-white);
    margin: 0 0 12px;
}

.faq-item p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   Loading Overlay
======================================== */
.rankella-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loading-spinner {
    text-align: center;
    color: var(--rkl-white);
}

.loading-spinner .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--rkl-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

/* ========================================
   WooCommerce Checkout Customization
======================================== */
.woocommerce-checkout {
    background: var(--rkl-light);
}

.woocommerce-checkout .woocommerce {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.woocommerce-checkout h3,
.woocommerce-checkout .woocommerce-billing-fields h3 {
    font-family: var(--rkl-font-display);
    font-size: 24px;
    color: var(--rkl-dark);
}

.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper select {
    border: 2px solid var(--rkl-light);
    border-radius: var(--rkl-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.woocommerce-checkout .woocommerce-input-wrapper input:focus,
.woocommerce-checkout .woocommerce-input-wrapper select:focus {
    border-color: var(--rkl-primary);
    outline: none;
}

.woocommerce-checkout #place_order {
    background: var(--rkl-gradient-primary) !important;
    border: none !important;
    border-radius: 100px !important;
    padding: 18px 40px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
}

.woocommerce-checkout #place_order:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .rankella-shop-hero {
        padding: 60px 0 80px;
    }
    
    .rankella-products-section {
        padding: 60px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .product-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-price {
        margin-bottom: 16px;
    }
    
    .buy-now-btn {
        justify-content: center;
    }
    
    .trust-badges {
        gap: 24px;
    }
    
    .trust-badge {
        flex: 0 0 calc(50% - 12px);
        justify-content: center;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .custom-price-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .custom-price-banner .price-info {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .rankella-shop-wrapper .container {
        padding: 0 16px;
    }
    
    .product-content {
        padding: 20px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-price .current-price {
        font-size: 24px;
    }
    
    .trust-badge {
        flex: 0 0 100%;
    }
}

/* ========================================
   Animation Classes
======================================== */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Initialize animations on scroll */
.product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Single Product Payment Page
======================================== */
.rankella-single-payment {
    min-height: 100vh;
    background: var(--rkl-gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.rankella-single-payment .container {
    max-width: 500px;
    width: 100%;
}

.payment-card {
    background: var(--rkl-white);
    border-radius: var(--rkl-radius-xl);
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.payment-badge {
    display: inline-block;
    background: var(--rkl-light);
    color: var(--rkl-success);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.payment-card h1 {
    font-family: var(--rkl-font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--rkl-dark);
    margin: 0 0 12px;
    line-height: 1.3;
}

.payment-desc {
    color: var(--rkl-gray);
    font-size: 14px;
    margin: 0 0 30px;
    line-height: 1.6;
}

.payment-price-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: var(--rkl-radius-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.payment-price-box .price-label {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.payment-price-box .price-amount {
    font-family: var(--rkl-font-display);
    font-size: 56px;
    font-weight: 700;
    color: var(--rkl-white);
    line-height: 1;
}

.payment-price-box .price-currency {
    display: block;
    color: #64748b;
    font-size: 14px;
    margin-top: 8px;
}

.payment-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
    text-align: left;
}

.payment-features .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--rkl-dark);
}

.payment-features .feature-item span {
    color: var(--rkl-success);
    font-weight: bold;
}

.payment-btn {
    width: 100%;
    background: var(--rkl-gradient-primary);
    color: var(--rkl-white);
    border: none;
    padding: 18px 32px;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.payment-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.payment-trust {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--rkl-light);
}

.payment-trust .trust-item {
    font-size: 12px;
    color: var(--rkl-gray);
}

.payment-footer {
    margin-top: 20px;
}

.payment-footer p {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

/* No Product Found */
.rankella-no-product {
    min-height: 100vh;
    background: var(--rkl-gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.no-product-card {
    background: var(--rkl-white);
    padding: 60px 40px;
    border-radius: var(--rkl-radius-xl);
    text-align: center;
    max-width: 400px;
}

.no-product-card h2 {
    color: var(--rkl-dark);
    margin: 0 0 12px;
}

.no-product-card p {
    color: var(--rkl-gray);
    margin: 0 0 24px;
}

.back-btn {
    display: inline-block;
    background: var(--rkl-gradient-primary);
    color: var(--rkl-white);
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
}

/* Responsive Payment Page */
@media (max-width: 480px) {
    .payment-card {
        padding: 30px 20px;
    }
    
    .payment-price-box .price-amount {
        font-size: 44px;
    }
    
    .payment-features {
        grid-template-columns: 1fr;
    }
    
    .payment-trust {
        flex-direction: column;
        gap: 8px;
    }
}
