/* Small button for compact fit */
.btn-sm {
    padding: 0.3rem 0.7rem !important;
    font-size: 0.85rem !important;
    min-width: 0;
    min-height: 0;
    border-radius: 4px !important;
    line-height: 1.1;
}
:root {
    /* Dark Theme Color Palette - Inspired by the image */
    --primary: #9333EA; /* Vibrant purple */
    --primary-dark: #EF4444; /* Darker purple */
    --secondary: #A855F7; /* Lighter purple */
    --accent: #C084FC; /* Lightest purple for accents */
    --success: #10B981; /* Green - For success messages */
    --danger: #EF4444; /* Red for warnings/errors */
    --dark: #1F2937; /* Dark Gray - for text */
    --light: #FFFFFF; /* White - for backgrounds */
    --gray: #9CA3AF; /* Medium Gray - for secondary text */
    --light-gray: #111827; /* Dark background - for page background */
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    --coffee: #D2B48C; /* Light coffee color */
    --coffee-dark: #A0826D; /* Darker coffee color */
    /* Button contrast variants (same hue, higher/lower contrast for hover/focus) */
    --btn-primary: var(--primary);
    --btn-primary-contrast: #6D28D9; /* darker purple */
    --btn-secondary: var(--secondary);
    --btn-secondary-contrast: #7C3AED;
    --btn-success: var(--success);
    --btn-success-contrast: #059669;
    --btn-danger: var(--danger);
    --btn-danger-contrast: #DC2626;
    --btn-info: #06B6D4;
    --btn-info-contrast: #0891B2;
    --btn-warning: #F59E0B;
    --btn-warning-contrast: #D97706;
    --btn-package: var(--accent);
    --btn-package-contrast: #7C3AED;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-gray);
    color: var(--light);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(147, 51, 234, 0.08) 0%, transparent 70%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
    color: var(--secondary);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* Workflow Counter */
.workflow-counter {
    background: rgba(147, 51, 234, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    text-align: center;
    margin: 1.5rem auto;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.workflow-counter i {
    color: var(--primary);
    font-size: 1.2rem;
}

.workflow-counter-text {
    font-weight: 500;
    color: var(--light);
}

.workflow-counter-number {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
}

.search-input {
    width: 100%;
    padding: 0.85rem 3rem 0.85rem 1.2rem;
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(31, 41, 55, 0.8);
    color: var(--light);
}

.search-input::placeholder {
    color: var(--gray);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(31, 41, 55, 0.9);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.2);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* NEW: Coffee Donation Banner - Top of Homepage */
.coffee-donation-banner {
    background: linear-gradient(135deg, var(--coffee), var(--coffee-dark));
    color: white;
    padding: 1.5rem;
    text-align: center;
    margin: 0 auto 2rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    transform: translateY(0);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.coffee-donation-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.coffee-donation-banner::after {
    content: '☕';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    animation: bounce 2s infinite;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.coffee-donation-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(210, 180, 140, 0.4);
}

.coffee-donation-banner h3 {
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.coffee-donation-banner p {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.coffee-donation-btn {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.coffee-donation-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Homepage Hero Section */
.homepage-hero {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.homepage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(168, 85, 247, 0.1));
    z-index: -1;
}

.homepage-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    animation: fadeInUp 0.8s ease-out;
}

.homepage-hero p {
    font-size: 1.4rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main CTA Button */
.main-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.main-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(147, 51, 234, 0.5);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

.main-cta-button i {
    font-size: 1.3rem;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 20px;
    margin: 4rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.features-section p {
    text-align: center;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.2);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    text-align: center;
}

.stats-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.stats-section p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    padding: 2rem;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray);
    font-size: 1rem;
}

/* Store Page Styles */
.store-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.store-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 700;
}

.store-hero p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    transform: translateY(0);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.promo-banner::after {
    content: '🎉';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    animation: bounce 2s infinite;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.promo-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(147, 51, 234, 0.4);
}

.promo-banner h3 {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.promo-banner p {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.promo-banner .promo-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.4rem;
    display: inline-block;
    margin-left: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.promo-banner .promo-code:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Advanced Search Filters */
.advanced-search {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
    display: none;
}

.advanced-search.active {
    display: block;
}

.advanced-search-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.advanced-search-row:last-child {
    margin-bottom: 0;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 4px;
    font-size: 0.9rem;
    background: rgba(17, 24, 39, 0.8);
    color: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(17, 24, 39, 0.9);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.2);
}

.price-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-range input {
    flex: 1;
}

.toggle-advanced-search {
    text-align: center;
    margin-bottom: 1rem;
}

.toggle-advanced-search button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

/* Filters */
.filters-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid rgba(147, 51, 234, 0.3);
    background: rgba(31, 41, 55, 0.8);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--light);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sorting */
.sort-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 4px;
    color: var(--light);
    font-weight: 500;
    cursor: pointer;
}

/* Store Layout with Sidebar */
.store-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.blocks-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    order: -1;
    /* keep sidebar width but allow page scroll (remove internal sidebar scroller) */
    overflow-y: visible; /* show full content instead of internal scroll */
    overflow-x: visible;
    max-height: none; /* allow sidebar content to expand so text is fully visible */
}

.products-container {
    flex: 1;
    padding-top: 0;
}

/* Products Grid - Updated for better image loading */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 0 5rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.products-grid.filtering {
    opacity: 0;
    transform: translateY(10px);
}

/* Product cards with improved image handling - MODIFIED */
.product-card {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(147, 51, 234, 0.3);
    position: relative;
    height: auto; /* Changed to auto for flexible height */
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.4);
}

