/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Righteous&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);

  
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
/* --- NEW: Logo and Brand Name Styling --- */
.nav-brand-link {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between logo and text */
    text-decoration: none;
}

#logo {
   height: 60px; /* <-- YAHAN SE SIZE BARA KAREIN (e.g., 60px, 70px) */
    width: auto;
}

.nav-brand h1 {
    /* --- NEW AMAZING FONT --- */
    font-family: 'Righteous', cursive;
    font-weight: 400; /* Righteous is a single-weight font */
    font-size: 2.4rem; /* A bit bigger for more impact */
    line-height: 1; /* Isse text logo ke saath vertically align ho jayega */
    letter-spacing: 1px; /* Add a little space between letters */
    /* Add a subtle gradient and shadow for a premium look */
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.1));
}



.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn, .cart-btn, .wishlist-nav-btn, .chat-nav-btn, .mobile-top-cart-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.search-btn:hover, .cart-btn:hover, .wishlist-nav-btn:hover, .chat-nav-btn:hover, .mobile-top-cart-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-top-cart-btn {
    display: none;
}

.mobile-top-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: var(--text-white);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
}

.wishlist-nav-btn .fa-heart {
    color: #ef4444; /* Red heart */
}

.wishlist-nav-btn:hover .fa-heart {
    color: #dc2626; /* Darker red on hover */
}


.cart-count, .wishlist-count, .chat-nav-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: var(--text-white);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
}

.chat-nav-count {
    background: #10b981;
}

.wishlist-count {
    background: #ef4444; /* Red background for wishlist count */
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
}

.menu-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: scale(1.05);
}

.menu-toggle span {
    width: 28px;
    height: 4px;
    background: var(--primary-color);
    margin: 4px 0;
    transition: all 0.4s ease;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.menu-toggle:hover span {
    background: var(--primary-dark);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* Animated hamburger when menu is active */
.nav-menu.active ~ .nav-actions .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
    background: var(--danger-color);
}

.nav-menu.active ~ .nav-actions .menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-menu.active ~ .nav-actions .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
    background: var(--danger-color);
}

/* Search Bar */
.search-bar {
    background: var(--bg-white);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    display: none;
}

