/* Additional Styles for PharmaCare E-commerce */

/* Dark Mode Support */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --info: #06b6d4;

    /* Light theme colors - using softer whites */
    --bg-primary: #fdfdfd;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b871;
    --border: #334155;
    --border-light: #475569;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Global styles update for new design system */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Header and Navigation */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero section with appealing background */
.hero {
    background: linear-gradient(
        135deg,
        #e0f2fe 0%,
        #bae6fd 25%,
        #ddd6fe 75%,
        #e0e7ff 100%
    );
    position: relative;
    padding: 8rem 0 4rem;
    margin-top: 80px;
    overflow: hidden;
    min-height: 500px;
}

/* Add subtle pattern overlay */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 25% 25%,
            rgba(37, 99, 235, 0.1) 2px,
            transparent 3px
        ),
        radial-gradient(
            circle at 75% 75%,
            rgba(16, 185, 129, 0.08) 1px,
            transparent 2px
        );
    background-size: 40px 40px, 60px 60px;
    pointer-events: none;
}

[data-theme="dark"] .hero {
    background: linear-gradient(
        135deg,
        #1e293b 0%,
        #334155 25%,
        #475569 75%,
        #334155 100%
    );
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Desktop: show search normally */
@media (min-width: 769px) {
    .search-toggle {
        display: none !important;
    }

    .search-container {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

.search-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 0.75rem;
    width: 250px;
    min-width: 0;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* Mobile search toggle button */
.search-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.search-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cart-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    position: relative;
    min-width: 44px;
    min-height: 44px;
}

.cart-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cart-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transform: scale(0);
    transition: all 0.3s ease;
}

.cart-badge.visible {
    transform: scale(1);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    transition: all 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg);
    position: absolute;
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Category Filter - Fixed for dark mode */
.category-filter {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    z-index: 100;
}

.category-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.category-chip {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-chip:hover,
.category-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    transition: all 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg);
    position: absolute;
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Contact Section */
.contact-section {
    background: var(--bg-secondary);
    padding: 6rem 0;
    margin-top: 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.contact-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-details p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.contact-details small {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Contact Form */
.contact-form-container {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section h3 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-input {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.newsletter-input input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.newsletter-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-input .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-certifications {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.certification {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Product Cards Enhancement */
.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.02),
        rgba(16, 185, 129, 0.02)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

/* Category Chips Enhancement */
.category-chip {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-chip:hover,
.category-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    transition: all 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.cart-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

.cart-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cart-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
    color: var(--text-muted);
}

.cart-items {
    margin-bottom: 2rem;
    flex: 1;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid var(--border);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.quantity-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
}

.quantity-display {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 1.5rem;
    text-align: center;
}

.cart-item-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.cart-summary {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-total-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-total-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-checkout {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.cart-checkout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Loading and Animation States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.fade-in {
    opacity: 0;
    animation: fade-in 0.5s ease forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slide-up 0.5s ease forwards;
}

@keyframes slide-up {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .newsletter-form {
        grid-column: 1 / -1;
        margin-top: 2rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile navigation */
    .nav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
        width: 40%;
    }

    .nav-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
        align-items: center;
    }

    /* Hide search container by default on mobile */
    .search-container {
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        background: var(--bg-primary);
        border: 1px solid var(--border);
        border-radius: 0.75rem;
        padding: 1rem;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1001;
        box-shadow: var(--shadow-lg);
        order: 3;
        width: auto;
        margin-top: 0.5rem;
    }

    .search-container.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .search-input {
        width: 100%;
        min-width: 0;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Show search toggle button */
    .search-toggle {
        display: flex;
    }

    /* Adjust button sizes for touch */
    .cart-button,
    .theme-toggle,
    .search-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 0.625rem;
    }

    .cart-button .cart-text {
        display: none;
    }

    /* Header height adjustment */
    .header {
        min-height: auto;
    }

    /* Hero section responsive */
    .hero {
        padding: 6rem 0 3rem;
        margin-top: 80px;
    }

    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        padding: 1rem 2rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* Category filter responsive */
    .category-filter {
        position: relative;
        top: auto;
        margin-bottom: 2rem;
        padding: 1.5rem;
    }

    .category-chips {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .category-chip {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Contact section responsive */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .contact-methods {
        gap: 1rem;
    }

    .contact-method {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .contact-icon {
        align-self: flex-start;
        margin-bottom: 0.5rem;
    }

    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    /* Cart sidebar responsive */
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }

    /* Products grid responsive */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    /* Theme toggle responsive */
    .theme-toggle {
        padding: 0.5rem;
    }

    /* Newsletter responsive */
    .newsletter-input {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-input input {
        min-width: auto;
    }

    .newsletter-input .btn {
        max-width: none;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    .nav {
        padding: 0.75rem 0;
    }

    .hero {
        padding: 5rem 0 2rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .search-input {
        padding: 0.625rem 0.875rem 0.625rem 2.25rem;
        font-size: 0.875rem;
    }

    .contact-methods {
        gap: 0.75rem;
    }

    .contact-method {
        padding: 0.75rem;
    }

    .contact-icon {
        padding: 0.5rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-section h3 {
        font-size: 1.25rem;
    }

    .footer-section h4 {
        font-size: 1rem;
    }

    .certification {
        font-size: 0.6rem;
        padding: 0.375rem 0.75rem;
    }

    .category-filter {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .category-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .category-chips::-webkit-scrollbar {
        display: none;
    }

    .cart-button {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .cart-text {
        display: none;
    }

    .theme-toggle {
        padding: 0.625rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 4rem 0 2rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn {
        width: auto;
        min-width: 150px;
    }
}

/* Container utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1200px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Improved mobile touch targets */
@media (max-width: 768px) {
    .btn,
    .category-chip,
    .cart-button,
    .theme-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    .footer-links a {
        padding: 0.5rem 0;
        display: block;
    }

    .social-link {
        min-width: 44px;
        min-height: 44px;
    }
} /* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles */
.btn:focus,
.theme-toggle:focus,
.cart-button:focus,
.category-chip:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text-muted: #000000;
    }

    [data-theme="dark"] {
        --border: #ffffff;
        --text-muted: #ffffff;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cart-sidebar,
    .theme-toggle,
    .contact-form-container {
        display: none !important;
    }

    .contact-section {
        background: white !important;
        color: black !important;
    }

    .contact-method {
        border: 1px solid #ccc !important;
        background: white !important;
    }
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item.removing {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 2rem;
    text-align: center;
    animation: pulse 0.3s ease-out;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.cart-summary {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.checkout-section {
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--success), var(--secondary));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.checkout-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.checkout-btn:active {
    transform: translateY(0);
}

.payment-notice {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.payment-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Product Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.product-modal {
    background: var(--bg-primary);
    border-radius: 1.5rem;
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.modal-overlay.visible .product-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 1.5rem 1.5rem 0 0;
}

.modal-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 2rem;
}

.modal-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.modal-gallery {
    position: relative;
}

.modal-main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    background: var(--gray-100);
}

.modal-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.modal-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-thumbnail.active,
.modal-thumbnail:hover {
    border-color: var(--primary);
}

.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.modal-meta {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.modal-description {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-add-to-cart {
    flex: 1;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-add-to-cart:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Flying Cart Animation */
.flying-product {
    position: fixed;
    pointer-events: none;
    z-index: 4000;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.search-results.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: var(--gray-100);
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.search-result-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.search-result-price {
    font-weight: 600;
    color: var(--primary);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
}

/* Error States */
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.error-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.retry-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    transition: var(--transition);
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus States */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .cart-sidebar,
    .cart-overlay,
    .modal-overlay,
    .floating-elements {
        display: none !important;
    }

    .hero {
        margin-top: 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --gray-100: #000000;
        --gray-200: #000000;
        --gray-800: #000000;
        --white: #ffffff;
    }

    .product-card,
    .cart-sidebar,
    .search-results {
        border: 2px solid var(--gray-800);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }

    .modal-product-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .search-container {
        order: 3;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-modal {
        width: 95vw;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }
}

/* Additional Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced Micro-interactions */
.btn,
.cart-button,
.add-to-cart-btn,
.category-chip {
    position: relative;
    overflow: hidden;
}

.btn::before,
.cart-button::before,
.add-to-cart-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: var(--transition);
}

.btn:hover::before,
.cart-button:hover::before,
.add-to-cart-btn:hover::before {
    left: 100%;
}

/* Enhanced Loading States */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

/* Success/Error States */
.success-message {
    background: var(--success);
    color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

.error-message {
    background: var(--danger);
    color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    animation: shake 0.5s ease-out;
}