/* MODIFIED: Product image with 2:1 aspect ratio - FIXED */
.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 50%; /* 2:1 ratio (height is 50% of width) */
    overflow: hidden;
    position: relative;
    background: rgba(17, 24, 39, 0.8);
    display: block; /* Changed from flex to block */
}

/* MODIFIED: Improved image handling - FIXED */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio and fill container */
    display: block;
    transition: all 0.3s ease;
    background-color: rgba(17, 24, 39, 0.8);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Ensure proper layering */
}

.product-image img.loading {
    opacity: 0.3;
}

.product-image img.loaded {
    opacity: 1;
}

/* MODIFIED: Remove duplicate image placeholder */
.product-image.no-image::after {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: var(--gray);
    opacity: 0.5;
    z-index: 2;
}

/* MODIFIED: Remove gradient overlay that might interfere */
.product-image::before {
    display: none; /* Remove to prevent interference with image display */
}

.price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.free-badge {
    background-color: var(--accent);
    color: white;
}

.paid-badge {
    background-color: var(--secondary);
    color: white;
}

.package-badge {
    background-color: var(--accent);
    color: white;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.favorite-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--danger);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.favorite-btn.active {
    color: var(--danger);
}

/* MODIFIED: Product content with optimized spacing */
.product-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* MODIFIED: Product title - Full display */
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light);
    line-height: 1.3;
    height: auto; /* Changed to auto */
    overflow: visible; /* Changed to visible */
    display: block; /* Changed to block */
    white-space: normal; /* Allow wrapping */
}

.product-summary {
    color: var(--gray);
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    line-height: 1.4;
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.stars {
    color: #FFC107;
    font-size: 0.85rem;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--gray);
}

.product-stats {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.product-views, .product-downloads {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--gray);
    font-size: 0.75rem;
}

.product-views i, .product-downloads i {
    color: var(--primary);
    font-size: 0.8rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
}

.original-price {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
}

/* MODIFIED: Product Actions - Hidden in product cards */
.product-actions {
    display: none; /* Hide all action buttons in product cards */
}

/* MODIFIED: Donation Button - More prominent with coffee color */
.donation-btn {
    background: var(--coffee); /* Coffee color */
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 4px;
    min-width: 120px;
    min-height: 45px;
    font-size: 0.9rem;
    padding: 10px 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(210, 180, 140, 0.4); /* Coffee color shadow */
}

.donation-btn:hover {
    background: var(--coffee-dark); /* Darker coffee color */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(210, 180, 140, 0.5);
}

.donation-btn:active {
    transform: translateY(0);
    background: #8B7355; /* Even darker coffee color */
}

.donation-btn i {
    font-size: 1rem;
}

/* MODIFIED: Donation Section with Background and Amounts */
.donation-section {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(210, 180, 140, 0.1); /* Coffee color background */
    border-radius: 8px;
    border: 1px solid rgba(210, 180, 140, 0.2); /* Coffee color border */
}

.donation-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: var(--light);
    font-size: 1rem;
}

.donation-amounts {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.donation-amount {
    flex: 1;
    padding: 0.5rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
}

.donation-amount:hover {
    background: rgba(210, 180, 140, 0.2); /* Coffee color hover */
    border-color: var(--coffee); /* Coffee color */
    transform: translateY(-2px);
}

.donation-amount.selected {
    background: var(--coffee); /* Coffee color */
    color: white;
    border-color: var(--coffee); /* Coffee color */
}

/* MODIFIED: Update product card actions for consistency */
.product-card .product-actions {
    display: none; /* Hide all action buttons in product cards */
}

/* MODIFIED: Hide download button completely */
.btn-download {
    display: none !important;
}

/* MODIFIED: Hide download button only in free product cards */
.product-card.free-product .btn-download {
    display: none !important;
}

/* Show download button only in product page */
.product-page .btn-download {
    display: inline-flex;
    background: var(--success);
    color: white;
}

.btn-donation {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-package {
    background: var(--accent);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 80px;
}

.btn-block {
    width: 100%;
}

.btn-view {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 45px;
}

.btn-view i {
    font-size: 0.85rem;
}

/* Right Sidebar Blocks */
.sidebar-block {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.18);
    /* tighter spacing so more text fits and appears fully */
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.45rem;
    border-radius: 5px;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
}

.sidebar-block h3 {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
}

.sidebar-block p {
    color: var(--gray);
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
}

.sidebar-block li {
    padding: 0.22rem 0;
    border-bottom: 1px solid rgba(147, 51, 234, 0.06);
    color: var(--gray);
    font-size: 0.78rem;
    line-height: 1.18;
}

.sidebar-block li:last-child {
    border-bottom: none;
}

.sidebar-block a {
    color: var(--primary);
    text-decoration: none;
}

.sidebar-block a:hover {
    color: var(--secondary);
}

/* Need Help section - White text on primary button */
.sidebar-block .btn-primary {
    color: white;
}

/* Categories */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.5rem;
    background: rgba(17, 24, 39, 0.82);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.22s, transform 0.12s;
}