.search-bar.active {
    display: block;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem; /* Space for clear button */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.clear-search-btn {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    display: none; /* Initially hidden */
    transition: color 0.2s;
    line-height: 1;
}

.clear-search-btn:hover {
    color: var(--text-dark);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.search-submit:hover {
    background: var(--primary-dark);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.close-cart:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;

    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}



.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background: var(--bg-white);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

.remove-item {
    background: #ef4444;
    color: var(--text-white);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
}

.remove-item:hover {
    background: #dc2626;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.checkout-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--accent-color); /* Using green for go-ahead action */
    color: var(--text-white);
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition), box-shadow 0.3s;
    margin-top: 1.5rem; /* Add some space from the total */
    box-shadow: var(--shadow-sm);
}

.checkout-button:hover {
    background: #059669; /* Darker green */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 6rem 1rem; /* Added base horizontal padding */
    display: grid; /* Use grid for robust centering */
    place-items: center; /* This centers the content both vertically and horizontally */
    min-height: 90vh;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 30%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* Ensure it uses the available space within the parent's padding */
    padding: 0; /* Padding is handled by the parent .hero section */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge span {
    font-size: 0.875rem;
    font-weight: 600;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-line {
    opacity: 0.9;
}

.title-highlight {
    background: linear-gradient(45deg, var(--secondary-color), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 4.5rem;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.8)); }
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.stat {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.cta-button.primary {
    background: var(--secondary-color);
    color: var(--text-white);
}

.cta-button.primary:hover {
    background: #d97706;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.cta-button.danger {
    background: var(--danger-color);
    color: var(--text-white);
    justify-content: center; /* Center icon and text */
}

.cta-button.danger:hover {
    background: var(--danger-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-button.outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.cta-button.outline:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.hero-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.hero-visual {
    animation: slideInRight 1s ease-out;
}

.hero-image-container {
    position: relative;
}

/* Add a subtle gradient overlay to the image to improve card text readability */
.hero-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    border-radius: var(--radius-lg);
    z-index: 3; /* Position it between the image and the card */
    pointer-events: none; /* Make sure it doesn't block clicks */
    opacity: 0; /* Hidden on desktop by default */
    transition: opacity 0.3s ease;
}

.image-stack {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.floating-image {
    position: absolute;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: float 4s ease-in-out infinite;
}

.floating-1 {
    width: 120px;
    height: 120px;
    top: -20px;
    right: -20px;
    z-index: 3;
    animation-delay: 1s;
}

.floating-2 {
    width: 100px;
    height: 100px;
    bottom: -20px;
    left: -20px;
    z-index: 3;
    animation-delay: 2s;
}

.hero-card {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 4;
    animation: slideInUp 1s ease-out 0.5s both;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
}

.card-content h4 {
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-content p {
    color: var(--text-light);
    font-size: 0.75rem;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categories Section */
.categories {
    padding: 4rem 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-light);
}

/* Products Section */
.products {
    padding: 4rem 0;
    background: var(--bg-light);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-filters {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-size: 0.875rem;
    cursor: pointer;
}

.products-grid {
    display: grid;
    /* Yeh value cards ke minimum size ko control karti hai.
       Isko 220px kar diya hai taake cards chote ho jayein. */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    /* Cards ko aur chota karne ke liye minmax value kam kar di hai */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem; /* Cards ke darmiyan gap bhi kam kar diya hai */
}

/* Product Card ke naye styles */
.product {
    padding: 1rem; /* Card ke andar ki spacing thori kam kar di hai */
    padding: 0.8rem; /* Card ke andar ki spacing aur kam kar di hai */
}

.product .price {
    font-size: 1rem; /* Price ka font size bhi adjust kar diya hai */
    margin-bottom: 0.75rem;
    font-size: 0.9rem; /* Price ka font size aur chota kar diya hai */
    margin-bottom: 0.5rem;
    color: var(--primary-color); /* Price ko primary color de diya hai */
    font-weight: 600;
}

/* Product List - FLEX Layout */
#product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Individual Product Card */
.products-grid .product {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    width: 100%; /* Let the grid control the width */
    max-width: 300px; /* Set a max-width for larger screens */
    min-height: 400px; /* Ensure a consistent height on desktop */
    transition: var(--transition), box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.products-grid .product:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* Product Image */
.product img {
    width: 100%;
    /* Image ki height ko 250px set kar diya hai taake yeh desktop par behtar nazar aaye */
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    background: var(--bg-light);
}

/* Responsive image height for mobile */
@media (max-width: 480px) {
    .products-grid .product img, 
    .skeleton-product-card .skeleton-image {
        height: 120px; /* Was 140px. Smaller height for mobile phones */
    }
   
}


/* Product Title */

.product h3 {
    font-size: 1rem; /* Title ka font size aur chota kar diya hai */
     /* Title ka font size aur chota kar diya hai */
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    margin: 0.5rem 0 0.25rem;
    line-height: 1.3;
}

/* Product Description */
.product .description-wrapper {
    font-size: 0.95rem;
    font-size: 0.85rem; /* Description ka font size bhi chota kar diya hai */
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1; /* Allows description to take up space */
    min-height: 60px; /* Adjust to fit ~2.5 lines */
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: contents; /* This makes the <a> tag behave as if it's not there, for layout purposes */
}

.product-description {
    margin: 0;
    padding: 0;
    word-wrap: break-word; /* Lambe shabdon ko tor dega */
    overflow-wrap: break-word; /* Yeh bhi wahi kaam karega, behtar browser support ke liye */
}

/* Stock Info Styles */
.stock-info {

    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 0.75rem;
}

.stock-info.in-stock {
    background-color: #dcfce7; /* Light green */
    color: #166534; /* Dark green */
}

.stock-info.out-of-stock {
    background-color: #fee2e2; /* Light red */
    color: #991b1b; /* Dark red */
}

/* Add to Cart Button */
.product .add-to-cart {
    background: var(--secondary-color);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    margin-top: auto;
}

.product .add-to-cart:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

/* Disabled state for Add to Cart button */
.product .add-to-cart:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.product .add-to-cart:disabled:hover {
    background: var(--text-light);
}

/* View Details Button */
.product .view-details-btn {
    display: inline-block;
    text-align: center;
    background: var(--primary-color);
    color: var(--text-white);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: auto;
}

.product .view-details-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* View Details Button */
.product .view-details-btn {
    display: inline-block;
    text-align: center;
    background: var(--primary-color);
    color: var(--text-white);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: auto;
}

.product .view-details-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Container for multiple buttons on a product card */
.product-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto; /* Pushes the container to the bottom */
}

/* Reset margin and set width for buttons inside the container */
.product-card-actions .add-to-cart,
.product-card-actions .view-details-btn {
    margin-top: 0;
    width: 100%;
}

/* Loading Spinner */
.loader-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
    grid-column: 1 / -1; /* Make it span all columns in a grid */
}

.loader {
    border: 8px solid var(--bg-light);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-products {
    width: 100%;
    text-align: center;
    padding: 4rem 0;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Responsive Media Query */
@media (max-width: 1024px) {
    #product-list .product {
        max-width: 45%;
        min-width: 260px;
    }
}

@media (max-width: 768px) {
    #product-list {
        gap: 1rem;
    }
    #product-list .product {
        max-width: 90vw;
        min-width: 220px;
        padding: 1rem;
    }
}

/* --- MOBILE VIEW FIX FOR PRODUCTS --- */
@media (max-width: 768px) {
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columns per row */
        gap: 0.75rem;
        align-items: stretch;
    }
     #product-list .product {
        max-width: 20vw;
        
        min-width: 150px;
       
        padding: 1rem;
    }
    

    .products-grid .product {
        /* Reset styles from desktop view */
        max-width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
    }

    .products-grid .product img, 
    .skeleton-product-card .skeleton-image {
        height: 140px; /* Choti image height for mobile */
    }
    
    .product h3 {
        font-size: 0.8rem;
       
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        /* FIX: flex-grow ko hataya taake yeh price ko push na kare */
        margin-bottom: 0.25rem; /* Price se thora sa gap */
        
    }

    /* Stock information ko mobile view se hide kar diya hai */
    .product .stock-info {
        display: none;
    }

    .product .price {
        font-size: 0.9rem;
        margin-top: auto; /* FIX: Price ko hamesha card ke neeche rakhega */
        
       
    }
    .product .description-wrapper{
        display: none;
    }
    .product .product-card-actions {
        display: none; /* Buttons ko hide kar diya hai */
    }
    #logo {
   height: 40px; /* <-- YAHAN SE SIZE BARA KAREIN (e.g., 60px, 70px) */
    width: auto;
}
}

/* About Section */
.about {
    padding: 4rem 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.features {
    display: grid;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 40px;
}

.feature h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.feature p {
    color: var(--text-light);
    margin: 0;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* About Us Page Specific Styles */
.about-page {
    padding: 4rem 0;
    background: var(--bg-white);
}

.about-page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.about-page-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.about-page-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.mission-values-section {
    margin-top: 5rem;
    text-align: center;
}

.mission-values-section h3 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
}

.value-card {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.value-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.value-card h4 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.value-card p { color: var(--text-light); line-height: 1.7; }

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 40px;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-dark);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.checkout-form {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.order-summary {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem 0;
    border-top: 2px solid var(--border-color);
}

.place-order-btn {
    width: 100%;
    background: var(--accent-color);
    color: var(--text-white);
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.place-order-btn:hover {
    background: #059669;
}

.place-order-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--text-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-white);
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--text-white);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #374151;
    border-radius: var(--radius-md);
    background: #374151;
    color: var(--text-white);
}

.newsletter-form button {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Toast Messages */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-weight: 500;
    z-index: 1003;
    transform: translateX(400px);
    transition: var(--transition);
}

.toast.success {
    background: var(--accent-color);
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
    transform: translateX(0);
}

/* --- Notification Toast (User-facing) --- */
.notification-toast-user {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--text-dark), #374151);
    color: var(--text-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 9999;
    transform: translateY(calc(100% + 20px));
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-left: 4px solid var(--accent-color);
    max-width: 90vw;
    width: 350px;
}

.notification-toast-user.show {
    transform: translateY(0);
}

.notification-toast-user i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.toast-user-content h5 {
    margin: 0 0 0.25rem 0;
    font-weight: 700;
}

.toast-user-content p { margin: 0; font-size: 0.9rem; opacity: 0.9; }

/* Product Detail Page Specific Styles */
.product-detail-container {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: flex-start;
}
.product-image-gallery img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.product-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.product-info .category {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 1.5rem;
}
.product-info .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}
.product-info .description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 2rem;
}
.product-actions-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.add-to-cart-detail {
    flex-grow: 1;
    padding: 1rem;
    font-size: 1.1rem;
}
.wishlist-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 1.2rem;
    padding: 0.9rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}
