/* Professional enhancements exceeding Getty Images standards */

/* Enhanced Lightbox Styles */
.pro-lightbox .lightbox-header {
    background: linear-gradient(135deg, rgba(0,0,0,0.95), rgba(0,0,0,0.85));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,152,0,0.3);
}

.image-info .image-title {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.image-meta-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.image-dimensions {
    color: #ccc;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.image-category {
    color: #ff9800;
    font-size: 0.9rem;
    background: rgba(255,152,0,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255,152,0,0.3);
}

.image-price {
    color: #4caf50;
    font-size: 1rem;
    font-weight: bold;
    background: rgba(76,175,80,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(76,175,80,0.3);
}

.purchase-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
    color: white !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.purchase-btn:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,152,0,0.4);
}

.purchase-btn.added {
    background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
}

.purchase-btn span {
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.close-btn {
    background: rgba(244,67,54,0.2) !important;
    border: 1px solid rgba(244,67,54,0.3) !important;
}

.close-btn:hover {
    background: rgba(244,67,54,0.3) !important;
}

.image-overlay-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay-info {
    opacity: 1;
}

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

.quick-action-btn {
    background: rgba(0,0,0,0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-btn:hover {
    background: rgba(255,152,0,0.9);
    transform: scale(1.1);
}

.watermark-notice {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #ccc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.watermark-notice i {
    margin-right: 0.5rem;
    color: #ff9800;
}

/* Enhanced Cart Styles */
.cart-image-group {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    transition: all 0.3s ease;
    overflow: hidden;
}

.cart-image-group:hover {
    border-color: rgba(255,152,0,0.3);
    box-shadow: 0 4px 20px rgba(255,152,0,0.1);
}

.cart-image-header {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
}

.cart-thumb-container {
    position: relative;
    flex-shrink: 0;
}

.cart-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.image-preview-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-thumb-container:hover .image-preview-btn {
    opacity: 1;
}

.cart-thumb-container:hover .cart-thumb {
    transform: scale(1.05);
}

.cart-image-info {
    flex: 1;
    min-width: 0;
}

.cart-image-info h4 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.image-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.image-details .image-dimensions {
    color: #ccc;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.image-details .image-category {
    color: #ff9800;
    font-size: 0.85rem;
    background: rgba(255,152,0,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255,152,0,0.3);
}

.license-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4caf50;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.license-info i {
    color: #4caf50;
}

.price-breakdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.unit-price {
    color: #4caf50;
    font-weight: 600;
}

.quantity-note {
    color: #ccc;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

.quantity-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quantity-section label {
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) {
    background: rgba(255,152,0,0.3);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    background: transparent;
    border: none;
    color: white;
    width: 50px;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.quantity-input:focus {
    outline: none;
    background: rgba(255,255,255,0.1);
}

.item-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.total-label {
    color: #ccc;
    font-size: 0.8rem;
}

.item-price {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1rem;
}

.remove-image-btn {
    background: rgba(244,67,54,0.2);
    border: 1px solid rgba(244,67,54,0.3);
    color: #f44336;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image-btn:hover {
    background: rgba(244,67,54,0.3);
    transform: scale(1.05);
}

.cart-totals-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255,152,0,0.3);
}

.cart-totals {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.subtotal-row, .discount-row, .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: white;
    font-size: 1rem;
}

.subtotal-row .label,
.total-row .label {
    font-weight: 500;
}

.subtotal-row .amount,
.total-row .total-amount {
    font-weight: 600;
}

.total-row {
    font-size: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.total-row .total-amount {
    color: #4caf50;
    font-size: 1.3rem;
    font-weight: bold;
}

.current-discount-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 1rem 0;
    color: #4caf50;
    font-size: 0.9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.bulk-discount-info {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #ff9800;
}

.discount-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800, #f57c00);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.secure-checkout-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #4caf50;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.secure-checkout-info i {
    color: #4caf50;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: #ccc;
}

.empty-cart-icon {
    font-size: 4rem;
    color: #666;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-cart h3 {
    color: white;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-cart p {
    color: #999;
    margin: 0 0 2rem 0;
    font-size: 1rem;
}

.cart-summary {
    background: linear-gradient(135deg, rgba(255,152,0,0.1), rgba(255,152,0,0.05));
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,152,0,0.2);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-header h3 i {
    color: #ff9800;
}

.clear-cart-btn {
    background: rgba(244,67,54,0.2);
    border: 1px solid rgba(244,67,54,0.3);
    color: #f44336;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-cart-btn:hover {
    background: rgba(244,67,54,0.3);
}

.cart-stats {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    color: #ff9800;
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-label {
    color: #ccc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Advanced Search Styles */
.search-input-container {
    position: relative;
    flex: 1;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

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

.advanced-search-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.advanced-search-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.advanced-search-panel {
    background: rgba(0,0,0,0.9);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #ff9800;
    background: rgba(255,255,255,0.15);
}

/* Fix dropdown option styling - comprehensive approach */
.filter-group select {
    /* Ensure dropdown has proper styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 3rem;
}

.filter-group select option {
    background-color: #2a2a2a !important;
    color: white !important;
    padding: 0.75rem !important;
    border: none !important;
    font-size: 1rem !important;
}

.filter-group select option:hover,
.filter-group select option:focus {
    background-color: #404040 !important;
    color: #ff9800 !important;
}

.filter-group select option:checked,
.filter-group select option:selected {
    background-color: #ff9800 !important;
    color: white !important;
    font-weight: bold !important;
}

/* Alternative styling for better browser compatibility */
.filter-group select {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-weight: 500;
}

.filter-group select:hover {
    border-color: rgba(255,152,0,0.5);
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
}

.filter-group select:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255,152,0,0.2);
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-range input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    outline: none;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff9800;
    border-radius: 50%;
    cursor: pointer;
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ff9800;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.price-display {
    color: #ff9800;
    font-weight: bold;
    text-align: center;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    grid-column: 1 / -1;
    margin-top: 1rem;
}

/* Enhanced Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

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

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

.image-info {
    padding: 1.5rem;
}

.image-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.image-info p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2e7d32;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,152,0,0.4);
}

/* Professional Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #ff9800;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Enhanced Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.notification.success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #c62828);
}

.notification.info {
    background: linear-gradient(135deg, #2196f3, #1565c0);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Professional Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Mobile Responsiveness */
/* Force dropdown text visibility across all browsers */
@supports (-webkit-appearance: none) {
    .filter-group select option {
        background: #2a2a2a;
        color: white;
    }
}

@supports (-moz-appearance: none) {
    .filter-group select option {
        background: #2a2a2a;
        color: white;
    }
}

/* Fallback for older browsers */
.filter-group select {
    color: white !important;
    text-shadow: 0 0 0 white;
}

.filter-group select option {
    color: white !important;
    background: #2a2a2a !important;
}

@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .advanced-search-panel {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* Mobile dropdown fixes */
    .filter-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Touch target size */
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .advanced-search-btn {
        margin-left: 0;
        width: 100%;
    }
}

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

.image-card {
    animation: fadeInUp 0.6s ease forwards;
}

.image-card:nth-child(even) {
    animation-delay: 0.1s;
}

.image-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Enhanced Focus States for Accessibility */
button:focus,
input:focus,
select:focus {
    outline: 3px solid rgba(255, 152, 0, 0.5);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .image-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
}

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

/* Print Styles */
@media print {
    .search-bar,
    .advanced-search-panel,
    .btn-primary,
    .notification {
        display: none !important;
    }
    
    .image-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}