/*
 * Modern E-commerce Theme 2026
 * A contemporary, clean design with smooth animations
 */

/* ========================================
   CSS Variables - Modern Color Palette
   ======================================== */
:root {
    /* Primary Colors */
    --modern-primary: #2563eb;
    --modern-primary-dark: #1d4ed8;
    --modern-primary-light: #3b82f6;
    --modern-primary-soft: rgba(37, 99, 235, 0.1);
    
    /* Accent Colors */
    --modern-accent: #f59e0b;
    --modern-accent-dark: #d97706;
    --modern-accent-light: #fbbf24;
    
    /* Neutral Colors */
    --modern-dark: #0f172a;
    --modern-gray-900: #1e293b;
    --modern-gray-800: #334155;
    --modern-gray-700: #475569;
    --modern-gray-600: #64748b;
    --modern-gray-500: #94a3b8;
    --modern-gray-400: #cbd5e1;
    --modern-gray-300: #e2e8f0;
    --modern-gray-200: #f1f5f9;
    --modern-gray-100: #f8fafc;
    --modern-white: #ffffff;
    
    /* Semantic Colors */
    --modern-success: #10b981;
    --modern-warning: #f59e0b;
    --modern-error: #ef4444;
    --modern-info: #06b6d4;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 16px rgba(0, 0, 0, 0.08), 0 16px 48px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   Base Styles
   ======================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--modern-gray-100);
    color: var(--modern-gray-800);
    line-height: 1.6;
}

/* ========================================
   Modern Product Card Styles
   ======================================== */
.modern-product-card {
    background: var(--modern-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    position: relative;
    border: 1px solid var(--modern-gray-200);
}

.modern-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--modern-gray-300);
}

.modern-product-card .product-card-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--modern-gray-100) 0%, var(--modern-white) 100%);
    height: 220px !important;
}

.modern-product-card .product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
    padding: 16px;
}

.modern-product-card:hover .product-card-image img {
    transform: scale(1.08);
}

/* Discount Badge */
.modern-product-card .discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--modern-error) 0%, #dc2626 100%);
    color: var(--modern-white);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 10;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Action Icons */
.modern-product-card .aiz-p-hov-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all var(--transition-base);
    z-index: 10;
}

.modern-product-card:hover .aiz-p-hov-icon {
    opacity: 1;
    transform: translateX(0);
}

.modern-product-card .aiz-p-hov-icon a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--modern-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    border: 1px solid var(--modern-gray-200);
}

.modern-product-card .aiz-p-hov-icon a:hover {
    background: var(--modern-primary);
    border-color: var(--modern-primary);
    transform: scale(1.1);
}

.modern-product-card .aiz-p-hov-icon a:hover svg path {
    stroke: var(--modern-white) !important;
    fill: rgba(255, 255, 255, 0.2) !important;
}

/* Add to Cart Button */
.modern-product-card .cart-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--modern-primary) 0%, var(--modern-primary-dark) 100%);
    color: var(--modern-white);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    transform: translateY(100%);
    transition: all var(--transition-base);
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
    height: auto !important;
}

.modern-product-card:hover .cart-btn {
    transform: translateY(0);
}

.modern-product-card .cart-btn:hover {
    background: linear-gradient(135deg, var(--modern-primary-dark) 0%, #1e40af 100%);
}

.modern-product-card .cart-btn-text-add {
    display: none;
}

/* Product Info */
.modern-product-card .p-2,
.modern-product-card .p-md-3 {
    padding: 20px !important;
}

.modern-product-card h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--modern-gray-800);
    line-height: 1.5;
    margin-bottom: 12px;
    min-height: 45px;
    text-align: right !important;
}

.modern-product-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.modern-product-card h3 a:hover {
    color: var(--modern-primary);
}

/* Price Styling */
.modern-product-card .product-card-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end !important;
    gap: 4px;
    padding-top: 12px !important;
    border-top: 1px solid var(--modern-gray-200);
    height: auto !important;
}

.modern-product-card .product-card-price .text-primary,
.modern-product-card .fw-700.text-primary {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--modern-primary) !important;
    letter-spacing: -0.5px;
}