.wishlist-btn.active, .wishlist-btn:hover {
    color: #ef4444; /* Red for active/hover wishlist */
    border-color: #fca5a5;
    background: #fef2f2;
}

/* --- NEW: Size Selector Styles --- */
.size-selector {
    margin-bottom: 2rem;
}

.size-selector-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.size-btn {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}

.size-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.size-btn.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

/* Login button on Product Detail page */
.login-to-add-btn {
    display: block;
    flex-grow: 1;
    text-align: center;
    background: var(--primary-color);
    color: var(--text-white);
    text-decoration: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.login-to-add-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Cart Page Specific Styles */
.cart-page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.cart-header-main {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.cart-header-main h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.cart-header-main p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Style overrides for cart items on the main page */
#cartItemsList .cart-item {
    padding: 1.5rem;
    align-items: center;
}

#cartItemsList .cart-item img {
    width: 100px;
    height: 100px;
}

#cartItemsList .cart-item .cart-item-name {
    font-size: 1.1rem;
}

#cartItemsList .cart-item .remove-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-left: auto; /* Pushes the button to the far right */
}

.empty-cart-message {
    text-align: center;
    padding: 4rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
}

.empty-cart-message i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.empty-cart-message h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.empty-cart-message p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.order-summary-wrapper {
    position: sticky;
    top: 100px; /* Adjust based on header height */
}

.summary-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-row, .summary-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-row span:first-child, .summary-total span:first-child {
    color: var(--text-light);
}

.summary-row span:last-child, .summary-total span:last-child {
    font-weight: 600;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid var(--border-color);
}

/* auth-nav-buttons container */
.auth-nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem; /* Consistent gap */
  
}

