/* ============================================
   E-Commerce Premium Stylesheet
   ============================================ */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .fade-in, .fade-in-page, .section-stagger, .product-card-3d { opacity: 1 !important; transform: none !important; }
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--gray-50);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    z-index: 1000;
    background: linear-gradient(180deg, rgba(15,23,42,.68), rgba(15,23,42,.18), transparent) !important;
}

.navbar-scrolled {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
}

.navbar:not(.navbar-scrolled) .nav-link {
    color: #fff !important;
    text-shadow: 0 1px 12px rgba(0,0,0,.45);
}

.navbar:not(.navbar-scrolled) .nav-link:hover,
.navbar:not(.navbar-scrolled) .nav-link.active {
    color: #fff !important;
}

.navbar:not(.navbar-scrolled) .nav-link::after {
    background: #fff;
    box-shadow: 0 0 12px rgba(255,255,255,.65);
}

.navbar-scrolled .nav-link {
    color: var(--secondary) !important;
    text-shadow: none;
}

@media (min-width: 992px) {
    .navbar:not(.navbar-scrolled) .navbar-nav {
        padding: .3rem .55rem;
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 999px;
        background: rgba(15,23,42,.24);
        backdrop-filter: blur(12px);
        box-shadow: 0 10px 30px rgba(2,6,23,.14);
    }

    .navbar .nav-link {
        border-radius: 999px;
    }

    .navbar:not(.navbar-scrolled) .nav-link:hover {
        background: rgba(255,255,255,.1);
    }
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: #000 !important;
    letter-spacing: -0.5px;
    padding: 0;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 36px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: #000 !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link:hover {
    color: #000 !important;
}

.nav-icons .btn {
    /* width: min-content; */
    width: 100%;
    gap: 0.5rem;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: #000;
    transition: var(--transition);
    position: relative;
}

.nav-icons .btn:hover {
    /* background: var(--primary); */
    color: var(--blue);
    /* border-color: var(--primary); */
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

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

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

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    animation: fadeInUp 1s ease;
}

.hero-content .badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(37,99,235,0.2);
    color: var(--primary-light);
    border: 1px solid rgba(37,99,235,0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-content .btn-primary {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--primary);
    border: none;
    transition: var(--transition);
    text-transform: none;
    letter-spacing: 0.5px;
}

.hero-content .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(37,99,235,0.3);
}

.hero-content .btn-outline-light {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: var(--transition);
}