.category-item:hover {
    background: rgba(147, 51, 234, 0.16);
    transform: translateY(-1px);
}

.category-item i {
    color: var(--secondary);
    font-size: 0.9rem;
}

.category-item span {
    color: var(--light);
    font-weight: 500;
    font-size: 0.9rem;
}

.category-item .count {
    margin-left: auto;
    background: rgba(147, 51, 234, 0.2);
    color: var(--gray);
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

/* Price Range Filter */
.price-filter {
    margin-top: 1rem;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
}

.price-range-inputs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.price-range-inputs input {
    flex: 1;
    padding: 0.6rem;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    border-radius: 4px;
    font-size: 0.9rem;
}

.apply-filter-btn {
    width: 100%;
    padding: 0.6rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 999;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(147, 51, 234, 0.2);
    overflow-y: visible;
    transform: translateX(0);
}

.cart-sidebar.open {
    transform: translateX(-300px);
}

.cart-header {
    padding: 1rem;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.1rem;
}

.cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem;
    max-height: calc(100vh - 200px);
}

/* Custom scrollbar for cart items */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.8);
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.cart-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: rgba(17, 24, 39, 0.8);
}

/* MODIFIED: Cart item images - FIXED */
.cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    display: block; /* Changed from flex to block */
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--light);
    font-size: 0.85rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price {
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--gray);
}

.quantity-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.quantity-btn:hover {
    background: var(--primary-dark);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
    background: rgba(31, 41, 55, 0.95);
}

.cart-discount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.cart-discount-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cart-discount-input input {
    flex: 1;
    padding: 0.7rem;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    border-radius: 4px;
    font-size: 0.9rem;
}

.cart-discount-input button {
    padding: 0.7rem 1rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-discount-input button:hover {
    background: var(--primary);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--light);
}

.cart-checkout {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(147, 51, 234, 0.4);
}

/* User Dashboard */
.user-dashboard {
    padding: 4rem 0;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: var(--light);
}

.dashboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.dashboard-tab {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    color: var(--gray);
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.dashboard-tab.active {
    color: var(--light);
}

.dashboard-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
}

.dashboard-content {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.purchases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.purchase-card {
    background: rgba(17, 24, 39, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.purchase-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.purchase-title {
    font-weight: 600;
    color: var(--light);
}

.purchase-date {
    color: var(--gray);
    font-size: 0.85rem;
}

.purchase-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.purchase-actions {
    display: flex;
    gap: 0.5rem;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.favorite-card {
    background: rgba(17, 24, 39, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
    display: flex;
    flex-direction: column;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* MODIFIED: Favorite images - FIXED */
.favorite-image {
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    display: block; /* Changed from flex to block */
}

.favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.favorite-title {
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.favorite-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.favorite-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* Product Page Styles */
.product-page {
    padding: 0;
    background: var(--light-gray);
}

.product-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    background: var(--light-gray);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
    min-height: 100vh;
}

.product-container {
    display: flex;
    flex-direction: column;
    order: 2;
    border-right: none;
}

/* MODIFIED: Product image large on product page - FIXED */
.product-image-large {
    width: 100%;
    height: 0;
    padding-bottom: 50%; /* 2:1 ratio */
    overflow: hidden;
    position: relative;
    background: rgba(17, 24, 39, 0.8);
    display: block; /* Changed from flex to block */
}

.product-image-large img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: 1;
    display: block;
}

.product-image-large.no-image::after {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--gray);
    opacity: 0.5;
    z-index: 2;
}

/* MODIFIED: Remove gradient overlay from large image */
.product-image-large::before {
    display: none; /* Remove to prevent interference */
}

/* MODIFIED: Gallery thumbnails - FIXED */
.product-image-gallery {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.8);
    margin: 0;
}

.gallery-thumbnail {
    width: 80px;
    height: 40px; /* 2:1 ratio */
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    position: relative;
    background: rgba(17, 24, 39, 0.8);
    display: block; /* Ensure block display */
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
    border: 2px solid var(--secondary);
}

/* MODIFIED: Product details with reduced padding */
.product-details {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.product-badge {
    align-self: flex-start;
    margin-bottom: 1rem;
}

.product-title-large {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--light);
    line-height: 1.2;
}

.product-rating-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.product-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* MODIFIED: Product Actions - Show buttons in product page with distinct colors */
.product-page .product-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding: 0;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    width: 100%;
    height: 48px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.product-actions .btn-success,
.product-actions .donation-btn,
.product-actions .btn {
    flex: none;
    width: 100%;
    margin: 0;
    position: relative;
}

.product-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.product-actions .btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-actions .btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Accessibility: focus styles for buttons */
.btn:focus,
.btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.12);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

/* Ensure clear text contrast when background is light (rare) */
.btn[style*="background:"] {
    color: white;
}

/* MODIFIED: Button colors - each with distinct color */
.btn-download {
    background: var(--btn-success);
    color: white;
    border: 1px solid rgba(0,0,0,0.12);
}

.btn-download:hover {
    background: var(--btn-success-contrast);
}

.donation-btn {
    background: var(--coffee);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.donation-btn:hover {
    background: var(--coffee-dark);
}

.btn-primary {
    background: var(--btn-primary);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-primary:hover {
    background: var(--btn-primary-contrast);
}

.btn-success {
    background: var(--btn-success);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-success:hover {
    background: var(--btn-success-contrast);
}

.btn-secondary {
    background: var(--btn-secondary);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-secondary:hover {
    background: var(--btn-secondary-contrast);
}

.btn-package {
    background: var(--btn-package);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-package:hover {
    background: var(--btn-package-contrast);
}

.btn-danger {
    background: var(--btn-danger);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-danger:hover {
    background: var(--btn-danger-contrast);
}

.btn-info {
    background: var(--btn-info);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-info:hover {
    background: var(--btn-info-contrast);
}

.btn-warning {
    background: var(--btn-warning);
    color: white;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-warning:hover {
    background: var(--btn-warning-contrast);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 80px;
}

.btn-block {
    width: 100%;
}

.btn-view {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 45px;
}

.btn-view i {
    font-size: 0.85rem;
}

/* Product Page Specific Button Colors */
#product-page .btn-primary {
    background: #EF4444 !important;
    color: white;
}

#product-page .btn-primary:hover {
    background: #DC2626 !important;
}

#product-page .btn-secondary {
    background: #10B981 !important;
    color: white;
}

#product-page .btn-secondary:hover {
    background: #059669 !important;
}

#product-page .product-actions .btn-primary {
    background: #EF4444 !important;
}

#product-page .product-actions .btn-primary:hover {
    background: #DC2626 !important;
}

#product-page .product-actions .btn-secondary {
    background: #10B981 !important;
}

#product-page .product-actions .btn-secondary:hover {
    background: #059669 !important;
}

/* MODIFIED: Business Owner Sidebar - FIXED */
.business-owner-sidebar {
    background: rgba(17, 24, 39, 0.8);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    order: 1;
    overflow-y: visible;
    max-height: none;
    margin: 0;
    border-right: 1px solid rgba(147, 51, 234, 0.2);
}

/* MODIFIED: Business owner image - FIXED */
.business-owner-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary);
    margin-bottom: 1rem;
    position: relative;
    background: rgba(17, 24, 39, 0.8);
    display: block; /* Changed from flex to block */
}