/* Log In Button */
.login-btn {
  background: linear-gradient(45deg, #2563eb, #60a5fa); /* Vibrant gradient */
  color: white;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 28px;
  border-radius: 50px; /* Pill-shaped buttons */
  border: 2px solid #60a5fa; /* Subtle border */
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  text-transform: uppercase; /* For a bold look */
  letter-spacing: 1px;
  text-decoration: none;
  
}

.login-btn:hover {
  background: linear-gradient(45deg, #1d4ed8, #3b82f6); /* Darker gradient on hover */
  transform: scale(1.05) rotate(2deg); /* Slight scale and tilt */

}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  ); /* Sliding shine effect */
  transition: 0.5s;
}

.login-btn:hover::before {
  left: 100%; /* Shine slides across on hover */
}

/* Sign Up Button */
.signup-btn {
  background: linear-gradient(45deg, #2563eb, #60a5fa); /* Same vibrant gradient */
  color: white;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 28px;
  border-radius: 50px;
  border: 2px solid #60a5fa;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  
}

.signup-btn:hover {
  background: linear-gradient(45deg, #1d4ed8, #3b82f6);
  transform: scale(1.05) rotate(-2deg); /* Opposite tilt for variety */
  
}

.signup-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.5s;
}

.signup-btn:hover::before {
  left: 100%; /* Sliding shine effect */
}

/* User Profile Button */
.user-profile-btn {
   display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #f9fafb, #e5e7eb);
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}
.user-profile-btn:hover {
  background: linear-gradient(45deg, #d1d5db, #9ca3af); /* Darker gray */
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

/* User Avatar (Icon) */
.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(45deg, #4b5563, #6b7280); /* Gradient avatar */
  color: white;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.user-profile-btn:hover .user-avatar {
  transform: rotate(360deg); /* Fun spin effect on hover */
}

/* User Name */
.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Logout Button */
.logout-btn {
    /* This style is for the old button, which is now removed from HTML. */
    /* It's better to keep it for the mobile menu version. */
    background: linear-gradient(45deg, #dc2626, #ef4444);
    color: white;
    padding: 10px;
    border-radius: 50px;
    border: 2px solid #ef4444;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}
.logout-btn:hover {
  background: linear-gradient(45deg, #b91c1c, #dc2626);
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(185, 28, 28, 0.6);
}

/* New Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
}

.user-profile-btn .dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 5px;
    color: var(--text-light);
}

.profile-dropdown.open .user-profile-btn .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 220px;
    z-index: 1001;
    padding: 0.5rem;
    /* Use visibility and opacity for smoother animation */
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transform-origin: top right; /* Animate from the top-right corner */
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
}

.profile-dropdown.open .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.dropdown-menu a:hover, .dropdown-menu button:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-menu i {
    width: 20px;
    text-align: center;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.dropdown-menu a:hover i, .dropdown-menu button:hover i {
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem;
}

.logout-btn-dropdown {
    color: var(--danger-color) !important;
}

.logout-btn-dropdown:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: var(--danger-dark) !important;
}

.logout-btn-dropdown i {
    color: var(--danger-color) !important;
}

.logout-btn-dropdown:hover i {
    color: var(--danger-dark) !important;
}

/* Reviews Section */
.reviews-section {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.reviews-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
#reviewForm {
    margin-bottom: 2rem;
}
#reviewForm h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.star-rating {
    margin-bottom: 1rem;
}
.star-rating .fa-star {
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}
.star-rating .fa-star:hover,
.star-rating .fa-star.selected {
    color: var(--secondary-color);
}
#reviewList .review-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}
#reviewList .review-item:last-child {
    border-bottom: none;
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.review-author {
    font-weight: 600;
}
.review-date {
    font-size: 0.8rem;
    color: var(--text-light);
}
.review-rating .fa-star {
    color: var(--secondary-color);
}

/* Related Products Section */
.related-products-section {
    padding: 4rem 1rem;
    background: var(--bg-light);
}
.related-products-section .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

/* Hide mobile auth on desktop */
.mobile-auth {
    display: none;
}

/* Mobile Cart Button */
.mobile-cart-btn {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    border-radius: var(--radius-md);
    margin: 0.5rem 2rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
}

.mobile-cart-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-cart-btn i {
    font-size: 1.2rem;
}

.mobile-cart-count {
    position: absolute;
    top: -5px;
    right: 15px;
    background: var(--secondary-color);
    color: var(--text-white);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

/* ========== MOBILE BOTTOM NAVBAR ========== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-top: 2px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    min-height: 70px;
}

.mobile-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-light);
    min-width: 65px;
    min-height: 50px;
    border: none;
    background: none;
    font-family: inherit;
}

.mobile-nav-item:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.mobile-nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
}

.mobile-nav-item.logout-item {
    color: var(--danger-color);
}

.mobile-nav-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-dark);
}

/* Add bottom padding to body when mobile nav is visible */
@media (max-width: 768px) {
    body {
        padding-bottom: 85px !important;
    }
}

/* ========== AMAZING GLOBAL SCROLLBAR STYLES ========== */
/* Main body and html scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb 0%, #3b82f6 50%, #1d4ed8 100%);
    border-radius: 10px;
    border: 2px solid #f8fafc;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #2563eb 50%, #1e40af 100%);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.5);
    transform: scale(1.1);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 50%, #1e3a8a 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.7);
}

::-webkit-scrollbar-corner {
    background: #f8fafc;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #2563eb #f8fafc;
}

/* Smooth scrolling for entire website */
html {
    scroll-behavior: smooth;
}

body {
    scroll-behavior: smooth;
}

/* Special scrollbar for containers */
.container::-webkit-scrollbar,
.products-grid::-webkit-scrollbar,
.hero::-webkit-scrollbar {
    width: 10px;
}

.container::-webkit-scrollbar-thumb,
.products-grid::-webkit-scrollbar-thumb,
.hero::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    border: 1px solid #f0fdf4;
}

.container::-webkit-scrollbar-thumb:hover,
.products-grid::-webkit-scrollbar-thumb:hover,
.hero::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

/* Modal scrollbars */
.modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 6px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Navbar scrollbar (if needed) */
.nav-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 4px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

/* Scrollbar animations */
@keyframes scrollbarGlow {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.6);
    }
}

::-webkit-scrollbar-thumb:hover {
    animation: scrollbarGlow 2s infinite;
}

/* Special scrollbar for product grids */
.products-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.products-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.4);
}

/* Cart page scrollbars */
.cart-items-wrapper::-webkit-scrollbar {
    width: 10px;
}

.cart-items-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border-radius: 8px;
    border: 1px solid #cffafe;
}

