/* RxHomeoCare - Custom Styles */

/* CSS Variables for theming */
:root {
    --primary-color: #007bff;
    --secondary-color: #28a745;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

/* Dark mode specific styles */
[data-theme="dark"] .navbar-light {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .nav-link {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .navbar-light .nav-link:hover {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .card {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .bg-light {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .form-control {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

[data-theme="dark"] .mobile-top-bar {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .table {
    color: var(--text-primary);
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: var(--border-color);
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--text-secondary);
    color: var(--bg-primary);
}

[data-theme="dark"] .alert {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .breadcrumb {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--primary-color);
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--text-secondary);
}

[data-theme="dark"] .list-group-item {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item:hover {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .offcanvas {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .offcanvas-header {
    border-bottom-color: var(--border-color);
}

/* Theme toggle button styles */
.theme-toggle {
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

#themeToggle, #mobileThemeToggle {
    transition: all 0.3s ease;
}

#themeToggle:hover, #mobileThemeToggle:hover {
    transform: rotate(180deg);
}

/* Hero Image Placeholder */
.hero-image-placeholder {
    width: 100%;
    height: 50vh;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 50%, #e0f2e0 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 195, 74, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(102, 187, 106, 0.05) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
}

.hero-content-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #2e7d32;
    padding: 40px;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.hero-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    opacity: 0.3;
    animation: floatUpDown 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 15%;
    font-size: 2rem;
    color: #4caf50;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 20%;
    font-size: 1.5rem;
    color: #66bb6a;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 30%;
    left: 25%;
    font-size: 1.8rem;
    color: #81c784;
    animation-delay: 4s;
}

.floating-element:nth-child(4) {
    top: 40%;
    right: 15%;
    font-size: 1.3rem;
    color: #a5d6a7;
    animation-delay: 1s;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Dark mode hero placeholder */
[data-theme="dark"] .hero-image-placeholder {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 50%, #2a2a2a 100%);
}

[data-theme="dark"] .hero-content-overlay {
    color: #81c784;
}

[data-theme="dark"] .hero-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive hero placeholder */
@media (max-width: 768px) {
    .hero-image-placeholder {
        height: 40vh;
        border-radius: 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-image-placeholder {
        height: 35vh;
        border-radius: 10px;
    }
    
    .hero-content-overlay {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

/* Product Placeholder Styles */
.product-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f1f3f4 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.product-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(76, 175, 80, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(33, 150, 243, 0.05) 0%, transparent 50%);
    animation: placeholderFloat 15s ease-in-out infinite;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.6;
    z-index: 2;
    position: relative;
}

.placeholder-text {
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 2;
    position: relative;
    text-align: center;
}

/* Product placeholder variations */
.placeholder-medicine {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 50%, #e0f2e0 100%);
    color: #2e7d32;
}

.placeholder-bottle {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 50%, #e1f5fe 100%);
    color: #1976d2;
}

.placeholder-herb {
    background: linear-gradient(135deg, #fff3e0 0%, #fef7ed 50%, #fff8e1 100%);
    color: #f57c00;
}

.placeholder-remedy {
    background: linear-gradient(135deg, #fce4ec 0%, #fdf2f8 50%, #fce4ec 100%);
    color: #c2185b;
}

.placeholder-tincture {
    background: linear-gradient(135deg, #f3e5f5 0%, #faf2fc 50%, #f1e8f3 100%);
    color: #7b1fa2;
}

@keyframes placeholderFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-5px) rotate(0.5deg); }
    66% { transform: translateY(2px) rotate(-0.5deg); }
}

/* Dark mode product placeholders */
[data-theme="dark"] .product-placeholder {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 50%, #2a2a2a 100%);
    color: #b0b0b0;
}

[data-theme="dark"] .placeholder-medicine {
    background: linear-gradient(135deg, #1b4332 0%, #2d5a3d 50%, #1a3d2e 100%);
    color: #81c784;
}

[data-theme="dark"] .placeholder-bottle {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #0d47a1 100%);
    color: #64b5f6;
}

[data-theme="dark"] .placeholder-herb {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 50%, #e65100 100%);
    color: #ffb74d;
}

[data-theme="dark"] .placeholder-remedy {
    background: linear-gradient(135deg, #880e4f 0%, #c2185b 50%, #880e4f 100%);
    color: #f48fb1;
}

[data-theme="dark"] .placeholder-tincture {
    background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 50%, #4a148c 100%);
    color: #ce93d8;
}

/* Responsive product placeholders */
@media (max-width: 768px) {
    .product-placeholder {
        min-height: 150px;
    }
    
    .placeholder-icon {
        font-size: 2.5rem;
    }
    
    .placeholder-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .product-placeholder {
        min-height: 120px;
    }
    
    .placeholder-icon {
        font-size: 2rem;
        margin-bottom: 5px;
    }
    
    .placeholder-text {
        font-size: 0.7rem;
    }
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    min-height: 50vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    padding: 3rem 2rem;
}

.hero-image img {
    width: 100%;
    height: 50vh;
    object-fit: cover;
    border-radius: 0 0 0 2rem;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Category Cards */
.categories-section {
    background-color: var(--bg-primary);
}

.category-card {
    padding: 2rem 1rem;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.category-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Product Cards */
.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}


.testcard {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

/* Featured badge positioning */
.product-image .badge {
    position: absolute !important;
    top: 0.5rem !important;
    left: 0.5rem !important;
    z-index: 10 !important;
    transform: none !important;
    margin: 0 !important;
}

/* Prevent badge from appearing elsewhere */
.product-card .badge.position-absolute {
    position: absolute !important;
    top: 0.5rem !important;
    left: 0.5rem !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

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

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

.product-price {
    font-weight: 600;
}

.product-actions .btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-actions .btn:hover {
    transform: translateY(-1px);
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.product-card .product-price {
    margin-top: auto;
}

/* Product Grid Alignment - Equal Heights Only */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
}

.product-card .card-title {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.product-card .card-text {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.product-card .product-price {
    margin-bottom: 1rem;
}

.product-card .product-actions {
    margin-top: auto;
}

/* Custom Product Grid System - Guaranteed to Work */
.custom-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.custom-product-col {
    display: block;
    width: 100%;
}

/* Responsive Grid */
@media (min-width: 768px) {
    .custom-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .custom-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Fallback for older browsers */
@supports not (display: grid) {
    .custom-product-grid {
        display: flex;
        flex-wrap: wrap;
        margin: -0.75rem;
    }
    
    .custom-product-col {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0.75rem;
    }
    
    @media (min-width: 768px) {
        .custom-product-col {
            flex: 0 0 33.333333%;
            max-width: 33.333333%;
        }
    }
    
    @media (min-width: 992px) {
        .custom-product-col {
            flex: 0 0 25%;
            max-width: 25%;
        }
    }
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
}

/* Testimonials */
.testimonial-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
}

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

.stars i {
    font-size: 0.9rem;
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Cards */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
}

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

.card-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* Navigation Enhancements */
.navbar {
    background-color: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.dropdown-item {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 40vh;
    }
    
    .hero-content {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-card .card-body {
        padding: 1rem 0.75rem;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .hero-image img {
        height: 40vh;
        border-radius: 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        height: 60px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .testimonial-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow) !important;
}

.rounded-custom {
    border-radius: var(--border-radius-lg) !important;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .mobile-bottom-nav,
    .theme-toggle,
    .btn,
    .navbar {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card,
    .product-card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection styles */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}
