/* Custom CSS for WiredHeadphoneStore - Apple-Style Redesign */

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: #F1F2F2;
}

::-webkit-scrollbar-thumb {
    background: #E9CA90;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4B67F;
}

/* Product Card Styles - Apple Aesthetic */
.product-card {
    background: linear-gradient(to bottom, #ffffff, #FFEBD2);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(61, 40, 33, 0.05);
    border: 1px solid rgba(233, 202, 144, 0.2);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(61, 40, 33, 0.12);
}

.product-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: linear-gradient(135deg, #FFEBD2 0%, #F1F2F2 100%);
    transition: transform 0.4s ease;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.product-badge.flagship {
    background: rgba(61, 40, 33, 0.9);
    color: #F1F2F2;
}

.product-badge.studio {
    background: rgba(18, 66, 52, 0.9);
    color: #F1F2F2;
}

.product-badge.budget {
    background: rgba(107, 91, 82, 0.9);
    color: #F1F2F2;
}

.product-badge.iem {
    background: rgba(139, 115, 85, 0.9);
    color: #F1F2F2;
}

/* Star Rating Styles */
.star-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star {
    width: 18px;
    height: 18px;
    color: #E9CA90;
    fill: currentColor;
    transition: all 0.2s ease;
}

.star:hover {
    transform: scale(1.1);
}

.star.empty {
    color: rgba(233, 202, 144, 0.3);
}

.star.half {
    background: linear-gradient(90deg, #E9CA90 50%, rgba(233, 202, 144, 0.3) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Comparison Tool Styles */
.comparison-highlight {
    background: rgba(18, 66, 52, 0.08);
    font-weight: 600;
    color: #124234;
}

.comparison-winner {
    background: linear-gradient(to right, rgba(18, 66, 52, 0.05), transparent);
    border-left: 3px solid #124234;
    padding-left: 16px;
}

/* Loading States */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-card {
    background: linear-gradient(90deg, #F1F2F2 0%, #FFEBD2 50%, #F1F2F2 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 24px;
    height: 400px;
}

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

.loading-text {
    background: #E9CA90;
    border-radius: 8px;
    height: 16px;
    animation: pulse 2s infinite;
}

/* Mobile Menu Animation */
.mobile-menu-enter {
    transform: translateY(-100%);
    opacity: 0;
}

.mobile-menu-enter-active {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-exit {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-exit-active {
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search Results */
.search-result-item {
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(233, 202, 144, 0.2);
    transition: all 0.2s ease;
}

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

.search-result-item:hover {
    background: rgba(255, 235, 210, 0.3);
    padding-left: 20px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.focus-visible:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 66, 52, 0.3);
    border-radius: 8px;
}

/* Custom button styles */
.btn-primary {
    background: #124234;
    color: white;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(18, 66, 52, 0.2);
}

.btn-primary:hover {
    background: rgba(18, 66, 52, 0.9);
    box-shadow: 0 8px 24px rgba(18, 66, 52, 0.25);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: rgba(255, 235, 210, 0.5);
    color: #3D2821;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: rgba(233, 202, 144, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid #124234;
    color: #124234;
    background: transparent;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
    background: #124234;
    color: white;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
}

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

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Comparison panel styles */
.comparison-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 400px;
    background: white;
    box-shadow: -10px 0 40px rgba(61, 40, 33, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.comparison-panel.open {
    transform: translateX(0);
}

.comparison-overlay {
    position: fixed;
    inset: 0;
    background: rgba(61, 40, 33, 0.4);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.comparison-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    z-index: 10;
    padding: 8px 14px;
    font-size: 13px;
    color: white;
    background: rgba(61, 40, 33, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(61, 40, 33, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

/* Custom form styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 235, 210, 0.3);
    border: 1px solid rgba(233, 202, 144, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.form-input:focus {
    outline: none;
    background: white;
    border-color: #124234;
    box-shadow: 0 0 0 3px rgba(18, 66, 52, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid rgba(233, 202, 144, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.form-select:focus {
    outline: none;
    border-color: #124234;
    box-shadow: 0 0 0 3px rgba(18, 66, 52, 0.1);
}

/* Breadcrumb styles */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B5B52;
}

.breadcrumb a {
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #3D2821;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: rgba(107, 91, 82, 0.4);
}

/* Card hover effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    box-shadow: 0 20px 40px rgba(61, 40, 33, 0.12);
    transform: translateY(-8px);
}

/* Spec comparison table */
.spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
}

.spec-table th,
.spec-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(233, 202, 144, 0.2);
}

.spec-table th {
    background: rgba(255, 235, 210, 0.3);
    font-weight: 600;
    color: #3D2821;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-table tr:hover {
    background: rgba(255, 235, 210, 0.15);
}

.spec-table tr:last-child td {
    border-bottom: none;
}

/* Price display */
.price {
    font-size: 28px;
    font-weight: 600;
    color: #3D2821;
    letter-spacing: -0.02em;
}

.price-old {
    font-size: 18px;
    color: #6B5B52;
    text-decoration: line-through;
    opacity: 0.6;
}

.price-discount {
    font-size: 14px;
    color: #124234;
    font-weight: 600;
}

/* Rating display */
.rating-number {
    font-size: 20px;
    font-weight: 600;
    color: #3D2821;
}

.rating-text {
    font-size: 14px;
    color: #6B5B52;
}

/* Category filters */
.filter-active {
    background: #124234;
    color: white;
    box-shadow: 0 2px 8px rgba(18, 66, 52, 0.25);
}

.filter-inactive {
    background: rgba(255, 235, 210, 0.3);
    color: #6B5B52;
}

.filter-inactive:hover {
    background: rgba(233, 202, 144, 0.4);
    color: #3D2821;
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Apple-style glass morphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(233, 202, 144, 0.2);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3D2821 0%, #124234 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(233, 202, 144, 0.3), transparent);
    margin: 40px 0;
}

/* Floating elements */
.float {
    animation: float 6s ease-in-out infinite;
}

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

/* Subtle shadow on scroll */
.shadow-on-scroll {
    transition: box-shadow 0.3s ease;
}

.shadow-on-scroll.scrolled {
    box-shadow: 0 4px 12px rgba(61, 40, 33, 0.08);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}