.cart-items-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.4);
}

/* Footer scrollbars */
.footer::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.footer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

/* Responsive Design */
@media (max-width: 640px) {
  .auth-nav-buttons {
    flex-direction: column;
    gap: 12px; /* Stack buttons vertically */
    padding: 10px;
  }

  .login-btn, .signup-btn, .user-profile-btn, .logout-btn {
    width: 100%; /* Full width on mobile */
    padding: 12px;
  }
}
/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
        position: relative;
        overflow-x: hidden;
        white-space: nowrap;
        min-height: 70px;
    }
    
    .nav-brand h1 {
        font-size: 1.3rem;
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .search-btn, .wishlist-nav-btn, .chat-nav-btn {
        padding: 0.4rem;
        font-size: 1rem;
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cart-btn {
        display: none !important;
    }
    
    .mobile-top-cart-btn {
        display: flex !important;
        padding: 0.4rem;
        font-size: 1rem;
        min-width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
    }
    
    .desktop-auth {
        display: none !important;
    }
    
    .nav-menu {
        /* display: none;  Replaced with opacity/visibility for animation */
        flex-direction: column;
        position: fixed; /* Changed to fixed for a full-screen slide-in menu */
        top: 0;
        left: 0;
        width: 80%; /* Adjust width as needed */
        max-width: 320px; /* Set a max-width for larger tablets */
        height: 100vh; /* Full viewport height */
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        padding: 4rem 0 2rem; /* Add more padding at the top */
        z-index: 1001; /* Ensure it's above the header */
        /* Animation properties */
        transform: translateX(-100%); /* Start off-screen to the left */
        visibility: hidden;
        transition: transform 0.4s ease-in-out, visibility 0.4s;
    }

    .nav-menu.active {
        transform: translateX(0); /* Slide into view */
        visibility: visible;
    }

    .nav-link {
        padding: 1rem 2rem;
        text-align: center;
    }
    
    /* Show mobile auth and hide desktop auth */
    .desktop-auth {
        display: none;
    }

    .mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        padding: 0 2rem;
        align-items: center;
        width: 100%;
    }
    
    .mobile-cart-btn {
        display: flex !important;
    }

    .menu-toggle {
        display: none !important;
    }
    
    .mobile-bottom-nav {
        display: block !important;
    }
    /* Hide the back arrow on larger screens */
    @media (min-width: 769px) {
        .back-to-prev-section {
            display: none !important;
        }
    }

    /* Hide the back arrow on larger screens */
    @media (min-width: 769px) {
        .back-to-prev-section {
            display: none !important;
        }
    }
    
    .mobile-nav-item.ai-assistant-mobile {
        display: flex !important;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0; /* Ensure no extra padding on mobile */
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .title-highlight {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 2rem; /* Reduce gap for tablets */
        flex-wrap: wrap; /* Allow wrapping if needed */
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .floating-image {
        display: none;
    }
    
    .hero-card {
        /* Keep it absolute but adjust for mobile */
        position: absolute;
        bottom: 1rem; /* Position from the bottom */
        left: 1rem;   /* Inset from the left */
        right: 1rem;  /* Inset from the right */
        width: auto;  /* Let it size automatically with padding */
        margin: 0;    /* Remove the margin-top */
        justify-content: center; /* Center the content inside the card */
    }

    /* Cart Page Responsive Layout */
    .cart-layout {
        grid-template-columns: 1fr; /* Stack items and summary */
        gap: 1rem;
    }

    .order-summary-wrapper {
        position: static; /* Remove sticky behavior on mobile */
        top: auto;
        margin-top: 2rem; /* Add space when stacked */
    }

    /* Show the gradient overlay on mobile for better text contrast */
    .hero-image-container::after {
        opacity: 1;
    }
    
    .product-detail-content {
        grid-template-columns: 1fr;
    }

    /* Mobile scrollbar adjustments */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        border: 1px solid #f8fafc;
        border-radius: 6px;
    }
    
    ::-webkit-scrollbar-track {
        border-radius: 6px;
    }
    
    /* --- NEW: Smaller checkout modal on mobile --- */
    #checkoutModal .modal-content {
        width: 95%;
        max-width: 500px; /* Limit max width on larger mobile screens */
        padding: 0.5rem;
        max-height: 85vh;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-filters {
        justify-content: center;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero {
        padding: 3rem 0.5rem; /* Slightly less padding for small phones */
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .title-highlight {
        font-size: 2.5rem; /* Ensure highlighted text also scales down */
    }

    .hero-stats {
        gap: 1.5rem; /* Further reduce gap for phones */
    }

    .stat-number {
        font-size: 2rem; /* Scale down stat numbers */
    }

    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    /* Adjust header elements on small screens for better spacing */
    .nav-brand h1 {
        font-size: 1.25rem; /* Make logo text a bit smaller */
    }

    /* Hide text on CTA buttons in the header, like "Continue Shopping" */
    .header .nav-actions .cta-button span {
        display: none;
    }

    .header .nav-actions .cta-button {
        padding: 0.75rem; /* Adjust padding for icon-only button */
        font-size: 1rem; /* Ensure icon size is appropriate */
    }

    /* Cart Page Item adjustments for small phones */
    #cartItemsList .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    #cartItemsList .cart-item .remove-item {
        margin-left: 0; /* Reset margin */
        align-self: flex-end; /* Push to the right in column layout */
    }
}

/* Profile Page Styles */
.profile-page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.profile-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.profile-nav {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    position: sticky;
    top: 100px; /* Adjust based on header height */
}

.profile-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.profile-nav .nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.profile-nav .nav-link.active {
    background: var(--primary-color);
    color: var(--text-white);
}

.profile-nav .nav-link.active:hover {
    background: var(--primary-dark);
}

.profile-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    min-height: 500px;
}

.profile-content .tab-pane {
    display: none;
}

.profile-content .tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Order History Styles */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
}

