/* Additional styles for trust pages and enhanced functionality */

/* Modal styles for trust pages */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.8rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #667eea;
}

.modal-body {
    line-height: 1.6;
    color: #374151;
}

.modal-body h3 {
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

.modal-body a {
    color: #667eea;
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Breadcrumb navigation */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumb-item {
    margin-right: 0.5rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: "→";
    margin-left: 0.5rem;
    color: #6b7280;
}

.breadcrumb-link {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-current {
    color: #1f2937;
    font-weight: 600;
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    .modal {
        backdrop-filter: none;
    }
    
    .product-item {
        transition: none;
    }
    
    .search-highlight {
        animation: none;
    }
}

/* Print styles */
@media print {
    .hero-section,
    .search-section,
    footer,
    .modal {
        display: none;
    }
    
    main {
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    .product-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .product-grid {
        display: block;
    }
    
    .product-item {
        margin-bottom: 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-item {
        border: 2px solid #000;
    }
    
    .search-highlight {
        background-color: #ffff00 !important;
        color: #000 !important;
    }
}

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

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

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile optimizations */
@media (max-width: 480px) {
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        padding: 0.5rem;
    }
    
    .breadcrumb-list {
        flex-wrap: wrap;
    }
}