/* Enhanced Professional Inventory Management System CSS */
/* Fixed Navigation, Button Positioning, Table Readability, and Professional Forms */
/* ADDED: Gallery Search Styles and Email Cell Styling */

:root {
    /* Israeli Blue Color Scheme */
    --md-primary: #0038A8; /* Israeli Blue */
    --md-primary-dark: #002870;
    --md-primary-light: #3366CC;
    --md-secondary: #03dac6;
    --md-background: #fafafa;
    --md-surface: #ffffff;
    --md-error: #dc3545;
    --md-warning: #ff9800;
    --md-success: #28a745;
    --md-info: #17a2b8;
    --md-on-primary: #ffffff;
    --md-on-secondary: #000000;
    --md-on-background: #000000;
    --md-on-surface: #000000;
    --md-text-primary: #212529;
    --md-text-secondary: #6c757d;
    --md-divider: #e9ecef;

    /* Enhanced Shadows */
    --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 1.25rem 3rem rgba(0, 0, 0, 0.175);
    --shadow-xl: 0 1.5rem 4rem rgba(0, 0, 0, 0.2);

    /* Updated Gradients with Israeli Blue */
    --gradient-primary: linear-gradient(135deg, #0038A8 0%, #003d82 100%);
    --gradient-success: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

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

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--md-text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* FIXED NAVIGATION WITH PROPER BUTTON POSITIONING */
.navbar {
    background: var(--gradient-primary);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo i {
    font-size: 2rem;
    background: linear-gradient(45deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Logo image styling */
.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 8px;
}

/* FIXED NAVIGATION MENU - BETTER SPACING AND POSITIONING */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    margin: 0 auto;
    padding: 0;
    flex-grow: 1;
    justify-content: center;
    max-width: 600px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 12px 18px;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.95rem;
    display: block;
}

.nav-link::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: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.admin-link {
    background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
    box-shadow: var(--shadow);
}

/* FIXED USER AUTHENTICATION SECTION */
.nav-user,
.login-btn {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.user-role {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.material-icon {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.material-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Enhanced Content Spacing */
.material-content {
    padding: 60px 0;
    background: var(--md-background);
}

/* Enhanced Features Section */
.features-section,
.quick-actions-section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--md-text-primary);
    margin-bottom: 20px;
            letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--md-text-primary) 0%, var(--md-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--md-text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
}

.feature-card {
    background: white;
    padding: 40px 32px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow);
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 16px;
}

.feature-description {
    font-size: 1rem;
    color: var(--md-text-secondary);
    line-height: 1.7;
}

/* Enhanced Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.action-card {
    background: white;
    padding: 36px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.action-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.action-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.action-icon i {
    font-size: 1.8rem;
    color: white;
}

.action-content {
    margin-bottom: 24px;
}

.action-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 12px;
}

.action-description {
    font-size: 1rem;
    color: var(--md-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Enhanced Customer Stats */
.material-customer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.customer-stat-card {
    background: white;
    padding: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

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

.stat-icon-customer {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow-sm);
}

.stat-content-customer {
    flex: 1;
}

.stat-number-customer {
    font-size: 2rem;
    font-weight: 700;
    color: var(--md-text-primary);
    line-height: 1;
    margin-bottom: 6px;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.stat-label-customer {
    font-size: 0.9rem;
    color: var(--md-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Gallery Container */
.material-gallery-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 48px;
}

.gallery-header-material {
    padding: 36px;
    border-bottom: 1px solid #f1f3f4;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gallery-title-material {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.gallery-subtitle-material {
    color: var(--md-text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.gallery-footer-material {
    padding: 20px 36px;
    border-top: 1px solid #f1f3f4;
    background: #f8f9fa;
}

.gallery-note {
    color: var(--md-text-secondary);
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-style: italic;
}

/* Enhanced Fallback Airtable */
.airtable-fallback {
    margin-top: 40px;
}

.airtable-fallback-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 50px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.airtable-fallback-content {
    max-width: 500px;
    margin: 0 auto;
}

.airtable-fallback-content i {
    font-size: 4rem;
    color: var(--md-primary);
    margin-bottom: 25px;
    opacity: 0.7;
}

.airtable-fallback-content h4 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 15px;
}

.airtable-fallback-content p {
    color: var(--md-text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.material-button-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: none;
    cursor: pointer;
}

.material-button-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.material-button-outlined {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: white;
    color: var(--md-primary);
    text-decoration: none;
    border: 2px solid var(--md-primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.material-button-outlined:hover {
    background: var(--md-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Enhanced Authentication */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    margin: 20px;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-tabs {
    display: flex;
    background: #f8f9fa;
}

.auth-tab-btn {
    flex: 1;
    padding: 18px;
    border: none;
    background: transparent;
    color: var(--md-text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab-btn.active {
    color: var(--md-primary);
    background: white;
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--md-primary);
    border-radius: 2px;
}

.auth-tab-content {
    display: none;
    padding: 40px;
}

.auth-tab-content.active {
    display: block;
}

.auth-tab-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    text-align: center;
}

.auth-form {
    display: grid;
    gap: 24px;
}

.auth-input-group {
    position: relative;
}

.auth-input-group label {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.auth-input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.auth-input-group input:focus {
    outline: none;
    border-color: var(--md-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

.auth-btn-primary {
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.auth-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.auth-btn-primary:active {
    transform: translateY(-1px);
}

.auth-demo-info {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 12px;
    border-left: 4px solid var(--md-primary);
}

/* Enhanced Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 80px 0 30px 0;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Mobile Menu - FIXED */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Enhanced Notifications */
.material-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: white;
    color: var(--md-text-primary);
    padding: 20px 28px;
    border-radius: 15px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--md-primary);
}

.material-notification.show {
    transform: translateX(0);
}

.material-notification.success {
    border-left-color: var(--md-success);
}

.material-notification.error {
    border-left-color: var(--md-error);
}

.material-notification.warning {
    border-left-color: var(--md-warning);
}

.notification-icon {
    font-size: 1.5rem;
    color: var(--md-primary);
}

.notification-content {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--md-text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.notification-close:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
}

/* Enhanced Empty States */
.empty-state-professional,
.error-state-professional {
    padding: 80px 40px;
    text-align: center;
    color: var(--md-text-secondary);
}

.empty-state-professional .empty-icon,
.error-state-professional .error-icon {
    font-size: 5rem;
    color: var(--md-text-secondary);
    opacity: 0.5;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state-professional h3,
.error-state-professional h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--md-text-primary);
    margin-bottom: 12px;
}

.empty-state-professional p,
.error-state-professional p {
    margin-bottom: 32px;
    font-size: 1.1rem;
}

/* Enhanced Loading Spinner */
.loading-state {
    padding: 80px 40px;
    text-align: center;
    color: var(--md-text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f1f3f4;
    border-top: 4px solid var(--md-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 32px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Inventory Statistics Professional */
.inventory-statistics-professional {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.stats-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    min-width: 150px;
}

.stats-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stats-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    font-family: 'SF Mono', 'Monaco', monospace;
}

.stats-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--md-text-primary);
}

.stats-label {
    font-size: 0.8rem;
    color: var(--md-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design - IMPROVED */
    @media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 15px 15px;
        gap: 0;
        margin: 0;
        justify-content: flex-start;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: 15px 30px;
        border-radius: 0;
        margin: 5px 20px;
        border-radius: 10px;
        font-size: 1rem;
    }
    
    .nav-user {
        position: relative;
        z-index: 1002;
    }
    
    .login-btn {
        position: relative;
        z-index: 1002;
    }
    
    .professional-table {
        font-size: 0.8rem;
    }
    
    .professional-table th,
    .professional-table td {
        padding: 12px 8px;
    }
    
    /* FIXED: Mobile photo sizes */
    .photo-container-professional,
    .photo-container,
    .no-photo {
        width: 50px !important;
        height: 50px !important;
    }
    
    .photo-cell {
        width: 60px !important;
        min-width: 60px;
        max-width: 60px;
        padding: 6px !important;
    }
    
    .professional-table img,
    table img,
    .product-photo,
    .product-photo-professional {
        width: 50px !important;
        height: 50px !important;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .professional-action-btn {
        min-width: 32px;
        height: 32px;
        padding: 6px 8px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .material-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .material-customer-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .search-input-professional {
        min-width: auto;
    }
    
    .action-section {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .material-notification {
        left: 15px;
        right: 15px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .material-notification.show {
        transform: translateY(0);
    }

    .inventory-statistics-professional {
        flex-direction: column;
        gap: 15px;
    }

    /* Gallery search responsive */
    .gallery-search-container {
        padding: 15px;
        margin-top: 15px;
    }

    .gallery-search-results {
        max-height: 300px;
    }

    .search-result-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .result-image {
        align-self: center;
    }

    .result-header {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .result-meta {
        justify-content: center;
        gap: 15px;
    }
}

    @media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-logo span {
        display: none;
    }
    
    .professional-table th,
    .professional-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .container {
        padding: 0 16px;
    }
    
    .hero-section {
        padding: 80px 0 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .material-header {
        padding: 60px 0;
    }
    
    .material-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }

    /* FIXED: Extra small mobile photo sizes */
    .photo-container-professional,
    .photo-container,
    .no-photo {
        width: 45px !important;
        height: 45px !important;
    }
    
    .photo-cell {
        width: 55px !important;
        min-width: 55px;
        max-width: 55px;
        padding: 4px !important;
    }
    
    .professional-table img,
    table img,
    .product-photo,
    .product-photo-professional {
        width: 45px !important;
        height: 45px !important;
    }

    /* Gallery search mobile */
    .gallery-search-input {
        font-size: 0.9rem;
        padding: 12px 18px 12px 45px;
    }

    .search-results-header {
        padding: 10px 15px;
    }

    .search-result-item {
        padding: 12px 15px;
    }

    .result-title {
        font-size: 0.9rem;
    }

    .result-stock-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

/* Print Styles */
@media print {
    .gallery-search-container,
    .gallery-search-results,
    .professional-action-btn,
    .hamburger,
    .nav-user,
    .login-btn,
    .logout-btn {
        display: none !important;
    }
    
    .professional-inventory-container {
        box-shadow: none !important;
    }
    
    .professional-table {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* Focus indicators for accessibility */
.gallery-search-input:focus-visible,
.search-field:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

.search-result-item:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
    background: #f0f8ff;
}

/* Loading states for gallery search */
.gallery-search-results.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Enhanced Gallery View Toggle Styles */
.view-toggle {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 4px;
    box-shadow: var(--shadow-sm);
    border: 2px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.view-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    background: var(--gradient-primary);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    left: 4px;
}

.view-toggle:has(.view-btn:last-child.active)::before {
    left: calc(50% + 0px);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--md-text-secondary);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    flex: 1;
    justify-content: center;
}

.view-btn:hover {
    color: var(--md-primary);
}

.view-btn.active {
    color: white;
}

.view-btn i {
    font-size: 1.1rem;
}

/* Enhanced Professional Inventory Management System CSS */
/* ENHANCED: Added comprehensive photo editing styles for admin edit modal */

/* NEW: Photo Editing Section Styles */
.photo-editing-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
    border-left: 4px solid var(--md-primary);
}

.photo-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.photo-section-title i {
    color: var(--md-primary);
    font-size: 1.5rem;
}

.photo-edit-group {
    margin-bottom: 25px;
}

.photo-edit-label {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 1rem;
    margin-bottom: 12px;
    display: block;
}

.photo-edit-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.photo-edit-container:hover {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
}

/* Photo Preview in Edit Modal */
.photo-preview-edit {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.photo-preview-edit:hover {
    border-color: var(--md-primary);
    background: rgba(0, 56, 168, 0.02);
}

.photo-placeholder-edit {
    text-align: center;
    color: var(--md-text-secondary);
    padding: 20px;
}

.photo-placeholder-edit i {
    font-size: 2.5rem;
    color: var(--md-primary);
    margin-bottom: 10px;
    opacity: 0.7;
    display: block;
}

.photo-placeholder-edit span {
    font-size: 1rem;
    font-weight: 500;
}

.edit-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.edit-photo-image:hover {
    transform: scale(1.02);
}

/* Remove Photo Button in Edit Modal */
.remove-photo-btn-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    z-index: 5;
}

.remove-photo-btn-edit:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.remove-photo-btn-edit i {
    font-size: 1.2rem;
}

/* Add Photo Button */
.photo-edit-actions {
    display: flex;
    justify-content: center;
}

.add-photo-btn-edit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
}

.add-photo-btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.add-photo-btn-edit i {
    font-size: 1.2rem;
}

/* Photo Removal Confirmation */
.photo-remove-confirmation {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-top: 15px;
    animation: slideDown 0.3s ease;
}

.photo-remove-confirmation p {
    font-weight: 600;
    color: var(--md-text-primary);
    margin-bottom: 15px;
    font-size: 1rem;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-remove-yes,
.confirm-remove-no {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 80px;
}

.confirm-remove-yes {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.confirm-remove-yes:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.confirm-remove-no {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.confirm-remove-no:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
}

/* Add Photo Options Modal */
.photo-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.photo-options-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-options-content h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.photo-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit-camera-btn,
.edit-upload-btn,
.cancel-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-height: 50px;
}

.edit-camera-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.edit-upload-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.edit-upload-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1da88a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cancel-photo-btn {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.cancel-photo-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-1px);
}

.edit-camera-btn i,
.edit-upload-btn i,
.cancel-photo-btn i {
    font-size: 1.3rem;
}

/* Enhanced Edit Modal Styles */
.modal-professional {
    max-width: 900px; /* Increased for photo editing */
}

.edit-form-professional {
    display: grid;
    gap: 30px; /* Increased gap for photo sections */
}

/* Enhanced Form Grid for Photo Editing */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px; /* Add space after photo editing section */
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Enhanced Photo Container Styles */
.photo-container,
.photo-container-professional {
    width: 64px !important;
    height: 64px !important;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid #e9ecef;
    margin: 0 auto;
    flex-shrink: 0;
    flex-grow: 0;
    transition: all 0.3s ease;
}

.photo-container:hover,
.photo-container-professional:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.product-photo,
.product-photo-professional {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 8px;
}

.no-photo {
    width: 64px !important;
    height: 64px !important;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-text-secondary);
    font-size: 1.5rem;
    border: 2px dashed #dee2e6;
    margin: 0 auto;
    flex-shrink: 0;
    flex-grow: 0;
}

/* Enhanced Camera Modal for Edit Mode */
#edit-camera-modal {
    z-index: 10002; /* Higher than regular edit modal */
}

#edit-camera-modal .camera-modal-content {
    max-width: 700px;
    width: 95%;
}

#edit-camera-modal .camera-video {
    border: 3px solid var(--md-primary);
    border-radius: 15px;
}

#edit-camera-modal .camera-controls {
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

#edit-camera-modal .capture-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 160px;
}

#edit-camera-modal .capture-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

#edit-camera-modal .cancel-btn {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 120px;
}

#edit-camera-modal .cancel-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
}

/* Enhanced Animation Keyframes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

/* CAMERA AND PHOTO EDITING STYLES - ADD THESE TO YOUR EXISTING styles.css */
/* These are ONLY the new/updated styles for camera and photo functionality */

/* FIXED: Enhanced Camera Modal Styles - COMPLETE INTEGRATION */

/* Main Camera Modal */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.camera-modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.camera-modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.camera-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.close-camera-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-camera-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.camera-container {
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background: #f8f9fa;
    flex: 1;
    min-height: 400px;
    position: relative;
}

.camera-video {
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 15px;
    border: 3px solid var(--md-primary);
    box-shadow: var(--shadow-lg);
    background: #000;
    object-fit: cover;
    display: none;
}

.camera-error {
    display: none;
    text-align: center;
    color: var(--md-text-secondary);
    padding: 40px;
    background: white;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
    box-shadow: var(--shadow-sm);
}

.camera-error h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 12px;
}

.camera-error p {
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.permission-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.permission-request-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.camera-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

.camera-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 140px;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.camera-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.capture-btn {
    background: var(--gradient-primary);
    color: white;
}

.capture-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cancel-btn {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.cancel-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-1px);
}

/* FIXED: Edit Camera Modal INSIDE Edit Modal - Enhanced Styles */
.camera-modal-inner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10003; /* Higher than edit modal */
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.camera-modal-content-inner {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 750px;
    max-height: 85vh;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    border: 3px solid var(--md-primary);
}

.camera-modal-header-inner {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.camera-modal-header-inner h3 {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.edit-close-camera-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-close-camera-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.camera-container-inner {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    flex: 1;
    min-height: 350px;
    position: relative;
}

.camera-video-inner {
    width: 100%;
    max-width: 600px;
    height: auto;
    min-height: 300px;
    border-radius: 12px;
    border: 3px solid var(--md-primary);
    box-shadow: var(--shadow-lg);
    background: #000;
    object-fit: cover;
    display: none;
}

.camera-error-inner {
    display: none;
    text-align: center;
    color: var(--md-text-secondary);
    padding: 32px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 400px;
}

.camera-error-inner h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 10px;
}

.camera-error-inner p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.permission-request-btn-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.permission-request-btn-inner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.camera-controls-inner {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

.camera-btn-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 120px;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.camera-btn-inner:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.capture-btn-inner {
    background: var(--gradient-primary);
    color: white;
}

.capture-btn-inner:hover:not(:disabled) {
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cancel-btn-inner {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.cancel-btn-inner:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-1px);
}

/* FIXED: Enhanced Photo Editing Section Styles */
.photo-editing-section-enhanced {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    border: 2px solid #e9ecef;
    border-left: 4px solid var(--md-primary);
    box-shadow: var(--shadow-sm);
}

.photo-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.photo-section-title i {
    color: var(--md-primary);
    font-size: 1.6rem;
}

.photo-edit-group-enhanced {
    margin-bottom: 30px;
}

.photo-edit-label {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: block;
}

.photo-edit-container-enhanced {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.photo-edit-container-enhanced:hover {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

/* FIXED: Enhanced Photo Preview with Perfect Image Display */
.photo-preview-enhanced {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.photo-preview-enhanced:hover {
    border-color: var(--md-primary);
    background: rgba(0, 56, 168, 0.02);
}

.photo-placeholder-enhanced {
    text-align: center;
    color: var(--md-text-secondary);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.photo-placeholder-enhanced i {
    font-size: 2.5rem;
    color: var(--md-primary);
    margin-bottom: 10px;
    opacity: 0.7;
    display: block;
}

.photo-placeholder-enhanced span {
    font-size: 1rem;
    font-weight: 500;
}

/* FIXED: Perfect Image Display in Edit Modal */
.edit-photo-image-enhanced {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 10px;
    transition: transform 0.3s ease;
    display: block;
}

.edit-photo-image-enhanced:hover {
    transform: scale(1.02);
}

/* FIXED: Enhanced Remove Photo Button */
.remove-photo-btn-edit-enhanced {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.remove-photo-btn-edit-enhanced:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.remove-photo-btn-edit-enhanced i {
    font-size: 1.3rem;
}

/* Enhanced Add Photo Button */
.add-photo-btn-edit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-size: 1rem;
    width: 100%;
    justify-content: center;
}

.add-photo-btn-edit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
}

.add-photo-btn-edit i {
    font-size: 1.3rem;
}

/* FIXED: Photo Removal Confirmation Modal */
.photo-remove-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    animation: fadeIn 0.3s ease;
}

.photo-remove-confirmation-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.photo-remove-confirmation-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.photo-remove-confirmation-content h4 i {
    color: var(--md-warning);
    font-size: 1.8rem;
}

.photo-remove-confirmation-content p {
    font-size: 1.1rem;
    color: var(--md-text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.photo-remove-confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-remove-yes-btn,
.confirm-remove-no-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
    box-shadow: var(--shadow-sm);
}

.confirm-remove-yes-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.confirm-remove-yes-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.confirm-remove-no-btn {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.confirm-remove-no-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-1px);
}

/* FIXED: Photo Options Modal */
.photo-options-modal-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.photo-options-content-enhanced {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.photo-options-content-enhanced h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--md-text-primary) 0%, var(--md-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.photo-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-camera-btn-enhanced,
.edit-upload-btn-enhanced,
.cancel-photo-btn-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 28px;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-height: 55px;
    box-shadow: var(--shadow-sm);
}

.edit-camera-btn-enhanced {
    background: var(--gradient-primary);
    color: white;
}

.edit-camera-btn-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
}

.edit-upload-btn-enhanced {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.edit-upload-btn-enhanced:hover {
    background: linear-gradient(135deg, #218838 0%, #1da88a 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.cancel-photo-btn-enhanced {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.cancel-photo-btn-enhanced:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-2px);
}

.edit-camera-btn-enhanced i,
.edit-upload-btn-enhanced i,
.cancel-photo-btn-enhanced i {
    font-size: 1.4rem;
}

/* FIXED: Enhanced Photo Container Styles for Tables */
/* FIXED: Enhanced photo containers with proper sizing and image fitting */
.photo-container-enhanced,
.photo-container-professional {
    width: 90px !important;
    height: 90px !important;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid #e9ecef;
    margin: 0 auto;
    flex-shrink: 0;
    flex-grow: 0;
    transition: all 0.3s ease;
    position: relative;
}

.photo-container-enhanced:hover,
.photo-container-professional:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
    border-color: var(--md-primary);
}

/* FIXED: Product photos with full coverage and proper object-fit */
.product-photo-enhanced,
.product-photo-professional {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block !important;
    border-radius: 12px;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-photo-enhanced:hover,
.product-photo-professional:hover {
    transform: scale(1.02);
}

/* FIXED: Remove extra text and formatting issues - COMPREHENSIVE FIX */
.photo-container-enhanced::after,
.photo-container-professional::after,
.photo-container-enhanced::before,
.photo-container-professional::before {
    display: none !important;
    content: none !important;
}

/* Hide any stray text elements, arrows, and unwanted content */
.photo-cell > *:not(.photo-container-enhanced):not(.photo-container-professional):not(.no-photo) {
    display: none !important;
}

.photo-cell::after,
.photo-cell::before {
    display: none !important;
    content: none !important;
}

/* Remove any text nodes that appear after images */
.photo-cell {
    font-size: 0 !important;
    line-height: 0 !important;
}

.photo-cell > .photo-container-enhanced,
.photo-cell > .photo-container-professional,
.photo-cell > .no-photo {
    font-size: initial !important;
    line-height: initial !important;
}

/* Ensure no text content leaks through */
.photo-container-enhanced > *:not(img),
.photo-container-professional > *:not(img) {
    display: none !important;
}

/* FIXED: Photo Cell Sizing in Tables */
.photo-cell {
    width: 110px !important;
    min-width: 110px;
    max-width: 110px;
    text-align: center;
    vertical-align: middle;
    padding: 10px !important;
}

/* RESPONSIVE ADJUSTMENTS FOR CAMERA AND PHOTO FEATURES */
@media (max-width: 768px) {
    /* Camera modal responsive */
    .camera-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 85vh;
    }
    
    .camera-modal-content-inner {
        width: 95%;
        margin: 10px;
        max-height: 80vh;
    }
    
    .camera-container,
    .camera-container-inner {
        padding: 20px;
        min-height: 300px;
    }
    
    .camera-video,
    .camera-video-inner {
        max-width: 100%;
        min-height: 250px;
    }
    
    .camera-controls,
    .camera-controls-inner {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    
    .camera-btn,
    .camera-btn-inner {
        width: 100%;
        min-width: auto;
    }
    
    /* Photo editing responsive */
    .photo-editing-section-enhanced {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    .photo-section-title {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .photo-edit-container-enhanced {
        padding: 20px;
    }
    
    .photo-preview-enhanced {
        height: 200px;
    }
    
    .photo-options-content-enhanced {
        padding: 30px;
        margin: 20px;
    }
    
    /* Photo containers responsive */
    .photo-container-enhanced,
    .photo-container-professional {
        width: 75px !important;
        height: 75px !important;
    }
    
    .photo-cell {
        width: 95px !important;
        min-width: 95px;
        max-width: 95px;
        padding: 8px !important;
    }
}

@media (max-width: 480px) {
    /* Extra small camera adjustments */
    .camera-modal-content,
    .camera-modal-content-inner {
        margin: 5px;
        border-radius: 15px;
    }
    
    .camera-modal-header,
    .camera-modal-header-inner {
        padding: 15px 20px;
    }
    
    .camera-modal-header h3,
    .camera-modal-header-inner h3 {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .camera-container,
    .camera-container-inner {
        padding: 15px;
        min-height: 250px;
    }
    
    .camera-video,
    .camera-video-inner {
        min-height: 200px;
        border-width: 2px;
    }
    
    /* Extra small photo editing */
    .photo-editing-section-enhanced {
        padding: 20px;
        border-left-width: 3px;
    }
    
    .photo-preview-enhanced {
        height: 180px;
        margin-bottom: 12px;
    }
    
    .photo-placeholder-enhanced {
        padding: 15px;
    }
    
    .photo-placeholder-enhanced i {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    /* Extra small photo containers */
    .photo-container-enhanced,
    .photo-container-professional {
        width: 65px !important;
        height: 65px !important;
        border-radius: 12px;
    }
    
    .photo-cell {
        width: 85px !important;
        min-width: 85px;
        max-width: 85px;
        padding: 6px !important;
    }
}

.photo-mode-toggle-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid var(--md-primary);
    border-left: 6px solid var(--md-primary);
    box-shadow: var(--shadow);
}
.photo-mode-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: center;
    justify-content: center;
}

.photo-mode-title i {
    color: var(--md-primary);
    font-size: 1.6rem;
}

.photo-mode-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toggle-photo-mode-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: var(--md-text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 180px;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.toggle-photo-mode-btn:hover {
    background: #f8f9fa;
    border-color: var(--md-primary);
    color: var(--md-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.toggle-photo-mode-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--md-primary);
    box-shadow: var(--shadow);
}

.toggle-photo-mode-btn.active:hover {
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.toggle-photo-mode-btn i {
    font-size: 1.3rem;
}

.photo-mode-description {
    text-align: center;
    color: var(--md-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

/* Airtable Photo Editing Section */
.airtable-photo-editing-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    border: 2px solid #007acc;
    border-left: 6px solid #007acc;
    box-shadow: var(--shadow);
}

.airtable-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: center;
    justify-content: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #b3d9ff;
}

.airtable-section-title i {
    color: #007acc;
    font-size: 1.6rem;
}

/* Airtable Embed Container */
.airtable-embed-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Airtable Loading State */
.airtable-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: 15px;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.airtable-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f3f4;
    border-top: 4px solid #007acc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.airtable-loading p {
    color: var(--md-text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    text-align: center;
}

/* Airtable Embed Error */
.airtable-embed-error {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    display: none;
}

.airtable-error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.airtable-error-content i {
    font-size: 3rem;
    color: #e67e22;
    margin-bottom: 10px;
}

.airtable-error-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin: 0;
}

.airtable-error-content p {
    color: var(--md-text-secondary);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.airtable-error-content ul {
    text-align: left;
    color: var(--md-text-secondary);
    margin: 10px 0;
    padding-left: 20px;
}

.airtable-error-content li {
    margin-bottom: 5px;
}

.airtable-error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Airtable Embed Iframe */
#airtable-photo-editor {
    border: 3px solid var(--md-primary);
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

#airtable-photo-editor:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* Airtable Embed Controls */
.airtable-embed-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.refresh-airtable-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #007acc 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.refresh-airtable-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.airtable-embed-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--md-text-secondary);
    font-size: 0.9rem;
    flex: 1;
    min-width: 250px;
}

.airtable-embed-info i {
    color: #007acc;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Enhanced Photo Mode Integration */
#camera-photo-section {
    transition: all 0.3s ease;
}

#airtable-photo-section {
    transition: all 0.3s ease;
}

/* Enhanced Modal Layout for Airtable */
.modal-professional {
    max-width: 1000px; /* Increased width for Airtable embed */
}

.modal-body {
    max-height: 80vh; /* Increased height for embed */
}

/* Responsive Design for Airtable Integration */
@media (max-width: 768px) {
    .photo-mode-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .toggle-photo-mode-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .airtable-photo-editing-section {
        padding: 25px;
    }
    
    .airtable-section-title {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .airtable-embed-container {
        padding: 20px;
        min-height: 350px;
    }
    
    #airtable-photo-editor {
        height: 500px !important;
    }
    
    .airtable-embed-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .airtable-embed-info {
        text-align: center;
        min-width: auto;
    }
    
    .refresh-airtable-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-professional {
        max-width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .photo-mode-toggle-section {
        padding: 20px;
    }
    
    .photo-mode-title {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .photo-mode-description {
        font-size: 0.85rem;
    }
    
    .airtable-photo-editing-section {
        padding: 20px;
    }
    
    .airtable-section-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .airtable-embed-container {
        padding: 15px;
        min-height: 300px;
    }
    
    #airtable-photo-editor {
        height: 400px !important;
        border-width: 2px;
    }
    
    .airtable-loading p {
        font-size: 1rem;
    }
    
    .airtable-error-content {
        gap: 12px;
    }
    
    .airtable-error-content h4 {
        font-size: 1.1rem;
    }
    
    .airtable-error-content p {
        font-size: 0.9rem;
    }
    
    .airtable-error-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .refresh-airtable-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .airtable-embed-info {
        font-size: 0.8rem;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .airtable-photo-editing-section {
        border-width: 3px;
    }
    
    .toggle-photo-mode-btn {
        border-width: 3px;
    }
    
    .toggle-photo-mode-btn.active {
        border-color: #000;
    }
    
    #airtable-photo-editor {
        border-width: 4px;
        border-color: #000;
    }
    
    .airtable-embed-container {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .airtable-photo-editing-section,
    #airtable-photo-editor,
    .toggle-photo-mode-btn,
    .refresh-airtable-btn,
    .airtable-embed-container {
        animation: none;
        transition: none;
    }
    
    .toggle-photo-mode-btn:hover,
    .refresh-airtable-btn:hover,
    #airtable-photo-editor:hover {
        transform: none;
    }
    
    .airtable-loading .loading-spinner {
        animation: none;
        border-top-color: #007acc;
    }
}

/* Print Styles */
@media print {
    .photo-mode-toggle-section,
    .airtable-photo-editing-section,
    .airtable-embed-container,
    .airtable-embed-controls,
    .toggle-photo-mode-btn,
    .refresh-airtable-btn {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .photo-mode-toggle-section {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
    }
    
    .airtable-photo-editing-section {
        background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
        border-color: #2c5282;
    }
    
    .airtable-embed-container {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .toggle-photo-mode-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .toggle-photo-mode-btn:hover {
        background: #4a5568;
        color: #f7fafc;
    }
    
    .airtable-embed-controls {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
    }
    
    .airtable-embed-info {
        color: #a0aec0;
    }
    
    .airtable-loading {
        background: rgba(26, 32, 44, 0.95);
    }
    
    .airtable-loading p {
        color: #e2e8f0;
    }
}

/* Focus States for Accessibility */
.toggle-photo-mode-btn:focus-visible,
.refresh-airtable-btn:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

#airtable-photo-editor:focus-visible {
    outline: 3px solid var(--md-primary);
    outline-offset: 2px;
}

/* Enhanced Photo Editing Styles (if not already in your styles.css) */
.photo-editing-section-enhanced {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    border: 2px solid #e9ecef;
    border-left: 4px solid var(--md-primary);
    box-shadow: var(--shadow-sm);
}

.photo-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.photo-section-title i {
    color: var(--md-primary);
    font-size: 1.6rem;
}

.photo-edit-group-enhanced {
    margin-bottom: 30px;
}

.photo-edit-label {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: block;
}

.photo-edit-container-enhanced {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.photo-edit-container-enhanced:hover {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

.photo-preview-enhanced {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.photo-preview-enhanced:hover {
    border-color: var(--md-primary);
    background: rgba(0, 56, 168, 0.02);
}

.photo-placeholder-enhanced {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--md-text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding: 10px;
}

.photo-placeholder-enhanced i {
    font-size: 2rem;
    color: var(--md-primary);
    margin-bottom: 8px;
    opacity: 0.7;
}

.photo-placeholder-enhanced span {
    font-weight: 500;
    line-height: 1.2;
}

.edit-photo-image-enhanced {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 10px;
    transition: transform 0.3s ease;
    display: block;
}

.edit-photo-image-enhanced:hover {
    transform: scale(1.02);
}

.remove-photo-btn-edit-enhanced {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.remove-photo-btn-edit-enhanced:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.remove-photo-btn-edit-enhanced i {
    font-size: 1.3rem;
}

.add-photo-btn-edit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-size: 1rem;
    width: 100%;
    justify-content: center;
}

.add-photo-btn-edit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
}

.add-photo-btn-edit i {
    font-size: 1.3rem;
}

/* Enhanced Photo Modal Styles */
.photo-options-modal-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.photo-options-content-enhanced {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.photo-options-content-enhanced h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--md-text-primary) 0%, var(--md-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.photo-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-camera-btn-enhanced,
.edit-upload-btn-enhanced,
.cancel-photo-btn-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 28px;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-height: 55px;
    box-shadow: var(--shadow-sm);
}

.edit-camera-btn-enhanced {
    background: var(--gradient-primary);
    color: white;
}

.edit-camera-btn-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
}

.edit-upload-btn-enhanced {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.edit-upload-btn-enhanced:hover {
    background: linear-gradient(135deg, #218838 0%, #1da88a 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.cancel-photo-btn-enhanced {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.cancel-photo-btn-enhanced:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-2px);
}

.edit-camera-btn-enhanced i,
.edit-upload-btn-enhanced i,
.cancel-photo-btn-enhanced i {
    font-size: 1.4rem;
}

/* Enhanced Photo Container Styles for Tables */
.photo-container-enhanced,
.photo-container-professional {
    width: 90px !important;
    height: 90px !important;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid #e9ecef;
    margin: 0 auto;
    flex-shrink: 0;
    flex-grow: 0;
    transition: all 0.3s ease;
    position: relative;
}

.photo-container-enhanced:hover,
.photo-container-professional:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
    border-color: var(--md-primary);
}

.product-photo-enhanced,
.product-photo-professional {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 12px;
}

.product-photo-enhanced:hover,
.product-photo-professional:hover {
    transform: scale(1.02);
}

/* Photo Cell Sizing in Tables */
.photo-cell {
    width: 110px !important;
    min-width: 110px;
    max-width: 110px;
    text-align: center;
    vertical-align: middle;
    padding: 10px !important;
}



/* Enhanced Responsive Design for Photo Editing */
@media (max-width: 768px) {
    .photo-editing-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .photo-section-title {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .photo-edit-container {
        padding: 15px;
    }
    
    .photo-preview-edit {
        height: 150px;
    }
    
    .photo-placeholder-edit i {
        font-size: 2rem;
    }
    
    .confirmation-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .confirm-remove-yes,
    .confirm-remove-no {
        width: 100%;
        padding: 12px;
    }
    
    .photo-options-content {
        padding: 20px;
        margin: 20px;
    }
    
    .photo-option-buttons {
        gap: 10px;
    }
    
    .edit-camera-btn,
    .edit-upload-btn,
    .cancel-photo-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    #edit-camera-modal .camera-modal-content {
        width: 95%;
        margin: 20px 10px;
        padding: 15px;
    }
    
    #edit-camera-modal .camera-video {
        height: 250px;
    }
    
    #edit-camera-modal .camera-controls {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    
    #edit-camera-modal .capture-btn,
    #edit-camera-modal .cancel-btn {
        width: 100%;
        min-width: auto;
    }
    
    /* Make modal responsive */
    .modal-professional {
        max-width: 95%;
        margin: 20px 10px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .photo-editing-section {
        padding: 15px;
        border-left-width: 3px;
    }
    
    .photo-section-title {
        font-size: 1rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .photo-edit-group {
        margin-bottom: 20px;
    }
    
    .photo-edit-label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .photo-preview-edit {
        height: 120px;
        margin-bottom: 12px;
    }
    
    .photo-placeholder-edit {
        padding: 15px;
    }
    
    .photo-placeholder-edit i {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .photo-placeholder-edit span {
        font-size: 0.9rem;
    }
    
    .remove-photo-btn-edit {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    
    .remove-photo-btn-edit i {
        font-size: 1rem;
    }
    
    .add-photo-btn-edit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .photo-options-content {
        padding: 15px;
        margin: 15px;
    }
    
    .photo-options-content h4 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .edit-camera-btn,
    .edit-upload-btn,
    .cancel-photo-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 45px;
    }
    
    .edit-camera-btn i,
    .edit-upload-btn i,
    .cancel-photo-btn i {
        font-size: 1.1rem;
    }
    
    #edit-camera-modal .camera-modal-content {
        margin: 10px;
        padding: 10px;
    }
    
    #edit-camera-modal .camera-video {
        height: 200px;
        border-width: 2px;
    }
    
    #edit-camera-modal .camera-controls {
        padding: 12px;
        gap: 10px;
    }
    
    #edit-camera-modal .capture-btn,
    #edit-camera-modal .cancel-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Enhanced Loading States for Photo Operations */
.photo-edit-container.loading {
    position: relative;
    pointer-events: none;
}

.photo-edit-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.photo-edit-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--md-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States for Photo Operations */
.photo-edit-container.success {
    border-color: var(--md-success);
    background: rgba(40, 167, 69, 0.05);
}

.photo-edit-container.error {
    border-color: var(--md-error);
    background: rgba(220, 53, 69, 0.05);
}

.photo-edit-container.success::after {
    content: '✓';
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--md-success);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    z-index: 5;
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Enhanced Focus States for Accessibility */
.add-photo-btn-edit:focus-visible,
.edit-camera-btn:focus-visible,
.edit-upload-btn:focus-visible,
.cancel-photo-btn:focus-visible,
.confirm-remove-yes:focus-visible,
.confirm-remove-no:focus-visible,
.remove-photo-btn-edit:focus-visible {
    outline: 2px solid var(--md-primary);
    outline-offset: 2px;
}

/* Enhanced High Contrast Support */
@media (prefers-contrast: high) {
    .photo-edit-container {
        border-width: 3px;
    }
    
    .photo-preview-edit {
        border-width: 3px;
    }
    
    .remove-photo-btn-edit {
        background: #000;
        border: 2px solid #fff;
    }
    
    .add-photo-btn-edit,
    .edit-camera-btn,
    .edit-upload-btn {
        border: 2px solid #000;
    }
}

/* Enhanced Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .photo-edit-container,
    .photo-preview-edit,
    .edit-photo-image,
    .remove-photo-btn-edit,
    .add-photo-btn-edit,
    .photo-remove-confirmation,
    .photo-options-modal,
    .photo-options-content,
    .edit-camera-btn,
    .edit-upload-btn,
    .cancel-photo-btn {
        animation: none;
        transition: none;
    }
    
    .photo-container:hover,
    .photo-container-professional:hover,
    .edit-photo-image:hover {
        transform: none;
    }
}

/* Print Styles for Photo Editing */
@media print {
    .photo-editing-section,
    .photo-edit-actions,
    .photo-remove-confirmation,
    .photo-options-modal,
    #edit-camera-modal,
    .remove-photo-btn-edit,
    .add-photo-btn-edit {
        display: none !important;
    }
    
    .photo-preview-edit {
        border: 1px solid #000;
        background: #fff;
    }
    
    .edit-photo-image {
        filter: grayscale(100%);
    }
}

/* Enhanced Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
    .photo-editing-section {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
    }
    
    .photo-edit-container {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .photo-preview-edit {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .photo-placeholder-edit {
        color: #a0aec0;
    }
    
    .photo-options-content {
        background: #1a202c;
        color: #e2e8f0;
    }
}

/* Enhanced Tooltip Styles for Photo Editing */
.photo-edit-tooltip {
    position: relative;
}

.photo-edit-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.photo-edit-tooltip:hover::after {
    opacity: 1;
}

/* Enhanced Status Indicators */
.photo-status-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 5;
}

.photo-status-indicator.uploaded {
    background: var(--md-success);
    box-shadow: 0 0 0 2px white;
}

.photo-status-indicator.modified {
    background: var(--md-warning);
    box-shadow: 0 0 0 2px white;
}

.photo-status-indicator.removed {
    background: var(--md-error);
    box-shadow: 0 0 0 2px white;
}



/* Enhanced Gallery Embed Styles */
.gallery-embed-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.gallery-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-bottom: 2px solid #e9ecef;
}

.gallery-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-header h3 i {
    color: var(--md-primary);
    font-size: 1.8rem;
}

.gallery-header p {
    color: var(--md-text-secondary);
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.airtable-gallery-wrapper {
    padding: 0;
    background: #f8f9fa;
    position: relative;
}

.airtable-embed {
    border-radius: 0 !important;
    border: none !important;
    width: 100% !important;
    height: 600px !important;
    background: white !important;
    display: block;
    transition: opacity 0.3s ease;
}

.airtable-embed:hover {
    opacity: 0.98;
}

.gallery-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.gallery-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--md-text-secondary);
    font-size: 0.9rem;
    justify-content: center;
    font-style: italic;
}

.gallery-info i {
    color: var(--md-primary);
}

/* Enhanced Product Modal Styles */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.product-modal {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center bottom;
}

.product-modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.product-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.product-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #e3f2fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-modal-body {
    padding: 32px;
    max-height: 70vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

/* Enhanced Product Details Grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.product-image-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-image-container {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.product-image-container:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

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

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

.product-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.action-btn.edit-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.action-btn.delete-btn {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

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

.action-btn:active {
    transform: translateY(0);
}

.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
}

.product-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--md-text-primary) 0%, var(--md-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-status {
    flex-shrink: 0;
}

.product-details {
    display: grid;
    gap: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.detail-row:hover {
    background: rgba(0, 56, 168, 0.02);
    padding-left: 8px;
    border-radius: 8px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.pricing {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    margin: 8px 0;
    border-left: 4px solid var(--md-primary);
}

.detail-label {
    font-weight: 600;
    color: var(--md-text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value {
    font-weight: 500;
    color: var(--md-text-primary);
    text-align: right;
    font-size: 0.95rem;
}

.detail-value.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-primary);
    font-family: 'SF Mono', 'Monaco', monospace;
}

.product-comments {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--md-primary);
    margin-top: 20px;
}

.product-comments h4 {
    margin: 0 0 12px 0;
    color: var(--md-text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-content {
    color: var(--md-text-secondary);
    line-height: 1.5;
    font-style: italic;
}

/* Enhanced Stock Badges */
.stock-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stock-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.stock-badge:hover::before {
    left: 100%;
}

.stock-badge.in-stock {
    background: var(--gradient-success);
    color: white;
}

.stock-badge.low-stock {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    color: white;
}

.stock-badge.out-of-stock {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
}

/* Customer-specific Modal Enhancements */
.customer-modal {
    max-width: 800px;
}

.customer-product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.availability-status {
    margin-bottom: 10px;
}

.availability-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.availability-badge.available {
    background: var(--gradient-success);
    color: white;
}

.availability-badge.limited {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    color: white;
}

.availability-badge.unavailable {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
}

/* Category Quick Navigation */
.category-quick-nav {
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.category-quick-nav h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--md-text-primary) 0%, var(--md-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 56, 168, 0.1), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-color: var(--md-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-btn i {
    font-size: 2rem;
    color: var(--md-primary);
    transition: transform 0.3s ease;
}

.category-btn:hover i {
    transform: scale(1.1);
}

.category-btn span {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 1rem;
}

.category-btn small {
    color: var(--md-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Enhanced Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-professional {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    margin: 20px;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Enhanced Form Styling for Edit Modal */
.edit-form-professional {
    display: grid;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: var(--md-text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--md-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f1f3f4;
}

/* Responsive Design Enhancements for New Features */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px;
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-header h2 {
        font-size: 1.5rem;
    }

    .gallery-header {
        padding: 20px;
    }

    .gallery-footer {
        padding: 15px 20px;
    }

    .airtable-embed {
        height: 500px !important;
    }

    .view-btn span {
        display: none;
    }

    .modal-professional {
        margin: 10px;
        max-width: none;
    }

    .modal-body {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .email-link {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        font-size: 0.8rem;
    }

    .email-link i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-quick-nav {
        padding: 20px;
    }

    .product-actions {
        flex-direction: column;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        text-align: left;
    }

    .detail-value {
        text-align: left;
    }

    .airtable-embed {
        height: 400px !important;
    }

    .gallery-header h3 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .product-modal {
        margin: 10px;
        width: calc(100% - 20px);
    }

    .product-modal-body {
        padding: 20px;
    }

    .email-cell {
        max-width: 150px;
    }

    .email-link {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.02);
    }
}

/* Loading Animation for Airtable Embed */
.airtable-gallery-wrapper {
    position: relative;
}

.airtable-gallery-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.airtable-gallery-wrapper.loading::before {
    opacity: 1;
}

/* Success states */
.success-indicator {
    color: var(--md-success);
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Error states */
.error-indicator {
    color: var(--md-error);
    animation: errorShake 0.6s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
}

.user-role.admin {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    box-shadow: var(--shadow-sm);
}

.user-role.customer {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.login-btn, .logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.login-btn:hover, .logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* FIXED TABLE HEADERS - WHITE TEXT FOR READABILITY */
.professional-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: white;
    table-layout: auto;
    min-width: 2000px; /* Ensure horizontal scroll for all columns */
}





.professional-table th {
    background: var(--gradient-primary);
    color: white !important;
    font-weight: 600;
    padding: 18px 16px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    border: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.professional-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
    color: white !important;
}

.professional-table th.sortable:hover {
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
    color: white !important;
}

.professional-table th .sort-icon {
    margin-left: 6px;
    opacity: 0.9;
    font-size: 1rem;
    color: white !important;
}

.professional-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
    background: white;
    transition: background-color 0.3s ease;
}

.table-row-professional:hover td {
    background: #f8f9fa;
}

.table-row-professional:nth-child(even) td {
    background: #fdfdfd;
}

.table-row-professional:nth-child(even):hover td {
    background: #f5f5f5;
}

/* NEW: EMAIL CELL STYLING */
.email-cell {
    max-width: 200px;
    word-break: break-word;
}

.email-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-primary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(0, 56, 168, 0.05);
    border: 1px solid rgba(0, 56, 168, 0.2);
    font-size: 0.85rem;
}

.email-link:hover {
    background: rgba(0, 56, 168, 0.1);
    border-color: var(--md-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.email-link i {
    font-size: 1rem;
    color: var(--md-primary);
}

/* FIXED ACTION BUTTONS - ALWAYS VISIBLE AND WORKING */
.actions-cell {
    text-align: center;
    white-space: nowrap;
    width: 120px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.professional-action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    min-width: 36px;
    height: 36px;
    position: relative;
    z-index: 5;
}

.professional-action-btn:not(.danger) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.professional-action-btn:not(.danger):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.professional-action-btn.danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.professional-action-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #e73757 0%, #e6401a 100%);
}

/* ENHANCED EDIT/DELETE BUTTON STYLING */
.edit-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    color: white !important;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #3d8bfe 0%, #00d4fe 100%) !important;
}

.delete-btn {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
    color: white !important;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #e73757 0%, #e6401a 100%) !important;
}

/* FIXED CLEAN IMAGE DISPLAY IN TABLES */
.photo-cell {
    width: 80px !important; /* FIXED: Set specific width */
    min-width: 80px;
    max-width: 80px;
    text-align: center;
    vertical-align: middle;
    padding: 8px !important; /* FIXED: Reduced padding */
}

/* ENHANCED PHOTO STYLES - FIXED SIZING AND DISPLAY ISSUES */
/* Add these styles to your existing styles.css file */

/* FIXED: Enhanced photo containers with better sizing */
    /* FIXED: Enhanced photo containers with proper sizing and image fitting */
.photo-container-enhanced,
.photo-container-professional {
    width: 90px !important;
    height: 90px !important;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid #e9ecef;
    margin: 0 auto;
    flex-shrink: 0;
    flex-grow: 0;
    transition: all 0.3s ease;
    position: relative;
}

.photo-container-enhanced:hover,
.photo-container-professional:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
    border-color: var(--md-primary);
}

/* FIXED: Product photos with full coverage and proper object-fit */
.product-photo-enhanced,
.product-photo-professional {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 12px;
}

.product-photo-enhanced:hover,
.product-photo-professional:hover {
    transform: scale(1.02);
}

/* FIXED: Remove extra text and formatting issues */
.photo-container-enhanced::after,
.photo-container-professional::after {
    display: none !important;
}

/* Hide any stray text elements */
.photo-cell > *:not(.photo-container-enhanced):not(.photo-container-professional):not(.no-photo) {
    display: none !important;
}

/* FIXED: Enhanced photo placeholders */
.photo-placeholder-enhanced {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--md-text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding: 10px;
}

.photo-placeholder-enhanced i {
    font-size: 2rem;
    color: var(--md-primary);
    margin-bottom: 8px;
    opacity: 0.7;
}

.photo-placeholder-enhanced span {
    font-weight: 500;
    line-height: 1.2;
}

/* FIXED: Photo cell sizing in tables */
.photo-cell {
    width: 110px !important;
    min-width: 110px;
    max-width: 110px;
    text-align: center;
    vertical-align: middle;
    padding: 10px !important;
}

/* ENHANCED: Photo editing sections for edit modal */
.photo-editing-section-enhanced {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    border: 2px solid #e9ecef;
    border-left: 4px solid var(--md-primary);
    box-shadow: var(--shadow-sm);
}

.photo-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.photo-section-title i {
    color: var(--md-primary);
    font-size: 1.6rem;
}

.photo-edit-group-enhanced {
    margin-bottom: 30px;
}

.photo-edit-label {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: block;
}

.photo-edit-container-enhanced {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.photo-edit-container-enhanced:hover {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

/* FIXED: Enhanced photo preview in edit modal with proper image fitting */
.photo-preview-enhanced {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.photo-preview-enhanced:hover {
    border-color: var(--md-primary);
    background: rgba(0, 56, 168, 0.02);
}

/* FIXED: Enhanced edit photo image display with full coverage */
.edit-photo-image-enhanced {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 10px;
    transition: transform 0.3s ease;
    display: block;
}

.edit-photo-image-enhanced:hover {
    transform: scale(1.02);
}

/* FIXED: Enhanced remove photo button */
.remove-photo-btn-edit-enhanced {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.remove-photo-btn-edit-enhanced:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.remove-photo-btn-edit-enhanced i {
    font-size: 1.3rem;
}

/* FIXED: Confirmation modal styles */
.photo-remove-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    animation: fadeIn 0.3s ease;
}

.photo-remove-confirmation-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.photo-remove-confirmation-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.photo-remove-confirmation-content h4 i {
    color: var(--md-warning);
    font-size: 1.8rem;
}

.photo-remove-confirmation-content p {
    font-size: 1.1rem;
    color: var(--md-text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.photo-remove-confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-remove-yes-btn,
.confirm-remove-no-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
    box-shadow: var(--shadow-sm);
}

.confirm-remove-yes-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.confirm-remove-yes-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.confirm-remove-no-btn {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.confirm-remove-no-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-1px);
}

/* Enhanced Add Photo Button */
.add-photo-btn-edit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-size: 1rem;
    width: 100%;
    justify-content: center;
}

.add-photo-btn-edit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
}

.add-photo-btn-edit i {
    font-size: 1.3rem;
}

/* Enhanced Photo Options Modal */
.photo-options-modal-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.photo-options-content-enhanced {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.photo-options-content-enhanced h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-text-primary);
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--md-text-primary) 0%, var(--md-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.photo-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-camera-btn-enhanced,
.edit-upload-btn-enhanced,
.cancel-photo-btn-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 28px;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-height: 55px;
    box-shadow: var(--shadow-sm);
}

.edit-camera-btn-enhanced {
    background: var(--gradient-primary);
    color: white;
}

.edit-camera-btn-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
}

.edit-upload-btn-enhanced {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.edit-upload-btn-enhanced:hover {
    background: linear-gradient(135deg, #218838 0%, #1da88a 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.cancel-photo-btn-enhanced {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.cancel-photo-btn-enhanced:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-2px);
}

.edit-camera-btn-enhanced i,
.edit-upload-btn-enhanced i,
.cancel-photo-btn-enhanced i {
    font-size: 1.4rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .photo-container-enhanced,
    .photo-container-professional {
        width: 75px !important;
        height: 75px !important;
    }
    
    .photo-cell {
        width: 95px !important;
        min-width: 95px;
        max-width: 95px;
        padding: 8px !important;
    }
    
    .photo-editing-section-enhanced {
        padding: 25px;
    }
    
    .photo-preview-enhanced {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .photo-container-enhanced,
    .photo-container-professional {
        width: 65px !important;
        height: 65px !important;
    }
    
    .photo-cell {
        width: 85px !important;
        min-width: 85px;
        max-width: 85px;
        padding: 6px !important;
    }
    
    .photo-editing-section-enhanced {
        padding: 20px;
    }
    
    .photo-preview-enhanced {
        height: 180px;
    }
}
    
    .photo-preview-enhanced .photo-placeholder-enhanced {
        padding: 20px;
    }
    
    .photo-preview-enhanced .photo-placeholder-enhanced i {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .confirmation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .confirm-remove-yes,
    .confirm-remove-no {
        width: 100%;
        padding: 15px;
    }
    
    .photo-options-content-enhanced {
        padding: 30px;
        margin: 20px;
    }
    
    .photo-option-buttons {
        gap: 12px;
    }
    
    .edit-camera-btn-enhanced,
    .edit-upload-btn-enhanced,
    .cancel-photo-btn-enhanced {
        padding: 16px 24px;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .camera-modal-content {
        width: 95%;
        margin: 20px 10px;
    }
    
    .camera-modal-header {
        padding: 20px 25px;
    }
    
    .camera-modal-header h3 {
        font-size: 1.4rem;
    }
    
    .camera-container {
        min-height: 300px;
        padding: 15px;
    }
    
    .camera-video {
        max-height: 350px;
        border-width: 2px;
    }
    
    .camera-controls {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .camera-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 24px;
    }
    
    /* Mobile photo container adjustments */
    .photo-container-enhanced,
    .photo-container-professional {
        width: 75px !important;
        height: 75px !important;
    }
    
    .photo-cell {
        width: 95px !important;
        min-width: 95px;
        max-width: 95px;
        padding: 8px !important;
    }
}

@media (max-width: 480px) {
    .photo-editing-section-enhanced {
        padding: 20px;
        border-left-width: 3px;
    }
    
    .photo-section-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .photo-edit-group-enhanced {
        margin-bottom: 25px;
    }
    
    .photo-edit-label {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .photo-preview-enhanced {
        height: 180px;
        margin-bottom: 12px;
    }
    
    .photo-preview-enhanced .photo-placeholder-enhanced {
        padding: 15px;
    }
    
    .photo-preview-enhanced .photo-placeholder-enhanced i {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .photo-preview-enhanced .photo-placeholder-enhanced span {
        font-size: 1rem;
    }
    
    .remove-photo-btn-edit-enhanced {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }
    
    .remove-photo-btn-edit-enhanced i {
        font-size: 1.1rem;
    }
    
    .add-photo-btn-edit {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .photo-options-content-enhanced {
        padding: 25px;
        margin: 15px;
    }
    
    .photo-options-content-enhanced h4 {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    
    .edit-camera-btn-enhanced,
    .edit-upload-btn-enhanced,
    .cancel-photo-btn-enhanced {
        padding: 14px 20px;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    .edit-camera-btn-enhanced i,
    .edit-upload-btn-enhanced i,
    .cancel-photo-btn-enhanced i {
        font-size: 1.2rem;
    }
    
    .camera-modal-content {
        margin: 10px;
        padding: 0;
    }
    
    .camera-modal-header {
        padding: 18px 20px;
    }
    
    .camera-modal-header h3 {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .camera-container {
        min-height: 250px;
        padding: 12px;
    }
    
    .camera-video {
        max-height: 280px;
        border-width: 2px;
    }
    
    .camera-controls {
        padding: 15px;
        gap: 12px;
    }
    
    .camera-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Extra small mobile photo containers */
    .photo-container-enhanced,
    .photo-container-professional {
        width: 65px !important;
        height: 65px !important;
        border-radius: 12px;
    }
    
    .photo-cell {
        width: 85px !important;
        min-width: 85px;
        max-width: 85px;
        padding: 6px !important;
    }
    
    .photo-placeholder-enhanced i {
        font-size: 1.5rem;
    }
}

/* HIGH CONTRAST AND ACCESSIBILITY SUPPORT */
@media (prefers-contrast: high) {
    .photo-edit-container-enhanced {
        border-width: 3px;
    }
    
    .photo-preview-enhanced {
        border-width: 3px;
    }
    
    .remove-photo-btn-edit-enhanced {
        background: #000;
        border: 2px solid #fff;
    }
    
    .add-photo-btn-edit,
    .edit-camera-btn-enhanced,
    .edit-upload-btn-enhanced {
        border: 2px solid #000;
    }
    
    .camera-video {
        border-width: 4px;
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    .photo-edit-container-enhanced,
    .photo-preview-enhanced,
    .edit-photo-image-enhanced,
    .remove-photo-btn-edit-enhanced,
    .add-photo-btn-edit,
    .photo-remove-confirmation,
    .photo-options-modal-enhanced,
    .photo-options-content-enhanced,
    .edit-camera-btn-enhanced,
    .edit-upload-btn-enhanced,
    .cancel-photo-btn-enhanced,
    .camera-modal,
    .camera-modal-content,
    .camera-btn,
    .photo-container-enhanced,
    .photo-container-professional,
    .product-photo-enhanced,
    .product-photo-professional {
        animation: none;
        transition: none;
    }
    
    .photo-container-enhanced:hover,
    .photo-container-professional:hover,
    .edit-photo-image-enhanced:hover,
    .product-photo-enhanced:hover,
    .product-photo-professional:hover {
        transform: none;
    }
}

/* PRINT STYLES FOR PHOTO EDITING */
@media print {
    .photo-editing-section-enhanced,
    .photo-edit-actions,
    .photo-remove-confirmation,
    .photo-options-modal-enhanced,
    .camera-modal,
    .remove-photo-btn-edit-enhanced,
    .add-photo-btn-edit {
        display: none !important;
    }
    
    .photo-preview-enhanced {
        border: 2px solid #000;
        background: #fff;
    }
    
    .edit-photo-image-enhanced,
    .product-photo-enhanced,
    .product-photo-professional {
        filter: grayscale(100%);
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    .photo-editing-section-enhanced {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
    }
    
    .photo-edit-container-enhanced {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .photo-preview-enhanced {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .photo-placeholder-enhanced {
        color: #a0aec0;
    }
    
    .photo-options-content-enhanced {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .camera-modal-content {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .camera-controls {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
}

/* Fixed Stock Badges - Corrected Classifications */
.stock-badge-professional {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
    box-shadow: var(--shadow-sm);
}

.stock-badge-professional.in-stock {
    background: var(--gradient-success);
    color: white;
}

.stock-badge-professional.low-stock {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    color: white;
}

.stock-badge-professional.out-of-stock {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
}

/* Enhanced Cell Styling */
.item-name-cell {
    font-weight: 600;
    color: var(--md-primary);
}

.price-cell {
    text-align: right;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', monospace;
    color: var(--md-success);
}

.number-cell {
    text-align: center;
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.description-cell {
    max-width: 250px;
    color: var(--md-text-secondary);
    line-height: 1.5;
}

.location-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--md-text-secondary);
}

.tags-cell {
    max-width: 200px;
}

.tag-professional {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: var(--md-primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 2px;
    border: 1px solid rgba(0, 56, 168, 0.2);
}

.empty-value {
    color: var(--md-text-secondary);
    font-style: italic;
    opacity: 0.7;
}

/* NEW: GALLERY SEARCH STYLES */
.gallery-search-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.gallery-search-wrapper {
    position: relative;
}

.gallery-search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.gallery-search-input-container:focus-within {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

.gallery-search-input-container .search-icon {
    position: absolute;
    left: 15px;
    color: var(--md-text-secondary);
    font-size: 1.2rem;
    z-index: 2;
}

.gallery-search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    background: transparent;
    color: var(--md-text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.gallery-search-input::placeholder {
    color: var(--md-text-secondary);
    opacity: 0.7;
}

.gallery-clear-search-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--md-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-clear-search-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    transform: scale(1.1);
}

/* Gallery Search Results */
.gallery-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-count {
    font-weight: 600;
    color: var(--md-text-primary);
    font-size: 0.9rem;
}

.close-results-btn {
    background: none;
    border: none;
    color: var(--md-text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-results-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--md-text-primary);
}

.search-results-list {
    max-height: 320px;
    overflow-y: auto;
}

/* Search Result Items */
.search-result-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--md-text-primary);
    margin: 0;
    line-height: 1.3;
}

.result-title mark {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: var(--md-text-primary);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.result-stock-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.result-stock-badge.available,
.result-stock-badge.in-stock {
    background: var(--gradient-success);
    color: white;
}

.result-stock-badge.limited,
.result-stock-badge.low-stock {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    color: white;
}

.result-stock-badge.unavailable,
.result-stock-badge.out-of-stock {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-manufacturer {
    font-size: 0.85rem;
    color: var(--md-primary);
    font-weight: 500;
    margin: 0;
}

.result-description {
    font-size: 0.8rem;
    color: var(--md-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.result-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--md-success);
    font-family: 'SF Mono', 'Monaco', monospace;
}

.result-category {
    font-size: 0.75rem;
    color: var(--md-text-secondary);
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Enhanced Mobile Menu CSS - Fixed and Improved */

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    margin: 0 auto;
    padding: 0;
    flex-grow: 1;
    justify-content: center;
    max-width: 600px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 12px 18px;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.95rem;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.admin-link {
    background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
    box-shadow: var(--shadow);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
    background: transparent;
    border: none;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #002870 0%, #001f5a 100%);
        flex-direction: column;
        padding: 30px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border-radius: 0 0 15px 15px;
        gap: 10px;
        margin: 0;
        justify-content: flex-start;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    
    .nav-link {
        padding: 15px 30px;
        border-radius: 10px;
        margin: 5px 20px;
        font-size: 1rem;
        text-align: center;
        border: 2px solid transparent;
        backdrop-filter: blur(10px);
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: scale(1.02);
    }
    
    .nav-link.active {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.4);
        font-weight: 600;
    }
    
    .admin-link {
        background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
        color: white !important;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(255, 65, 108, 0.3);
    }
    
    .admin-link:hover {
        background: linear-gradient(135deg, #ff2a5a, #ff3b19) !important;
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 65, 108, 0.4);
    }
}

/* Slide Down Animation for Mobile Menu */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Mobile Navigation Positioning */
@media (max-width: 768px) {
    .nav-container {
        position: relative;
    }
    
    .nav-user,
    .login-btn {
        position: relative;
        z-index: 1002;
    }
    
    /* Ensure hamburger is always visible */
    .hamburger {
        order: 3;
        margin-left: auto;
    }
    
    .nav-user {
        order: 2;
    }
    
    .login-btn {
        order: 2;
    }
    
    .nav-logo {
        order: 1;
        flex-shrink: 0;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {
    .hamburger {
        padding: 12px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-menu {
        top: 60px;
        padding: 20px 0;
    }
    
    .nav-link {
        padding: 12px 20px;
        margin: 3px 15px;
        font-size: 0.95rem;
    }
    
    .hamburger {
        padding: 8px;
    }
    
    .hamburger span {
        width: 22px;
        height: 2px;
        margin: 2px 0;
    }
}

/* Accessibility improvements */
.hamburger:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-menu {
        background: #000;
        border: 2px solid #fff;
    }
    
    .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
    
    .hamburger span {
        background: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hamburger span,
    .nav-menu,
    .nav-link {
        transition: none;
    }
    
    .nav-menu.active {
        animation: none;
    }
}

/* Professional Inventory Display System */
.professional-inventory-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin: 40px 0;
}

.inventory-controls-professional {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-bottom: 1px solid var(--md-divider);
}

.inventory-controls-professional .search-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-professional {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-input-professional .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-text-secondary);
    font-size: 1.2rem;
}

.search-field {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
    transform: translateY(-2px);
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--md-text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
}

.filter-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    color: var(--md-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.1);
}

.action-section {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.professional-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.professional-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.professional-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.professional-btn.secondary {
    background: white;
    color: var(--md-text-secondary);
    border: 2px solid #e9ecef;
}

.professional-btn.secondary:hover {
    background: #f8f9fa;
    color: var(--md-text-primary);
    border-color: var(--md-primary);
    transform: translateY(-2px);
}

.professional-btn.tertiary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

/* Enhanced Table Wrapper */
.table-wrapper-professional {
    overflow: auto;
    max-height: 700px;
    border-radius: 0 0 20px 20px;
}

/* Stock Info Display */
.stock-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stock-number {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Enhanced Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 120px 0 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="grad1"><stop offset="0%" stop-color="white" stop-opacity="0.1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23grad1)"/><circle cx="800" cy="600" r="200" fill="url(%23grad1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #e3f2fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: white;
    color: var(--md-primary);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    color: var(--md-primary-dark);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* Enhanced Logo Display */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.company-logo {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

.logo-image {
    max-width: 500px;
    max-height: 350px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    border-radius: 15px;
}

/* Enhanced Material Header */
.material-header {
    background: var(--gradient-primary);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.material-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.header-content-material {
    text-align: center;
    position: relative;
    z-index: 2;
}

.material-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    letter-spacing: -0.02em;
}