/**
 * ==========================================
 * Luxury Watch Collection - Main Stylesheet
 * ==========================================
 * Design System: Minimal Luxury
 * Color Scheme: Black & White with elegant grays
 * Typography: Playfair Display (headings) + Inter (body)
 * ==========================================
 */

/* ==========================================
   CSS RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333333;
    background-color: #FFFFFF;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ==========================================
   HEADER SECTION
   ========================================== */

.site-header {
    text-align: center;
    padding: 60px 20px 40px;
    background-color: #FFFFFF;
}

.site-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 40px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.site-header .subtitle {
    font-size: 16px;
    color: #666666;
    font-weight: 400;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ==========================================
   SEARCH SECTION
   ========================================== */

.search-section {
    margin-bottom: 50px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

#searchInput {
    flex: 1;
    padding: 16px 20px;
    font-size: 15px;
    border: 1px solid #E5E5E5;
    border-right: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    color: #333333;
}

#searchInput::placeholder {
    color: #999999;
}

#searchInput:focus {
    border-color: #000000;
}

#searchBtn {
    padding: 16px 32px;
    background-color: #000000;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: 1px solid #000000;
}

#searchBtn:hover {
    background-color: #333333;
}

#searchBtn:active {
    background-color: #000000;
}

/* ==========================================
   PRODUCTS GRID SECTION
   ========================================== */

.products-section {
    margin-top: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ==========================================
   PRODUCT CARD
   ========================================== */

.product-card {
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* IMAGE SLIDER */

.image-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #F5F5F5;
    overflow: hidden;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

/* NO IMAGE PLACEHOLDER */

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F5F5;
    color: #999999;
    font-size: 14px;
}

/* SLIDER DOTS */

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background-color: #FFFFFF;
    transform: scale(1.3);
}

/* SOLD OUT BADGE */

.sold-out-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: #999999;
    color: #FFFFFF;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 10;
}

/* PRODUCT INFORMATION */

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 44px;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
}

/* CTA BUTTON */

.cta-button {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background-color: #000000;
    color: #FFFFFF;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.cta-button:hover {
    background-color: #333333;
}

.cta-button:active {
    background-color: #000000;
}

.cta-button.disabled {
    background-color: #999999;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================
   NO RESULTS / NO PRODUCTS MESSAGES
   ========================================== */

.no-results-message,
.no-products-message {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-results-message h2,
.no-products-message h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: #333333;
    margin-bottom: 12px;
}

.no-results-message p,
.no-products-message p {
    font-size: 16px;
    color: #666666;
}

/* ==========================================
   FOOTER SECTION
   ========================================== */

.site-footer {
    background-color: #F9F9F9;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #E5E5E5;
}

.site-footer p {
    color: #666666;
    font-size: 14px;
    margin: 8px 0;
}

.last-updated {
    font-weight: 600;
}

.copyright {
    font-size: 13px;
}

/* ==========================================
   RESPONSIVE DESIGN - TABLET
   ========================================== */

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .site-header h1 {
        font-size: 36px;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - TABLET PORTRAIT
   ========================================== */

@media (max-width: 768px) {
    .site-header {
        padding: 40px 20px 30px;
    }
    
    .site-header h1 {
        font-size: 28px;
    }
    
    .site-header .subtitle {
        font-size: 14px;
    }
    
    .search-container {
        max-width: 100%;
        flex-direction: row;
    }
    
    #searchInput {
        font-size: 14px;
        padding: 14px 16px;
    }
    
    #searchBtn {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .product-name {
        font-size: 14px;
        min-height: 40px;
    }
    
    .product-price {
        font-size: 18px;
    }
    
    .main-container {
        padding: 0 16px 40px;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - MOBILE
   ========================================== */

@media (max-width: 480px) {
    .site-header h1 {
        font-size: 24px;
    }
    
    .site-header .subtitle {
        font-size: 13px;
    }
    
    .products-grid {
        gap: 12px;
    }
    
    .product-card {
        border-radius: 6px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .product-name {
        font-size: 13px;
        min-height: 36px;
    }
    
    .product-price {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .cta-button {
        padding: 12px 20px;
        font-size: 13px;
        height: 44px;
    }
    
    .sold-out-badge {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .slider-dots {
        bottom: 8px;
        gap: 6px;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .search-section {
        margin-bottom: 30px;
    }
}

/* ==========================================
   LOADING & ANIMATION STATES
   ========================================== */

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

.product-card {
    animation: fadeIn 0.4s ease-out;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .search-section,
    .site-footer,
    .cta-button {
        display: none;
    }
    
    .product-card {
        page-break-inside: avoid;
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000000;
    }
    
    .cta-button {
        border: 2px solid #FFFFFF;
    }
}