.order-card-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.order-card-header:hover {
    background: #f0f2f5;
}

.order-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.order-info div { font-size: 0.9rem; }
.order-info strong { color: var(--text-dark); }
.order-info span { color: var(--text-light); }

.status-badge { padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; text-transform: capitalize; }
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.processing { background: #e0f2fe; color: #0c4a6e; }
.status-badge.shipped { background: #dbeafe; color: #1e40af; }
.status-badge.delivered { background: #dcfce7; color: #166534; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

.order-toggle-icon { transition: transform 0.3s; margin-left: 1rem; }
.order-card.open .order-toggle-icon { transform: rotate(180deg); }

.order-card-body { padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out; }
.order-card.open .order-card-body { padding: 1.5rem; max-height: 1000px; /* Large enough to fit content */ }

.order-item { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.order-item:last-child { border-bottom: none; }
.order-item img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); }
.order-item-details { flex-grow: 1; }
.order-item-details h5 { font-weight: 600; margin-bottom: 0.25rem; }
.order-item-details p { font-size: 0.9rem; color: var(--text-light); margin: 0; }
.order-item-price { font-weight: 600; }

.no-orders { text-align: center; padding: 3rem; border: 2px dashed var(--border-color); border-radius: var(--radius-lg); }
.no-orders i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }
.no-orders h4 { font-size: 1.5rem; }

/* Chat System Styles */
.chat-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
}

.chat-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1003;
}

.chat-modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    height: 500px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-product-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-product-info img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.chat-product-info h4 {
    margin: 0;
    font-size: 1rem;
}

.chat-product-info p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease-out;
}

.message.sent {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-form {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.chat-form input:focus {
    border-color: var(--primary-color);
}

.chat-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chat-form button:hover {
    background: var(--primary-dark);
}

/* Admin Chat Panel Styles */
.admin-chat-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
    height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background: white;
}

.chat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chat-card:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.chat-product-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-customer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.customer-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
}