.hero-content .btn-outline-light:hover {
    background: var(--white);
    color: var(--secondary);
    border-color: var(--white);
    transform: translateY(-3px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.hero-arrow:hover {
    background: var(--white);
    color: var(--secondary);
}

.hero-arrow.prev { left: 30px; }
.hero-arrow.next { right: 30px; }

.hero-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background: var(--white);
    border-color: var(--white);
    transform: scale(1.2);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Category Cards */
.category-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    height: 250px;
    transition: var(--transition);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.category-card:hover::before {
    transform: scale(1.1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.category-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    z-index: 1;
}

.category-card .overlay h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.category-card .overlay p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Product Cards */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: var(--gray-100);
}

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

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

.product-card .product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-card .product-actions .btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: var(--transition);
}

.product-card .product-actions .btn:hover {
    background: var(--primary);
    color: var(--white);
}

.product-card .product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .product-badge.sale {
    background: var(--danger);
    color: white;
}

.product-card .product-badge.new {
    background: var(--success);
    color: white;
}

.product-card .product-body {
    padding: 1.25rem;
}

.product-card .product-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.product-card .product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.product-card .product-price .original {
    font-size: 0.9rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.product-card .product-rating .stars {
    color: var(--accent);
    font-size: 0.85rem;
}

.product-card .product-rating .count {
    color: var(--gray-400);
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.product-card .add-to-cart-btn {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius);
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.product-card .add-to-cart-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* Featured Section */
.featured-section {
    background: var(--white);
    position: relative;
}

.featured-product {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 3rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.featured-product .content {
    flex: 1;
}

.featured-product .content .tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-product .content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.featured-product .content p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.featured-product .content .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.featured-product .image {
    flex: 0 0 40%;
    text-align: center;
}

.featured-product .image img {
    max-width: 100%;
    height: auto;
    transform: perspective(800px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.featured-product .image img:hover {
    transform: perspective(800px) rotateY(0deg);
}

/* About/Newsletter */
.newsletter-section {
    background: var(--secondary);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
}

.newsletter-section h2 {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 800;
}

.newsletter-section p {
    color: rgba(255,255,255,0.7);
}

.newsletter-section .input-group {
    max-width: 500px;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
}

.newsletter-section .input-group input {
    border: none;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
}

.newsletter-section .input-group button {
    padding: 0.9rem 2rem;
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-section .input-group button:hover {
    background: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 0;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer a:hover {
    color: var(--white);
    transform: translateX(3px);
}

.footer .social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Shop Page */
.shop-header {
    background: var(--secondary);
    padding: 8rem 0 3rem;
    text-align: center;
    color: var(--white);
}

.shop-header h1 {
    color: var(--white);
    font-size: 3rem;
    font-weight: 800;
}

.shop-header .breadcrumb {
    justify-content: center;
    background: none;
}

.shop-header .breadcrumb-item,
.shop-header .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
}

.shop-header .breadcrumb-item.active {
    color: var(--white);
}

.shop-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 100px;
}

.shop-sidebar .filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.shop-sidebar .filter-section:last-child {
    border: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.shop-sidebar .filter-section h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-sidebar .form-check {
    margin-bottom: 0.5rem;
}

.shop-sidebar .form-check-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
}

.shop-sort-bar {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Product Details */
.product-details-section {
    padding-top: 7rem;
}

.product-gallery {
    position: relative;
}

.product-gallery .main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    cursor: zoom-in;
}

.product-gallery .thumbnails {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-gallery .thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-gallery .thumbnails img:hover,
.product-gallery .thumbnails img.active {
    border-color: var(--primary);
}

.product-info h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.product-info .rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-info .rating .stars {
    color: var(--accent);
}

.product-info .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-info .price .original {
    font-size: 1.2rem;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: 0.75rem;
    font-weight: 400;
}

.product-info .description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.product-info .quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.product-info .quantity-selector button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    background: var(--white);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.product-info .quantity-selector button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.product-info .quantity-selector input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.5rem;
    font-weight: 600;
}

/* Cart Page */
.cart-section {
    padding-top: 7rem;
}

.cart-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.cart-item:hover {
    box-shadow: var(--shadow-md);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
}

.cart-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 100px;
}

.cart-summary h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.cart-summary .summary-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    border-top: 2px solid var(--gray-200);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* Payment Methods */
.payment-method-option {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method-option:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.payment-method-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-method-option .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Checkout */
.checkout-section {
    padding-top: 7rem;
}

.checkout-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.checkout-form .form-control {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

.checkout-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.order-summary {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

/* Auth Pages */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .auth-header h3 {
    font-weight: 800;
    font-size: 1.75rem;
}

.auth-card .auth-header p {
    color: var(--gray-500);
}

.auth-card .btn-primary {
    width: 100%;
    padding: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius);
}

/* Dashboard */
.dashboard-section {
    padding-top: 7rem;
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    height: 100%;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.dashboard-card .icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.dashboard-card .icon.blue { background: var(--primary-light); color: var(--primary); }
.dashboard-card .icon.green { background: #d1fae5; color: var(--success); }
.dashboard-card .icon.yellow { background: #fef3c7; color: var(--accent); }
.dashboard-card .icon.red { background: #fee2e2; color: var(--danger); }

.dashboard-card .number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.dashboard-card .label {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ========== New User Dashboard Styles ========== */

.dashboard-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
    padding: 8rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
}

.dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.dashboard-body {
    background: var(--gray-50);
    min-height: 60vh;
}

/* Profile Summary Card */
.profile-summary-card {
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    position: relative;
}

.profile-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

/* Quick Links */
.quick-link-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.quick-link-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
    color: var(--primary);
    transform: translateX(3px);
}

.quick-link-btn i:first-child {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.quick-link-btn.text-danger i:first-child {
    color: var(--danger);
}

.quick-link-btn span {
    font-weight: 500;
}

/* Modern Stat Cards */
.stat-card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card-modern .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.stat-card-modern .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.stat-card-modern .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

.blue-gradient .stat-icon { background: var(--primary-light); color: var(--primary); }
.blue-gradient .stat-number { color: var(--primary); }

.orange-gradient .stat-icon { background: #fef3c7; color: #d97706; }
.orange-gradient .stat-number { color: #d97706; }

.green-gradient .stat-icon { background: #d1fae5; color: #059669; }
.green-gradient .stat-number { color: #059669; }

.pink-gradient .stat-icon { background: #fce7f3; color: #db2777; }
.pink-gradient .stat-number { color: #db2777; }

/* Profile Info Items */
.info-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.info-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.05);
}

.info-item .info-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-item .info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Recent Orders */
.recent-order-item {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
    border-radius: var(--radius);
}

.recent-order-item:last-child {
    border-bottom: none;
}

.recent-order-item:hover {
    background: var(--gray-50);
}

/* Profile card header tabs */
.card-header-tabs .nav-link {
    border: none;
    color: var(--gray-500);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: var(--transition);
}

.card-header-tabs .nav-link:hover {
    color: var(--primary);
    background: transparent;
}

.card-header-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border-bottom: 3px solid var(--primary);
}

/* Order History */
.order-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow-md);
}

.order-card .status-badge {
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #dbeafe; color: #1e40af; }
.status-shipped { background: #d1fae5; color: #065f46; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* Contact Page */
.contact-section {
    padding-top: 7rem;
}

.contact-info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
    text-align: center;
    height: 100%;
    transition: var(--transition);
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-info-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* About Page */
.about-section {
    padding-top: 7rem;
}

.about-hero {
    background: var(--secondary);
    padding: 6rem 0;
    color: var(--white);
    text-align: center;
}

.about-hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    font-weight: 800;
}

.value-card {
    text-align: center;
    padding: 2rem;
}

.value-card .icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-custom {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary);
    margin-bottom: 0.75rem;
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

.toast-custom.success { border-left-color: var(--success); }
.toast-custom.error { border-left-color: var(--danger); }
.toast-custom.warning { border-left-color: var(--warning); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ── Responsive Typography ── */
h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h2, .section-title { font-size: clamp(1.4rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
.hero-content h1 { font-size: clamp(1.75rem, 5vw, 4rem); }
.shop-header h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
.about-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.featured-product .content h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
.dashboard-header h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
.footer h5 { font-size: clamp(1rem, 2.5vw, 1.1rem); }
body { font-size: clamp(14px, 1vw, 16px); }

/* ── Responsive Hero ── */
.hero-section { min-height: 100vh; min-height: 100dvh; }
.hero-content { max-width: 650px; }
.hero-content p { font-size: clamp(1rem, 2vw, 1.25rem); }

/* ── Feature product responsive ── */
.featured-product { padding: clamp(1.5rem, 3vw, 3rem); }
.featured-product .content h2 { margin-bottom: clamp(0.5rem, 1.5vw, 1rem); }

/* ── Newsletter responsive ── */
.newsletter-section { padding: clamp(2.5rem, 5vw, 5rem) 0; }
.newsletter-section h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }

/* ── Product image responsive ── */
.product-card .product-image { height: clamp(200px, 25vw, 280px); aspect-ratio: 3/4; }
.product-gallery .main-image { height: clamp(280px, 40vw, 500px); }

/* ── Buttons and touch targets ── */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm { min-height: 36px; }
.btn-lg { min-height: 52px; }
.nav-icon-btn { min-width: 44px; min-height: 44px; }
.nav-icons .btn { min-width: 44px; min-height: 44px; height: auto; }

/* ── Spacing responsive ── */
section:not(.hero-section) { padding-left: max(12px, 1.5vw); padding-right: max(12px, 1.5vw); }

/* ── Table horizontal scroll safety ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Admin sidebar responsive ── */
.admin-sidebar { min-height: 100vh; }
.admin-sidebar-toggle { display: none; }

/* ── Cart item responsive ── */
.cart-item { text-align: left; }
.cart-item img { margin: 0; width: clamp(80px, 10vw, 100px); height: clamp(80px, 10vw, 100px); }

/* ── Auth card responsive ── */
.auth-card { padding: clamp(1.5rem, 3vw, 2.5rem); }

/* Authentication tabs need their own contrast rules, separate from navbar links. */
#authTabs .nav-link {
    color: var(--secondary) !important;
    text-shadow: none;
}

#authTabs .nav-link.active,
#authTabs .nav-link.active:hover,
#authTabs .nav-link.active:focus {
    color: #fff !important;
}

/* ── Dashboard header responsive ── */
.dashboard-header { padding: clamp(5rem, 8vw, 8rem) 0 clamp(1.5rem, 3vw, 3rem); }

/* ── Modals responsive ── */
.modal-body { max-height: 70vh; overflow-y: auto; }
.modal-dialog { margin: 0.5rem; }
@media (max-width: 575.98px) {
    .modal-dialog { margin: 0.25rem; }
    .modal-content { border-radius: 12px; }
}

/* ── Footer responsive ── */
.footer { padding: clamp(2rem, 4vw, 4rem) 0 0; }

/* ── Checkout responsive ── */
.payment-option { padding: clamp(0.75rem, 1.5vw, 1rem); }
.bank-details { padding: clamp(0.75rem, 1.5vw, 1rem); }

/* ── Navbar fix for mobile ── */
@media (max-width: 991.98px) {
    .navbar .container { position: relative; }
    .navbar,
    .navbar.navbar-scrolled { background: var(--secondary) !important; }
    .navbar-brand { color: #fff !important; }
    .navbar-toggler { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; transition: background .2s ease, transform .2s ease; }
    .navbar-toggler:hover { background: rgba(255,255,255,.1); }
    .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(96,165,250,.35); }
    .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; transition: transform .25s ease; }
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-width='2.25' d='M7 7l16 16M23 7L7 23'/%3e%3c/svg%3e") !important; transform: rotate(90deg); }
    .navbar-collapse { background: var(--secondary); padding: 1rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); margin-top: 0.5rem; max-height: calc(100dvh - 82px); overflow-y: auto; }
    .navbar-collapse .nav-link { color: #fff !important; }
    .navbar-collapse .navbar-nav { width: 100%; text-align: center; align-items: center; }
    .navbar-collapse .navbar-nav .nav-item { width: 100%; }
    .navbar-collapse .navbar-nav .nav-link {
        width: 100%;
        padding: .8rem 1rem !important;
        text-align: center;
    }
    .navbar-collapse .navbar-nav .nav-link::after {
        bottom: .35rem;
        max-width: 48px;
    }
    .navbar-collapse .navbar-nav .nav-link:hover::after,
    .navbar-collapse .navbar-nav .nav-link.active::after { width: 48px; }
    .navbar-collapse .navbar-nav .nav-link:hover { color: var(--primary-light) !important; }
    .navbar-collapse .dropdown-menu { background: var(--gray-800); border: 1px solid var(--gray-700); }
    .navbar-collapse .dropdown-item { color: #fff; }
    .navbar-collapse .dropdown-item:hover,
    .navbar-collapse .dropdown-item:focus { background: var(--gray-700); color: #fff; }
    .navbar-collapse .nav-icon-btn { color: #fff !important; background: transparent; border-color: rgba(255,255,255,0.2); }
    .navbar-collapse .nav-icon-btn:hover { color: var(--primary-light) !important; }
    .navbar-collapse .dropdown-arrow { color: #fff; }
    .navbar-collapse .nav-icons .btn { background: transparent; border-color: rgba(255,255,255,0.2); color: #fff; }
    .nav-icons { width: 100%; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.12); }
    .nav-icons-group { width: 100%; flex-shrink: 0; justify-content: center; }
    .user-name-text { color: #fff; }
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
    .hero-content h1 { font-size: clamp(2rem, 4vw, 3rem); }
}

@media (max-width: 991px) {
    .dashboard-header { padding: 6rem 0 2rem; }
    .dashboard-avatar { width: 50px; height: 50px; font-size: 1.2rem; }
    .profile-summary-card { margin-top: 0; }
    .stat-card-modern { padding: 1rem; }
    .stat-card-modern .stat-number { font-size: 1.5rem; }
    /* Admin sidebar collapse on tablet */
    .admin-sidebar-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--secondary); color: var(--white); border: none; border-radius: var(--radius); position: fixed; top: 12px; left: 12px; z-index: 9999; cursor: pointer; }
    .admin-sidebar { position: fixed; top: 0; left: -280px; width: 260px; z-index: 9998; transition: left 0.3s ease; }
    .admin-sidebar.open { left: 0; }
    .admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9997; }
    .admin-overlay.show { display: block; }
    .admin-content { margin-left: 0 !important; }
    .hero-content h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
    .hero-content p { font-size: 1rem; }
    .featured-product { flex-direction: column; text-align: center; padding: 1.5rem; }
    .featured-product .content { margin-bottom: 1.5rem; }
    .featured-product .image { flex: 1; }
    .product-gallery .main-image { height: 350px; }
}

@media (max-width: 767px) {
    .dashboard-header .d-flex { flex-direction: column !important; justify-content: center !important; align-items: center !important; text-align: center; }
    .info-item { padding: 0.75rem; }
    .hero-arrow { display: none; }
    .section-title { font-size: 1.5rem; }
    .shop-header h1 { font-size: 1.75rem; }
    .cart-item { text-align: left; }
    .cart-item img { margin: 0; width: 80px; height: 80px; }
    .product-info h1 { font-size: 1.35rem; }
    .product-gallery .main-image { height: 260px; }
    .about-hero h1 { font-size: 2rem; }
    .about-hero, .about-hero .container { text-align: center; }
    .about-hero .lead { max-width: 34rem; margin-inline: auto; }
    .about-hero + section .row > [class*="col-"] { text-align: center; }
    .about-hero + section .row .row { justify-content: center; }
    .shop-sidebar { position: static; margin-bottom: 1rem; }
    .product-card .product-image { height: 200px; }
    /* Dashboard cards mobile */
    .stat-card { padding: 1rem; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
    .stat-card h2 { font-size: 1.25rem; }
    /* Footer mobile */
    .footer .row { text-align: center; }
    .footer .social-links { justify-content: center; display: flex; }
    /* Buttons full width on mobile */
    .btn-responsive { width: 100%; }
}

@media (max-width: 575px) {
    .hero-content h1 { font-size: 1.5rem; }
    .product-card .product-image { height: 180px; }
    .newsletter-section h2 { font-size: 1.5rem; }
    .featured-product .content h2 { font-size: 1.4rem; }
    .product-card .product-body { padding: 0.75rem; }
    .product-card .product-price { font-size: 1rem; }
    .product-card .product-name { font-size: 0.95rem; }
    .cart-summary { padding: 1rem; }
    .order-card { padding: 1rem; }
    .dashboard-card { padding: 1rem; }
    .contact-info-card { padding: 1.25rem; }
}

/* Range Slider Custom */
.form-range::-webkit-slider-thumb {
    background: var(--primary);
}

/* Admin Styles */
.admin-sidebar {
    background: var(--secondary);
    min-height: 100vh;
    padding: 1.5rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--white) !important;
}

.admin-sidebar .admin-back-link {
    display: block;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.admin-sidebar .admin-back-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white) !important;
}

/* Delete Modal */
.modal-content {
    border-radius: var(--radius-lg);
}

.modal-header .btn-close:focus {
    box-shadow: none;
}

/* Category modal fix */
#categoryModal .modal-body {
    padding-top: 1rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* 3D Product Card Effect */
.product-card-3d {
    perspective: 1000px;
}

.product-card-3d .product-card {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.product-card-3d .product-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
}

/* Wishlist Heart Animation */
.wishlist-btn.active {
    color: var(--danger) !important;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Price Filter Display */
.price-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state .icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
}

.nav-bar{
    background: var(--white);
    gap: 1.5rem;
    display: flex;
    /* padding-right: 100px; */
    
}

/* ── Nav icons group ── */
.nav-icons-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e1e2e;
    border-radius: 50px;
    padding: 5px 7px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(2,6,23,.28), inset 0 1px 0 rgba(255,255,255,.08);
}

/* ── Nav icon buttons ── */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: #f1f1f1;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}
.nav-icon-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    transform: translateY(-1px);
}
.nav-icon-btn:active {
    transform: translateY(0);
}
.nav-icon-btn.dropdown-toggle {
    width: auto;
    padding: 0 10px;
    gap: 6px;
}

/* ── User avatar ── */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

/* Suppress Bootstrap default dropdown arrow on nav-icon-btn toggles */
.nav-icon-btn.dropdown-toggle::after {
    display: none !important;
}

/* ── User name text ── */
.user-name-text {
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

/* Dropdown wrapper inside icons group — align as flex item */
.nav-icons-group .dropdown {
    display: flex;
    align-items: center;
}

/* Ensure all icon-fonts inside nav-icon-btn are vertically centered */
.nav-icon-btn i,
.nav-icon-btn svg {
    display: block;
    line-height: 1;
    vertical-align: middle;
    margin: 0;
    flex: 0 0 auto;
}

.nav-icon-btn > i:first-child:last-child {
    width: 1.25em;
    text-align: center;
}

/* auth.js toggles this element inline; keep its centering layout intact */
#loginLink:not([style*="display: none"]) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* ── Dropdown arrow rotation ── */
.dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
}
.dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* ── Cart badge with pulse animation ── */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #dc3545;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    transition: transform 0.15s ease;
    z-index: 1;
}
.cart-badge.pulse {
    animation: badgePulse 0.4s ease;
}
@keyframes badgePulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ── Mobile responsiveness ── */
@media (max-width: 767.98px) {
    .user-name-text {
        display: none !important;
    }
    .nav-icons-group {
        padding: 2px 4px;
    }
    .nav-icon-btn {
        height: 40px;
        min-width: 40px;
        padding: 0 8px;
    }
    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
}
.password-wrapper .password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: none;
    background: transparent;
    z-index: 5;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
}
.password-wrapper .password-toggle:hover {
    color: #0d6efd;
}
.password-wrapper input {
    padding-right: 40px;
}
.password-wrapper input.form-control-lg + .password-toggle {
    width: 46px;
    font-size: 1.1rem;
}

/* ── Icon picker ── */
.icon-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    color: #fff;
}
.icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.icon-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #495057;
    background: #f8f9fa;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.icon-option:hover {
    background: #e9ecef;
    color: #0d6efd;
}
.icon-option.active {
    border-color: #0d6efd;
    background: #e8f0fe;
    color: #0d6efd;
}

/* Avatar icon styling */
.user-avatar i {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1;
}

/* =============================================
   MICRO-INTERACTION ANIMATIONS
   ============================================= */

/* ── Page load fade-in ── */
.fade-in-page {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.fade-in-page.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Section stagger ── */
.section-stagger {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.section-stagger.show { opacity: 1; transform: translateY(0); }
.section-stagger.delay-1 { transition-delay: 0.1s; }
.section-stagger.delay-2 { transition-delay: 0.2s; }
.section-stagger.delay-3 { transition-delay: 0.3s; }
.section-stagger.delay-4 { transition-delay: 0.4s; }

/* ── Product card hover enhancement ── */
.product-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.product-card .product-image img {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}
.product-card .add-to-cart-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.2s ease;
}

/* ── Button click scale ── */
.btn:active {
    transform: scale(0.97) !important;
}
.btn {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.15s ease;
}

/* ── Add to cart success flash ── */
.btn-cart-added {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
}
@keyframes cartAddedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.btn-cart-added .btn-text { display: none; }
.btn-cart-added .btn-checkmark { display: inline-block !important; }

/* ── Ripple effect ── */
.ripple-container {
    position: relative;
    overflow: hidden;
}
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ── Navbar dropdown fade + scale ── */
.dropdown-menu {
    display: none;
}
.dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
    transform-origin: top;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Cart item remove animation ── */
.cart-item-removing {
    opacity: 0;
    transform: translateX(30px);
    max-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease, padding 0.3s ease, margin 0.3s ease;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.show {
    opacity: 1;
    transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.05s; }
.reveal.delay-2 { transition-delay: 0.1s; }
.reveal.delay-3 { transition-delay: 0.15s; }
.reveal.delay-4 { transition-delay: 0.2s; }
.reveal.delay-5 { transition-delay: 0.25s; }
.reveal.delay-6 { transition-delay: 0.3s; }

/* ── Form validation shake ── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}
.shake {
    animation: shake 0.4s ease;
}

/* ── Input focus glow ── */
.form-control, .form-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ── Validation success icon ── */
.input-success-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.input-success-icon.show { opacity: 1; }

/* ── Toast notification slide-in (top-right) ── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast-custom {
    pointer-events: auto;
    animation: toastSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 380px;
}
.toast-custom.removing {
    animation: toastSlideOut 0.25s ease-in forwards;
}
@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; max-height: 80px; }
    to { transform: translateX(120%); opacity: 0; max-height: 0; padding: 0; margin: 0; }
}

/* ── Mobile sidebar slide-in ── */
.admin-sidebar, .user-sidebar {
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.admin-overlay, .sidebar-backdrop {
    transition: opacity 0.3s ease;
}

/* ── Staggered card entrance ── */
.product-card-3d {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.product-card-3d.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Heart wishlist pop ── */
.wishlist-btn:not(.active) {
    transition: transform 0.2s ease;
}
.wishlist-btn.active {
    animation: heartPop 0.35s ease;
}
@keyframes heartPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ── Loading button ── */
.btn-loading {
    pointer-events: none;
    position: relative;
}
.btn-loading .btn-text { visibility: hidden; }
.btn-loading .btn-spinner {
    display: inline-block !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ── Page transition overlay ── */
.page-transition {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.page-transition.active { opacity: 1; pointer-events: auto; }

/* ── Checkout step indicator ── */
.checkout-step {
    transition: all 0.3s ease;
}
.checkout-step.active {
    transform: scale(1.05);
}
.checkout-step.completed {
    transform: scale(1);
}

/* ── Payment option card ── */
.payment-option {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}
.payment-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.payment-option.selected {
    border-color: var(--primary) !important;
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Bootstrap modal transitions ── */
.modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.92);
    opacity: 0;
}
.modal.fade.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}
.modal-backdrop.fade {
    transition: opacity 0.3s ease;
}

/* ── Tab content transitions ── */
.tab-content > .tab-pane {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.tab-content > .tab-pane:not(.show) {
    opacity: 0;
    transform: translateY(6px);
}
.tab-content > .tab-pane.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Accordion transitions ── */
.accordion-button::after {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
}
.accordion-collapse {
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Collapse icon rotation ── */
[data-bs-toggle="collapse"] .fa-chevron-down,
[data-bs-toggle="collapse"] .fa-chevron-right,
[data-bs-toggle="collapse"] .fa-angle-down,
[data-bs-toggle="collapse"] .fa-angle-right {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down,
[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-right,
[data-bs-toggle="collapse"][aria-expanded="true"] .fa-angle-down,
[data-bs-toggle="collapse"][aria-expanded="true"] .fa-angle-right {
    transform: rotate(180deg);
}

/* ── Welcome overlay ── */
.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.welcome-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.welcome-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 28px;
    padding: 2.75rem 3rem 2.25rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 30px 90px rgba(2,6,23,.45), inset 0 1px 0 rgba(255,255,255,.9);
    transform: scale(0.9) translateY(24px);
    transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.welcome-overlay.show .welcome-card {
    transform: scale(1) translateY(0);
}
.welcome-icon {
    position: relative;
    z-index: 1;
    width: 78px;
    height: 78px;
    margin: 0 auto 1.25rem;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    box-shadow: 0 14px 30px rgba(37,99,235,.3);
    animation: welcomeIconFloat 1.8s ease-in-out infinite alternate;
}
.welcome-kicker {
    position: relative;
    z-index: 1;
    margin-bottom: .4rem;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.welcome-text {
    position: relative;
    z-index: 1;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.25;
}
.welcome-subtext {
    position: relative;
    z-index: 1;
    max-width: 310px;
    margin: .75rem auto 1.5rem;
    color: var(--gray-500);
    font-size: .92rem;
}
.welcome-progress {
    position: relative;
    z-index: 1;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--gray-200);
}
.welcome-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    transform-origin: left;
    animation: welcomeProgress 1.8s linear forwards;
}
.welcome-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .14;
}
.welcome-orb-one { width: 180px; height: 180px; top: -95px; right: -65px; background: var(--primary); }
.welcome-orb-two { width: 140px; height: 140px; bottom: -80px; left: -55px; background: #7c3aed; }
@keyframes welcomeIconFloat {
    to { transform: translateY(-5px) rotate(2deg); }
}
@keyframes welcomeProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
@media (max-width: 480px) {
    .welcome-card { padding: 2.25rem 1.4rem 1.75rem; border-radius: 22px; }
}
