/* ============================================
   HARMONIQ & ROTTER - Premium Support Portal
   Minimalist Design System
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Colors */
    --bg: #ffffff;
    --bg-subtle: #fafafa;
    --surface: #ffffff;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --text: #111111;
    --text-secondary: #666666;
    --text-muted: #999999;

    /* Accent Colors */
    --whatsapp: #25D366;
    --whatsapp-hover: #1da851;
    --email: #3B82F6;
    --email-hover: #2563eb;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --container-max: 1140px;
    --container-padding: 24px;
    --card-gap: 28px;
    --card-padding: 20px;
    --card-radius: 16px;
    --btn-radius: 10px;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --line-height: 1.5;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: var(--line-height);
    color: var(--text);
    background: var(--bg);
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    height: 68px;
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 36px;
    width: auto;
    display: block;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--btn-radius);
    transition: all 0.2s ease;
}

.header-contact:hover {
    background: var(--bg-subtle);
    color: var(--text);
}

.header-contact svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 64px 0 48px;
    text-align: center;
    animation: heroFadeIn 0.6s ease-out;
}

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

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Search Bar */
.search-container {
    max-width: 400px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

/* ============================================
   CATEGORY SECTIONS
   ============================================ */
.category-section {
    padding: 32px 0;
}

.category-header {
    margin-bottom: 28px;
}

.category-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.category-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--card-gap);
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: cardFadeIn 0.5s ease-out backwards;
}

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

/* Stagger animation for cards */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

/* Product Image */
.product-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* Product Content */
.product-content {
    padding: var(--card-padding);
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Document Buttons (Manual & Warranty) */
.btn-document {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--btn-radius);
    transition: all 0.18s ease;
    cursor: pointer;
}

.btn-document:hover {
    background: var(--bg-subtle);
    border-color: var(--text-secondary);
}

.btn-document:active {
    transform: scale(0.98);
}

.btn-document svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

/* Contact Buttons Container */
.contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

/* Contact Buttons */
.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    color: white;
    border: none;
    border-radius: var(--btn-radius);
    transition: all 0.18s ease;
    cursor: pointer;
}

.btn-contact:active {
    transform: scale(0.98);
}

.btn-contact svg {
    width: 16px;
    height: 16px;
}

.btn-whatsapp {
    background: var(--whatsapp);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-hover);
}

.btn-email {
    background: var(--email);
}

.btn-email:hover {
    background: var(--email-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: 64px;
    padding: 32px 0;
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-copyright {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-contact a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--text);
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results-text {
    font-size: 16px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
        --card-gap: 20px;
    }

    .header {
        height: 60px;
    }

    .logo img {
        height: 30px;
    }

    .header-contact span {
        display: none;
    }

    .hero {
        padding: 48px 0 36px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

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

    .product-image {
        height: 200px;
    }

    .category-title {
        font-size: 20px;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 12px;
    }

    .footer-contact {
        flex-direction: column;
        gap: 8px;
    }
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* New Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b35, #f72585);
    color: white;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-image {
    position: relative;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .search-container,
    .contact-buttons {
        display: none;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