.business-owner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.business-owner-image.no-image::after {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--gray);
    opacity: 0.5;
}

.business-owner-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.business-owner-info p {
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

.business-owner-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.business-owner-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.business-owner-social a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* Donation Section for Product Page */
.product-page .donation-section {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(210, 180, 140, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(210, 180, 140, 0.2);
}

.product-page .donation-btn {
    width: 100%;
    padding: 10px 20px;
    background: var(--coffee);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 4px;
    min-width: 120px;
    min-height: 45px;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(210, 180, 140, 0.4);
}

.product-page .donation-btn:hover {
    background: var(--coffee-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(210, 180, 140, 0.5);
}

.product-page .donation-amounts {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.product-page .donation-amount {
    flex: 1;
    padding: 0.5rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.product-page .donation-amount:hover {
    background: rgba(210, 180, 140, 0.2);
    border-color: var(--coffee);
}

.product-page .donation-amount.selected {
    background: var(--coffee);
    color: white;
    border-color: var(--coffee);
}

/* MODIFIED: Reviews Section with reduced spacing */
.reviews-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.review-average {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light);
}

.review-stars-large {
    color: #FFC107;
    font-size: 1.5rem;
}

.review-count {
    color: var(--gray);
}

.review-form {
    background: rgba(17, 24, 39, 0.8);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.review-form h3 {
    margin-bottom: 0.8rem;
    color: var(--light);
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.rating-input i {
    font-size: 1.5rem;
    color: #CCCCCC;
    cursor: pointer;
}

.rating-input i.active,
.rating-input i:hover {
    color: #FFC107;
}

.review-item {
    background: rgba(17, 24, 39, 0.8);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.review-author {
    font-weight: 600;
    color: var(--light);
}

.review-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.review-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--success);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.review-images {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

/* MODIFIED: Review images - FIXED */
.review-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: block; /* Changed from flex to block */
}

.review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Image loading states - FIXED */
.image-loading {
    position: relative;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.8);
    color: var(--gray);
    font-size: 0.9rem;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.image-error::after {
    content: 'Failed to load image';
}

/* MODIFIED: Ensure proper image container behavior */
.product-image img,
.product-image-large img,
.gallery-thumbnail img,
.admin-product-image img,
.business-owner-image img,
.cart-item-image img,
.favorite-image img,
.review-image img,
.business-owner-preview-image img {
    /* Remove any conflicting styles */
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;
}

/* Payment Page Styles */
.payment-page {
    padding: 4rem 0;
}

.payment-container {
    max-width: 650px;
    margin: 0 auto;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.payment-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.payment-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

.payment-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.payment-form {
    padding: 3rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.payment-method {
    flex: 1;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.8);
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}

.payment-method:hover {
    border-color: var(--primary);
}

.payment-method.active {
    border-color: var(--secondary);
    background: rgba(168, 85, 247, 0.1);
}

.payment-method i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.payment-method.active i {
    color: var(--secondary);
}

.payment-method p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--light);
}

.payment-summary {
    background: rgba(17, 24, 39, 0.8);
    padding: 1.8rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    color: var(--light);
}

.payment-summary-row:last-child {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
    color: var(--secondary);
}

.cart-items-summary {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
}

.cart-item-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(147, 51, 234, 0.1);
}

.cart-item-summary:last-child {
    border-bottom: none;
}

/* Donation Section in Payment */
.donation-payment-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(210, 180, 140, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(210, 180, 140, 0.2);
}

.donation-payment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--light);
    font-weight: 600;
}

.donation-payment-amounts {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.donation-payment-amount {
    flex: 1;
    padding: 0.8rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
}

.donation-payment-amount:hover {
    background: var(--coffee);
    color: white;
}

.donation-payment-amount.selected {
    background: var(--coffee);
    color: white;
}

.donation-custom-amount {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.donation-custom-input {
    flex: 1;
    padding: 0.8rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    border-radius: 4px;
}

.donation-custom-btn {
    padding: 0.8rem 1.2rem;
    background: var(--coffee);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.donation-custom-btn:hover {
    background: var(--coffee-dark);
}

/* Payment Processing */
.payment-processing {
    display: none;
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.payment-success {
    display: none;
    text-align: center;
    padding: 3rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.order-details {
    background: rgba(17, 24, 39, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 400px;
    border: 1px solid rgba(147, 51, 234, 0.2);
    text-align: left;
}

.order-details h4 {
    margin-bottom: 1rem;
    color: var(--light);
}

.order-details p {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.order-details .order-id {
    color: var(--secondary);
    font-weight: 600;
}

/* Admin Login Page */
.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    color: var(--secondary);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(147, 51, 234, 0.4);
}

.login-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--gray);
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(147, 51, 234, 0.2);
}

.login-divider span {
    background: rgba(31, 41, 55, 0.95);
    padding: 0 1rem;
    position: relative;
}

.social-login {
    display: flex;
    gap: 1rem;
}

.social-login-btn {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid rgba(147, 51, 234, 0.3);
    background: transparent;
    color: var(--light);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-login-btn:hover {
    border-color: var(--primary);
    background: rgba(147, 51, 234, 0.1);
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.demo-credentials h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.demo-credentials p {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0.25rem 0;
}

/* Admin Page Styles */
.admin-page {
    padding: 4rem 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-info h1 {
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 0.25rem;
}

.admin-info p {
    color: var(--gray);
}

.logout-btn {
    padding: 0.8rem 1.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

/* Reset Counters Section */
.reset-counters-section {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
    max-height: none;
    overflow-y: visible;
}

.reset-counters-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-counters-section p {
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.reset-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.reset-btn {
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reset-btn-views {
    background: var(--primary);
    color: white;
}

.reset-btn-downloads {
    background: var(--accent);
    color: white;
}

.reset-btn-all {
    background: var(--danger);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(31, 41, 55, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 0.8rem 1.5rem;
    background: rgba(31, 41, 55, 0.8);
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: var(--light);
}

.admin-tab:hover {
    overflow: hidden;
    word-break: break-word;
    box-sizing: border-box;
    border-color: var(--primary);
    color: var(--primary);
}

.admin-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.admin-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.admin-section {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.admin-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form .form-control {
    width: 100%;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.radio-option label {
    font-weight: 500;
    color: var(--light);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

.admin-products {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.admin-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    min-width: 0;
}

.admin-product-item:hover {
    background-color: rgba(147, 51, 234, 0.1);
}

.admin-product-item:last-child {
    border-bottom: none;
}

.admin-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* MODIFIED: Admin product images - FIXED */
.admin-product-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.8);
    display: block; /* Changed from flex to block */
    position: relative;
}

.admin-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.admin-product-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--light);
}

.admin-product-details p {
    font-size: 0.9rem;
    color: var(--gray);
}

.admin-product-actions {
    display: flex;
    gap: 8px;
}

/* Social Media Management */
.social-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    min-width: 0;
}

.social-link-item:hover {
    background-color: rgba(147, 51, 234, 0.1);
}

.social-link-item:last-child {
    border-bottom: none;
}

.social-link-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icon-display {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.social-link-details h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--light);
}

.social-link-details p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Payment Settings */
.payment-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    min-width: 0;
}

.payment-settings-item:hover {
    background-color: rgba(147, 51, 234, 0.1);
}

.payment-settings-item:last-child {
    border-bottom: none;
}

.payment-settings-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    background: var(--secondary);
}

.payment-settings-details h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--light);
}

.payment-settings-details p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Deployment Guide */
.deployment-guide {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.deployment-guide h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.deployment-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.deployment-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.8);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.step-content p {
    color: var(--gray);
    line-height: 1.6;
}

.step-content code {
    background: rgba(147, 51, 234, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--accent);
}

/* Edit Product Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: rgba(31, 41, 55, 0.95);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: var(--light);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.image-modal.open {
    display: flex;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 3001;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(400px);
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.notification.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.notification.info {
    background: rgba(147, 51, 234, 0.9);
    color: white;
}

.notification.warning {
    background: rgba(245, 158, 11, 0.9);
    color: #212529;
}

.notification-icon {
    font-size: 1.5rem;
}

/* Footer */
footer {
    background-color: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 3.5rem 0 2.5rem;
    text-align: center;
    margin-top: 5rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
}

/* NEW: Coffee Donation Banner - Bottom of Homepage */
.coffee-donation-banner-bottom {
    background: linear-gradient(135deg, var(--coffee), var(--coffee-dark));
    color: white;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem auto 0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    transform: translateY(0);
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.coffee-donation-banner-bottom::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.coffee-donation-banner-bottom::after {
    content: '☕';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    animation: bounce 2s infinite;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.coffee-donation-banner-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(210, 180, 140, 0.4);
}

.coffee-donation-banner-bottom h3 {
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.coffee-donation-banner-bottom p {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.coffee-donation-banner-bottom .coffee-donation-btn {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.coffee-donation-banner-bottom .coffee-donation-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.footer-content {
    margin-bottom: 2.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.social-icon.facebook:hover {
    background: #1877F2;
}

.social-icon.twitter:hover {
    background: #1DA1F2;
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #cc2366 75%, #bc1888 100%);
}

.social-icon.linkedin:hover {
    background: #0077B5;
}

.social-icon.github:hover {
    background: #333;
}

.social-icon.youtube:hover {
    background: #FF0000;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Business Owner Settings in Admin */
.business-owner-settings {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.business-owner-settings h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.business-owner-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.business-owner-preview {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

/* MODIFIED: Business owner preview image - FIXED */
.business-owner-preview-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary);
    flex-shrink: 0;
    position: relative;
    display: block; /* Changed from flex to block */
}

.business-owner-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.business-owner-preview-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.business-owner-preview-info p {
    color: var(--gray);
    line-height: 1.5;
}

.social-links-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: none;
    overflow-y: visible;
}

.social-link-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link-input-group select {
    flex: 1;
    padding: 0.8rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    border-radius: 4px;
}

.social-link-input-group input {
    flex: 2;
    padding: 0.8rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: var(--light);
    border-radius: 4px;
}

.social-link-input-group button {
    padding: 0.8rem 1rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.social-link-input-group button:hover {
    background: #DC2626;
}

/* Contact Page Styles */
.contact-page {
    padding: 4rem 0;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.contact-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

.contact-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.contact-header p {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.contact-form {
    padding: 3rem;
}

.contact-form .form-group {
    margin-bottom: 1.8rem;
}

.contact-form .form-control {
    width: 100%;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
}

.contact-info-item {
    text-align: center;
    padding: 0.8rem;
    background: rgba(17, 24, 39, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(147, 51, 234, 0.2);
    max-width: 180px;
    width: 100%;
}

.contact-info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.contact-info-item i {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--primary);
}

.contact-info-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--light);
}

.contact-info-item p {
    color: var(--gray);
    font-size: 0.7rem;
}

/* Contact Management in Admin */
.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    min-width: 0;
    max-height: none;
    overflow-y: visible;
}

.contact-item:hover {
    background-color: rgba(147, 51, 234, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--light);
}

.contact-details p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.3rem;
}

.contact-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.contact-status {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.contact-status.new {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.contact-status.read {
    background: rgba(0, 0, 0, 0.05);
    color: var(--gray);
    border: 1px solid var(--gray);
}

.contact-actions {
    display: flex;
    gap: 8px;
}

/* User Login/Register Page */
#auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    width: 100%;
}

.auth-container {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
    display: flex;
    overflow: hidden;
}

.auth-image {
    flex: 1;
    background-image: url('https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}

.auth-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.8), rgba(168, 85, 247, 0.8));
}

.auth-form-container {
    flex: 1;
    padding: 3rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.auth-tab {
    flex: 1;
    padding: 0.8rem 0;
    background: none;
    border: none;
    color: var(--gray);
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.auth-tab.active {
    color: var(--light);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    color: var(--secondary);
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(147, 51, 234, 0.4);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--gray);
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(147, 51, 234, 0.2);
}

.auth-divider span {
    background: rgba(31, 41, 55, 0.95);
    padding: 0 1rem;
    position: relative;
}

.social-login {
    display: flex;
    gap: 1rem;
}

.social-login-btn {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid rgba(147, 51, 234, 0.3);
    background: transparent;
    color: var(--light);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-login-btn:hover {
    border-color: var(--primary);
    background: rgba(147, 51, 234, 0.1);
}

/* Language Selector */
/* Language selector styles removed (single-language site) */

/* Referral Program - Updated Design */
.referral-section {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    word-break: break-word;
    box-sizing: border-box;
}
.referral-link input, .price-range-inputs input {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.referral-stat-value, .referral-stat-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
    max-width: 100%;
    box-sizing: border-box;
}

.referral-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--light);
    font-weight: 600;
    text-align: center;
}

.referral-description {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.referral-link {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.referral-link input {
    flex: 3;
    padding: 0.8rem 1rem;
    background: rgba(17, 24, 39, 0.9);
        background: linear-gradient(135deg, rgba(31, 41, 55, 1), rgba(17, 24, 39, 1));
    color: var(--light);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.referral-link button {
    flex: 0 0 60%;
    max-width: 60%;
}

.referral-link input:focus {
    outline: none;
    border-color: rgba(147, 51, 234, 0.8);
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.2);
}

.copy-btn {
    flex: 1;
    padding: 0.8rem 0.5rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.8), rgba(139, 92, 246, 0.8));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 1), rgba(139, 92, 246, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.referral-stat {
    text-align: center;
    padding: 0.8rem 0.3rem;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.referral-stat:hover {
    transform: translateY(-2px);
    background: rgba(17, 24, 39, 0.8);
}

.referral-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.2rem;
}

.referral-stat-label {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 500;
}
/* Responsive */
@media (max-width: 1000px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.2rem;
    }
    
    .homepage-hero h1 {
        font-size: 2.5rem;
    }
    
    .homepage-hero p {
        font-size: 1.1rem;
    }
    
    .main-cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .store-hero h1 {
        font-size: 2.2rem;
    }
    
    .store-layout {
        flex-direction: column;
    }
    
    .blocks-sidebar {
        width: 100%;
        position: static;
        order: 0;
        max-height: none;
        overflow-y: visible;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        position: static;
    }
    
    .product-card {
        height: auto;
        min-height: 400px;
    }
    
    /* MODIFIED: Product image with 2:1 ratio on mobile */
    .product-image {
        padding-bottom: 50%; /* Maintain 2:1 ratio */
    }
    
    /* MODIFIED: Responsive for product page */
    .product-page {
        padding: 0;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .product-image-large {
        padding-bottom: 50%; /* Maintain 2:1 ratio */
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 30px; /* 2:1 ratio */
    }
    
    .product-details {
        padding: 1.5rem;
    }
    
    .business-owner-sidebar {
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(147, 51, 234, 0.2);
        order: 0;
    }
    
    .business-owner-image {
        width: 100px;
        height: 100px;
    }
    
    .business-owner-info h3 {
        font-size: 1rem;
    }
    
    .business-owner-info p {
        font-size: 0.8rem;
    }
    
    .product-title-large {
        font-size: 1.8rem;
    }
    
    .product-price {
        font-size: 1.6rem;
    }
    
    .admin-content {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 90%;
        right: -100%;
    }
    
    .cart-items {
        max-height: calc(100vh - 150px);
    }
    
    .cart-item {
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .cart-item-image {
        width: 40px;
        height: 40px;
    }
    
    .cart-item-title {
        font-size: 0.8rem;
    }
    
    .cart-item-price {
        font-size: 0.75rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1.2rem;
    }
    
    .social-icons {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-container {
        margin: 1rem;
    }
    
    .filters-container {
        flex-wrap: wrap;
    }
    
    .admin-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reset-buttons {
        flex-direction: column;
    }
    
    .donation-payment-amounts {
        flex-direction: column;
    }
    
    .business-owner-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-info-item {
        max-width: 200px;
    }
    
    .auth-container {
        flex-direction: column;
        max-width: 400px;
    }
    
    .auth-image {
        height: 200px;
    }
    
    .advanced-search-row {
        flex-direction: column;
    }
    
    .price-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .price-range span {
        margin-bottom: 0.5rem;
    }
    
    .referral-stats {
        grid-template-columns: 1fr;
    }
    
    .categories-list {
        max-height: none;
        overflow-y: visible;
    }
    
    /* language-selector removed */
    
    /* Responsive adjustments for sidebar content (kept compact and smaller so text fits) */
    .sidebar-block {
        padding: 0.4rem 0.5rem;
        margin-bottom: 0.45rem;
    }

    .sidebar-block h3 {
        font-size: 0.88rem;
        margin-bottom: 0.3rem;
    }

    .sidebar-block p {
        font-size: 0.76rem;
        margin-bottom: 0.3rem;
        line-height: 1.18;
    }

    .sidebar-block li {
        font-size: 0.76rem;
        margin-bottom: 0.18rem;
        padding: 0.18rem 0;
    }

    .category-item {
        padding: 0.22rem 0.3rem;
        gap: 0.28rem;
    }

    .category-item span {
        font-size: 0.76rem;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Blog Styles */
.blog-page {
    padding: 2rem 0;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--light);
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.blog-posts {
    display: grid;
    gap: 2rem;
}

.blog-post {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.blog-post-image {
    height: 200px;
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-content {
    padding: 1.5rem;
}

.blog-post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.blog-post-date,
.blog-post-category {
    color: var(--gray);
}

.blog-post-title {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 1rem;
    cursor: pointer;
}

.blog-post-title:hover {
    color: var(--primary);
}

.blog-post-summary {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-post-tags {
    margin-bottom: 1.5rem;
}

.blog-tag {
    display: inline-block;
    background: rgba(147, 51, 234, 0.2);
    color: var(--light);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.blog-tag:hover {
    background: var(--primary);
}

/* Blog Post Modal */
.blog-post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.blog-post-modal-content {
    background: rgba(31, 41, 55, 0.95);
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.blog-post-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.blog-post-modal-header h2 {
    font-size: 2rem;
    color: var(--light);
    margin: 0;
}

.blog-post-modal-meta {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    color: var(--gray);
    font-size: 0.9rem;
}

.blog-post-modal-image {
    height: 300px;
    overflow: hidden;
}

.blog-post-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-modal-content-text {
    padding: 1.5rem;
    color: var(--light);
    line-height: 1.6;
}

.blog-post-modal-content-text h2 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: var(--light);
}

.blog-post-modal-content-text h3 {
    font-size: 1.5rem;
    margin: 1.2rem 0 0.8rem;
    color: var(--light);
}

.blog-post-modal-content-text h4 {
    font-size: 1.2rem;
    margin: 1rem 0 0.6rem;
    color: var(--light);
}

.blog-post-modal-content-text p {
    margin-bottom: 1rem;
}

.blog-post-modal-content-text ul,
.blog-post-modal-content-text ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.blog-post-modal-content-text li {
    margin-bottom: 0.5rem;
}

.blog-post-modal-content-text code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.blog-post-modal-content-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-post-modal-content-text pre code {
    background: none;
    padding: 0;
}

.close-modal {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(147, 51, 234, 0.2);
}

/* Blog Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-block h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-block ul {
    list-style: none;
}

.sidebar-block li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(147, 51, 234, 0.1);
}

.sidebar-block li:last-child {
    border-bottom: none;
}

.sidebar-block a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-block a:hover {
    color: var(--primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* No posts message */
.no-posts {
    text-align: center;
    color: var(--gray);
    font-style: italic;
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header p {
        font-size: 1rem;
    }
    
    .blog-post-modal-content {
        margin: 1rem;
    }
    
    .blog-post-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .blog-post-modal-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Social Sharing Buttons */
.social-sharing {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1rem 0;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.social-sharing span {
    color: var(--gray);
    font-weight: 500;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--light);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.social-share-btn i {
    font-size: 16px;
}

/* Referral Program Promotion Section */
.referral-promo-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.referral-promo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.referral-promo-content i {
    font-size: 3rem;
    color: #10B981;
}

.referral-promo-content h4 {
    font-size: 1.5rem;
    color: var(--light);
    margin: 0;
}

.referral-promo-content p {
    color: var(--gray);
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.referral-promo-content button {
    margin-top: 0.5rem;
}

/* Referral Benefits Notice in Register Form */
.referral-benefits-notice {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.referral-benefits-notice i {
    font-size: 1.5rem;
    color: #10B981;
}

.referral-benefits-notice p {
    margin: 0;
    color: var(--light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Contact Messages - Full Display */
.contact-item-full {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.contact-item-full:hover {
    background: rgba(31, 41, 55, 0.95);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.contact-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
}

.contact-details h4 {
    font-size: 1.2rem;
    color: var(--light);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.contact-email {
    color: var(--primary);
    font-size: 0.95rem;
    margin: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-email i {
    color: var(--secondary);
}

.contact-date {
    color: var(--gray);
    font-size: 0.85rem;
    margin: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-date i {
    color: var(--accent);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.contact-action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.contact-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-status.new {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.contact-status.read {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.contact-subject {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(147, 51, 234, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
}

.contact-subject h5 {
    font-size: 1rem;
    color: var(--light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.contact-subject i {
    color: var(--secondary);
}

.contact-message {
    padding: 1rem;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(147, 51, 234, 0.15);
}

.contact-message p {
    color: var(--light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Download Links Section */
.download-links-section {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.download-links-section h4 {
    color: var(--light);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.download-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(147, 51, 234, 0.2);
    transition: all 0.3s ease;
}

.download-link-item:hover {
    background: rgba(17, 24, 39, 0.8);
    border-color: var(--primary);
    transform: translateX(5px);
}

.download-link-item span {
    color: var(--light);
    font-weight: 500;
}

.download-link-item .btn {
    white-space: nowrap;
}

/* Legal Pages (Terms, Privacy, Refund Policy) */
.legal-page {
    min-height: 100vh;
    padding: 6rem 0 4rem;
    background: var(--light-gray);
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(31, 41, 55, 0.95);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(147, 51, 234, 0.3);
}

.legal-header h1 {
    font-size: 2.5rem;
    color: var(--light);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
    font-style: italic;
}

.legal-content {
    color: var(--light);
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.5);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.legal-section h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-section h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin: 1.5rem 0 0.75rem;
}

.legal-section p {
    margin-bottom: 1rem;
    color: var(--light);
}

.legal-section ul,
.legal-section ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--light);
}

.legal-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-section li strong {
    color: var(--secondary);
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.legal-notice {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.legal-notice p {
    margin: 0.5rem 0;
    color: var(--light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.legal-notice p:first-child {
    font-weight: 600;
    font-size: 1.05rem;
    color: #FCA5A5;
}

.legal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
}

.legal-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .legal-container {
        padding: 2rem 1.5rem;
        border-radius: 0;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section {
        padding: 1rem;
    }
    
    .legal-actions {
        flex-direction: column;
    }
    
    .legal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Admin Filters and Bulk Actions */
.admin-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.filter-actions .btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.bulk-actions-header {
    padding: 1rem 1.5rem;
    background: rgba(31, 41, 55, 0.6);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(147, 51, 234, 0.15);
}

.bulk-actions-header label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
    cursor: pointer;
    font-weight: 500;
}

.bulk-actions-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.contact-checkbox {
    margin-right: 1rem;
}

.contact-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.order-checkbox {
    margin-right: 1rem;
}

.order-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 8px;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination button:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    color: var(--light);
    padding: 0 1rem;
    font-size: 0.95rem;
}

/* Discount Code Enhanced Styles */
.discount-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discount-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.discount-detail {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    background: rgba(17, 24, 39, 0.5);
    border-radius: 6px;
}

.discount-detail label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.discount-detail span {
    font-weight: 600;
    color: var(--light);
}

.discount-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.discount-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.discount-status.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.discount-status.upcoming {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

@media (max-width: 1024px) {
    .admin-filters {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-wrap: wrap;
    }
    
    .filter-actions .btn {
        flex: 1;
        min-width: 150px;
    }
}