.modern-product-card .product-card-price del,
.modern-product-card del.text-secondary {
    font-size: 14px !important;
    color: var(--modern-gray-500) !important;
    text-decoration: line-through;
}

/* Rating */
.modern-product-card .rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
}

.modern-product-card .rating svg,
.modern-product-card .rating i {
    color: var(--modern-accent);
    font-size: 14px;
}

/* ========================================
   Product Card Style 2 (Horizontal)
   ======================================== */
.modern-product-card-style-2 {
    display: flex;
    flex-direction: row;
    padding: 16px;
    gap: 16px;
}

.modern-product-card-style-2 .product-card-image {
    width: 120px;
    min-width: 120px;
    height: 120px !important;
    border-radius: var(--radius-md);
}

/* ========================================
   Product Card Style 3 (Compact)
   ======================================== */
.modern-product-card-style-3 {
    border-radius: var(--radius-md);
}

.modern-product-card-style-3 .product-card-image {
    height: 180px !important;
}

/* ========================================
   Section Headers
   ======================================== */
.modern-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--modern-gray-200);
}

.modern-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--modern-dark);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--modern-primary) 0%, var(--modern-accent) 100%);
    border-radius: var(--radius-full);
}

.modern-section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--modern-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--modern-primary-soft);
    transition: all var(--transition-fast);
}

.modern-section-link:hover {
    background: var(--modern-primary);
    color: var(--modern-white);
    transform: translateX(-4px);
}

/* ========================================
   Modern Category Cards
   ======================================== */
.modern-category-card {
    background: var(--modern-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--modern-gray-200);
    cursor: pointer;
}

.modern-category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--modern-primary-soft);
}

.modern-category-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
    transition: transform var(--transition-base);
}

.modern-category-card:hover img {
    transform: scale(1.1);
}

.modern-category-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--modern-gray-800);
    margin: 0;
}

/* ========================================
   Modern Buttons
   ======================================== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-modern-primary {
    background: linear-gradient(135deg, var(--modern-primary) 0%, var(--modern-primary-dark) 100%);
    color: var(--modern-white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    color: var(--modern-white);
}

.btn-modern-outline {
    background: transparent;
    color: var(--modern-primary);
    border: 2px solid var(--modern-primary);
}

.btn-modern-outline:hover {
    background: var(--modern-primary);
    color: var(--modern-white);
}

/* ========================================
   Modern Banner Styles
   ======================================== */
.modern-banner {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.modern-banner:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.modern-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.modern-banner:hover img {
    transform: scale(1.05);
}

/* ========================================
   Modern Footer
   ======================================== */
.modern-footer {
    background: linear-gradient(180deg, var(--modern-gray-900) 0%, var(--modern-dark) 100%);
    color: var(--modern-gray-400);
    padding: 80px 0 40px;
}

.modern-footer h5 {
    color: var(--modern-white);
    font-weight: 700;
    margin-bottom: 24px;
    font-size: 18px;
}

.modern-footer a {
    color: var(--modern-gray-400);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
    padding: 6px 0;
}

.modern-footer a:hover {
    color: var(--modern-white);
    transform: translateX(4px);
}

/* ========================================
   Modern Form Elements
   ======================================== */
.modern-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--modern-gray-300);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all var(--transition-fast);
    background: var(--modern-white);
}

.modern-input:focus {
    outline: none;
    border-color: var(--modern-primary);
    box-shadow: 0 0 0 4px var(--modern-primary-soft);
}

.modern-input::placeholder {
    color: var(--modern-gray-500);
}

/* ========================================
   Loading Animations
   ======================================== */