.unread-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.chat-product {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-last-msg {
    font-size: 0.7rem;
    color: #9ca3af;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-chat-product-img {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

.admin-chat-info {
    flex: 1;
}

.admin-chat-customer {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-chat-product {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.admin-chat-status {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.admin-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loading-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 2rem;
}

.admin-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    animation: messageSlide 0.3s ease-out;
}

.admin-message.admin-sent {
    align-self: flex-end;
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
}

.admin-message.admin-received {
    align-self: flex-start;
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.admin-message-sender {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.admin-message-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.admin-message-time {
    font-size: 0.6rem;
    margin-top: 0.25rem;
    opacity: 0.6;
}

.admin-chat-form {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
}

.admin-chat-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.admin-chat-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.admin-chat-form button {
    background: #2563eb;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.admin-chat-form button:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.chat-sidebar {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
}

.chat-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.chat-sidebar-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-list-item:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

.chat-list-item.active {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary-color);
}

.chat-list-item img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-list-details {
    flex: 1;
    min-width: 0;
}

.chat-list-details h5 {
    margin: 0 0 0.1rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.chat-list-details p {
    margin: 0 0 0.1rem 0;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.chat-list-details .last-message {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
}

.active-chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.active-chat-header img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.active-chat-header h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

.active-chat-header p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.chat-status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-left: auto;
    animation: pulse 2s infinite;
}

.chat-messages-admin {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
}

.chat-form-admin {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-form-admin input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.chat-form-admin button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.no-chat-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.no-chat-selected i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.no-chat-selected h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.no-chat-selected p {
    font-size: 1rem;
    color: #6b7280;
    max-width: 300px;
}

/* Mobile Chat Responsive */
@media (max-width: 768px) {
    .chat-modal-content {
        width: 95%;
        height: 80vh;
        max-height: 600px;
    }
    
    .chat-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .admin-chat-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 500px;
    }
    
    .chat-sidebar {
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .chat-main-area {
        min-height: 400px;
    }
}

/* Profile Page Responsive */
@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-nav {
        position: static;
        display: flex;
        justify-content: space-around; /* Distribute items evenly */
        padding: 0.5rem 0;
        /* New styles for a better container */
        padding: 0.5rem;
        margin-bottom: 1.5rem;
        border-radius: var(--radius-md);
        background: var(--bg-white);
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        background: var(--bg-light);
        gap: 0.5rem;
    }

    .profile-nav .nav-link {
        flex-grow: 1; /* Make tabs share space equally */
        flex-basis: 0; /* Ensures equal width */
        flex-direction: column; /* Stack icon and text vertically */
        gap: 0.25rem; /* Smaller gap for vertical layout */
        padding: 0.75rem 0.5rem; /* Adjust padding */
        font-size: 0.8rem; /* Smaller font size for text */
        flex-grow: 1; /* Allow them to take up space */
        text-align: center;
        margin-bottom: 0;
        border-radius: var(--radius-md);
        background: var(--bg-white);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .profile-nav .nav-link.active {
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
        transform: translateY(-2px);
    }

    .profile-nav .nav-link i {
        font-size: 1.5rem; /* Make icon bigger */
        margin-bottom: 0.25rem;
    }
}

/* Profile Page Responsive - Tablet & Mobile */
@media (max-width: 991px) {
    .profile-container {
        grid-template-columns: 1fr; /* Ensure single column layout */
        gap: 1.5rem;
    }
    .profile-sidebar {
        order: 2; /* Show form after orders on smaller screens */
    }
    .profile-main {
        order: 1; /* Show orders first */
    }
}

/* Profile Page Specific Styles (Moved from profile.html) */
.profile-container {
    max-width: 1200px;
    margin: 0 auto 2rem; /* Adjusted margin to account for new header */
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .profile-container {
        grid-template-columns: 350px 1fr;
    }
}

.profile-sidebar, .profile-main {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.profile-sidebar {
    align-self: start;
}

.profile-sidebar h3, .profile-main h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Order History Scrollable Container */
#orderHistoryContainer {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    margin: 0 -0.5rem;
    width: calc(100% + 1rem);
}

/* Custom Scrollbar for Order History to match theme */
#orderHistoryContainer::-webkit-scrollbar {
    width: 8px;
}

#orderHistoryContainer::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

#orderHistoryContainer::-webkit-scrollbar-thumb {
    background-color: #d1d5db; /* A neutral, non-intrusive color */
    border-radius: var(--radius-sm);
}

/* Skeleton Loader for Order History */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton-line, .skeleton-circle {
    background-color: #e5e7eb;
    background-image: linear-gradient(to right, #e5e7eb 0%, #f3f4f6 20%, #e5e7eb 40%, #e5e7eb 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%;
    animation: shimmer 2s linear infinite;
    border-radius: var(--radius-sm);
}

.skeleton-order-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    background: var(--bg-white);
    overflow: hidden; /* Important for shimmer effect */
}

.skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.skeleton-body {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

.skeleton-image-stack {
    display: flex;
    position: relative;
    width: 100px;
    height: 60px;
    align-items: center;
}

.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--bg-light);
    position: absolute;
}

.skeleton-circle:nth-child(1) { left: 0; z-index: 3; }
.skeleton-circle:nth-child(2) { left: 20px; z-index: 2; }
.skeleton-circle:nth-child(3) { left: 40px; z-index: 1; }

.skeleton-item-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.skeleton-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

/* Skeleton Loader for Product Cards */
.skeleton-product-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 300px;
    min-height: 400px;
    overflow: hidden; /* Important for shimmer effect */
}

.skeleton-product-card .skeleton-image {
    width: 100%;
    height: 250px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.skeleton-product-card .skeleton-button {
    height: 48px;
    margin-top: auto;
    border-radius: var(--radius-md);
}

/* Skeleton Loader for Review Items */
.skeleton-review-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    overflow: hidden; /* Important for shimmer effect */
}

.skeleton-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skeleton-review-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.skeleton-star {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}


#profileForm .form-group {
    margin-bottom: 1.25rem;
}

#profileForm label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

#profileForm input, #profileForm textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

#profileForm input:focus, #profileForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#profileForm input:disabled {
    background: #f1f5f9;
    color: var(--text-light);
    cursor: not-allowed;
}

