@import 'animations.css';

:root {
    /* Core Colors (Premium Palette) */
    --primary: #4318FF;
    --primary-dark: #2B00D4;
    --primary-light: #7E5EFF;
    --secondary: #1B2559;
    --accent: #FF5B5B;
    --success: #05CD99;
    --info: #33A1FD;
    --warning: #FFB547;
    --error: #E31A1A;
    --light: #F4F7FE;
    --dark: #0B1437;
    --white: #FFFFFF;

    /* Shadows (App-like Floor Elevation) */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(67, 24, 255, 0.15); /* Primary hue shadow */
    --shadow-nav: 0 -10px 30px rgba(0, 0, 0, 0.05);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4318FF 0%, #7E5EFF 100%);
    --gradient-secondary: linear-gradient(135deg, #1B2559 0%, #0B1437 100%);
    --gradient-accent: linear-gradient(135deg, #FF5B5B 0%, #FF8F8F 100%);
    --gradient-glass: linear-gradient(120deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    /* Spacing */
    --spacing-unit: 8px;
}

/* App-like Global Polish */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

body {
    overscroll-behavior-y: auto;
}

/* Fluid Typography Scale */
:root {
    --text-xs: clamp(0.7rem, 0.6rem + 0.5vw, 0.75rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.5vw, 0.875rem);
    --text-base: clamp(0.9rem, 0.85rem + 0.5vw, 1rem);
    --text-lg: clamp(1rem, 0.95rem + 0.5vw, 1.125rem);
    --text-xl: clamp(1.2rem, 1.1rem + 1vw, 1.5rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--secondary);
    line-height: 1.6;
    background-color: var(--light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

.product-card img {
    transition: transform 0.5s ease;
}

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

.product-card .product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 20px;
}

.product-card:hover .product-overlay {
    transform: translateY(0);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8, #1E40AF);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #D97706, #B45309);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Badge Styles */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-secondary {
    background: #F1F5F9;
    color: #475569;
}

.badge-primary {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-dark {
    background: #1F2937;
    color: #F9FAFB;
}

/* Sale Badge */
.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #EF4444;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10B981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating i {
    font-size: 16px;
}

/* Price Display */
.price-regular {
    text-decoration: line-through;
    color: #9CA3AF;
    font-size: 14px;
}

.price-sale {
    color: #EF4444;
    font-size: 24px;
    font-weight: 700;
}

.price-normal {
    color: var(--secondary);
    font-size: 24px;
    font-weight: 700;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    padding: 60px;
}

.hero-content h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Image Hover Zoom */
.img-zoom-container {
    overflow: hidden;
    border-radius: 8px;
}

.img-zoom {
    transition: transform 0.5s ease;
}

.img-zoom-container:hover .img-zoom {
    transform: scale(1.15);
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Flash Message */
.flash-message {
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Category Card */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    color: white;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    text-decoration: none;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination span.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1D4ED8;
}

/* Input Focus Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.checkout-step {
    flex: 1;
    text-align: center;
    padding: 20px;
    position: relative;
}

.checkout-step::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #E5E7EB;
    z-index: -1;
}

.checkout-step:last-child::before {
    display: none;
}

.checkout-step.active .step-number {
    background: var(--primary);
    color: white;
}

.checkout-step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #E5E7EB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.5s ease;
}