.modern-skeleton {
    background: linear-gradient(90deg, var(--modern-gray-200) 25%, var(--modern-gray-100) 50%, var(--modern-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Modern Swiper/Carousel Styles
   ======================================== */
.modern-swiper .swiper-button-next,
.modern-swiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    background: var(--modern-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.modern-swiper .swiper-button-next::after,
.modern-swiper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 700;
    color: var(--modern-gray-800);
}

.modern-swiper .swiper-button-next:hover,
.modern-swiper .swiper-button-prev:hover {
    background: var(--modern-primary);
}

.modern-swiper .swiper-button-next:hover::after,
.modern-swiper .swiper-button-prev:hover::after {
    color: var(--modern-white);
}

/* ========================================
   Modern Tabs
   ======================================== */
.modern-tabs {
    display: flex;
    gap: 8px;
    background: var(--modern-gray-100);
    padding: 6px;
    border-radius: var(--radius-full);
    margin-bottom: 32px;
}

.modern-tab {
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    color: var(--modern-gray-600);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modern-tab:hover {
    color: var(--modern-gray-800);
}

.modern-tab.active {
    background: var(--modern-white);
    color: var(--modern-primary);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Flash Deal Section
   ======================================== */
.modern-flash-deal {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.modern-flash-deal::before {
    content: '🔥';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 120px;
    opacity: 0.1;
}

.modern-countdown {
    display: flex;
    gap: 16px;
    align-items: center;
}

.modern-countdown-item {
    background: var(--modern-white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 80px;
    box-shadow: var(--shadow-md);
}

.modern-countdown-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--modern-dark);
    line-height: 1;
}

.modern-countdown-label {
    font-size: 12px;
    color: var(--modern-gray-600);
    margin-top: 4px;
}

/* ========================================
   Cart & Wishlist Badges
   ======================================== */
.modern-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: var(--modern-error);
    color: var(--modern-white);
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    animation: badge-bounce 2s infinite;
}

@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 991px) {
    .modern-product-card .product-card-image {
        height: 180px !important;
    }
    
    .modern-section-title {
        font-size: 22px;
    }
    
    .modern-countdown-item {
        padding: 12px 16px;
        min-width: 60px;
    }
    
    .modern-countdown-number {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .modern-product-card .product-card-image {
        height: 160px !important;
    }
    
    .modern-product-card .p-2,
    .modern-product-card .p-md-3 {
        padding: 14px !important;
    }
    
    .modern-product-card h3 {
        font-size: 13px;
        min-height: 40px;
    }
    
    .modern-product-card .product-card-price .text-primary {
        font-size: 16px !important;
    }
    
    .modern-section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .modern-flash-deal {
        padding: 24px;
    }
    
    .modern-countdown {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 575px) {
    .modern-product-card .aiz-p-hov-icon {
        opacity: 1;
        transform: translateX(0);
    }
    
    .modern-product-card .cart-btn {
        transform: translateY(0);
        position: relative;
        margin-top: 12px;
        border-radius: var(--radius-md);
    }
    
    .modern-product-card .aiz-p-hov-icon a {
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   RTL Support
   ======================================== */
[dir="rtl"] .modern-product-card .discount-badge {
    left: auto;
    right: 12px;
}

[dir="rtl"] .modern-product-card .aiz-p-hov-icon {
    right: auto;
    left: 12px;
    transform: translateX(-10px);
}

[dir="rtl"] .modern-product-card:hover .aiz-p-hov-icon {
    transform: translateX(0);
}

[dir="rtl"] .modern-section-title::before {
    order: 1;
}

[dir="rtl"] .modern-section-link:hover {
    transform: translateX(4px);
}

[dir="rtl"] .modern-footer a:hover {
    transform: translateX(-4px);
}

/* ========================================
   Utility Classes
   ======================================== */
.gap-modern-sm { gap: 12px; }
.gap-modern-md { gap: 20px; }
.gap-modern-lg { gap: 32px; }

.rounded-modern-sm { border-radius: var(--radius-sm); }
.rounded-modern-md { border-radius: var(--radius-md); }
.rounded-modern-lg { border-radius: var(--radius-lg); }
.rounded-modern-xl { border-radius: var(--radius-xl); }

.shadow-modern-sm { box-shadow: var(--shadow-sm); }
.shadow-modern-md { box-shadow: var(--shadow-md); }
.shadow-modern-lg { box-shadow: var(--shadow-lg); }
.shadow-modern-card { box-shadow: var(--shadow-card); }

.bg-modern-primary { background-color: var(--modern-primary); }
.bg-modern-soft { background-color: var(--modern-primary-soft); }
.bg-modern-gray-100 { background-color: var(--modern-gray-100); }
.bg-modern-white { background-color: var(--modern-white); }

.text-modern-primary { color: var(--modern-primary); }
.text-modern-dark { color: var(--modern-dark); }
.text-modern-gray { color: var(--modern-gray-600); }

/* Animation Utilities */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}