/* Order Card Styles */
.order-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    background: var(--bg-white);
    overflow: hidden;
}
.order-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}
.order-id {
    font-weight: 600;
    color: var(--text-dark);
}
.order-date {
    font-size: 0.9rem;
    color: var(--text-light);
}
.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid;
}
.order-status.pending { background: #fef3c7; color: #92400e; }
.order-status.processing { background: #dbeafe; color: #1e40af; }
.order-status.shipped { background: #d1fae5; color: #065f46; }
.order-status.delivered { background: #dcfce7; color: #166534; }


/* Mobile Responsive Order Cards */
@media (max-width: 768px) {
    .order-card {
        margin: 0 -0.5rem 1.5rem -0.5rem;
        border-radius: var(--radius-md);
    }
    .order-card-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }
    .order-card-body-new {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    .order-images-stack {
        width: 80px;
        height: 50px;
    }
    .stacked-image, .image-plus-more {
        width: 50px;
        height: 50px;
    }
    .stacked-image:nth-child(2) { left: 15px; }
    .stacked-image:nth-child(3) { left: 30px; }
    .image-plus-more { left: 30px; }
    .order-card-footer {
        padding: 1rem;
        justify-content: center;
    }
    .order-total {
        font-size: 1.1rem;
    }
    .item-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .order-card {
        margin: 0 -1rem 1rem -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .order-card-header {
        padding: 0.75rem 1rem;
    }
    .order-card-body-new {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        text-align: center;
    }
    .order-images-stack {
        justify-self: center;
        margin-bottom: 0.5rem;
    }
    .order-card-footer {
        padding: 0.75rem 1rem;
    }
    .order-id {
        font-size: 0.9rem;
    }
    .order-date {
        font-size: 0.8rem;
    }
    .order-status {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    .item-detail-row {
        font-size: 0.8rem;
    }
    .item-title {
        font-size: 0.8rem;
        margin-right: 0.5rem;
    }

    .order-total {
        font-size: 1rem;
    }
}



.order-card-body-new {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
}
.order-images-stack {
    display: flex;
    position: relative;
    width: 100px;
    height: 60px;
    align-items: center;
    flex-shrink: 0;
}

.stacked-image, .image-plus-more {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: absolute;
    transition: transform 0.3s ease;
}

.stacked-image:nth-child(1) { left: 0; }
.stacked-image:nth-child(2) { left: 20px; }
.stacked-image:nth-child(3) { left: 40px; }

.order-images-stack:hover .stacked-image {
    transform: translateY(-10px);
}

.image-plus-more {
    left: 40px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 0;
}

.order-items-summary {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.items-summary-list{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.item-detail-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    min-width: 0;
}

.order-item-price {
    padding: 0.25rem 0;
}
.item-title {
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.item-price {
    color: var(--text-light);
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.order-total-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

.return-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.order-actions .cta-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .order-card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .return-btn {
        width: 100%;
        justify-content: center;
    }
}
.order-total {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-left: 0.5rem;
}
/* Back to Previous Section Arrow */
.back-to-prev-section {
    position: fixed;
    left: 1rem;
    bottom: 85px; /* Above mobile nav */
    width: 45px;
    height: 45px;
    background: rgba(37, 99, 235, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 998;
    display: flex; /* Always flex for alignment */
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(5px);
    
    /* Animation properties */
    opacity: 0;
    transform: scale(0.8) translateX(-20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-prev-section.visible {
    opacity: 1;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* Profile Page Responsive Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-actions .cart-btn {
        display: none;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .profile-sidebar {
        padding: 1.5rem;
        position: static;
        order: 2;
    }
    
    .profile-main {
        padding: 1.5rem;
        order: 1;
    }
    
    .page-header {
        padding: 1rem 0.5rem;
        text-align: center;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .profile-container {
        margin: 0.5rem auto;
        padding: 0 0.25rem;
        gap: 1rem;
    }
    
    .profile-sidebar,
    .profile-main {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .profile-sidebar h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .profile-main h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}