*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: #fff;
}

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

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

.container {
    width: min(1200px, 100% - 32px);
    margin-inline: auto;
}

/* Header */
.site-header {
    background: #2b2b2b;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.logo,
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: #fff;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 560px;
    margin-inline: auto;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    color: #333;
}

.search-bar button {
    border: none;
    background: transparent;
    padding: 0 12px;
    cursor: pointer;
    color: #666;
}

.menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
}

.mobile-nav {
    background: #1f1f1f;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav[hidden] {
    display: none;
}

.mobile-nav a {
    color: #ddd;
    padding: 8px 0;
}

.mobile-nav a:hover {
    color: #f5b800;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-cta {
    background: #f5b800;
    color: #111;
    width: 100%;
}

.btn-cta:hover {
    background: #e0a800;
}

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(135deg, #f5a623 0%, #f5a623 50%, #e74c3c 50%, #e74c3c 100%);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: #fff;
    padding: 48px 16px 100px;
    max-width: 640px;
}

.hero-content h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hero-deals {
    position: relative;
    margin-top: -70px;
    padding-bottom: 32px;
    z-index: 2;
}

.hero-deals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.hero-deals .product-card {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Sections */
.section {
    padding: 48px 0;
}

.section--gray {
    background: #f5f5f5;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #222;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin: 0 0 32px;
    font-size: 15px;
}

.disclaimer {
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.7;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-radius: 4px;
    min-height: 140px;
    overflow: hidden;
}

.category-card:nth-child(5n+1) { background: #fde8ef; }
.category-card:nth-child(5n+2) { background: #e3f2fd; }
.category-card:nth-child(5n+3) { background: #e8f5e9; }
.category-card:nth-child(5n+4) { background: #fff8e1; }
.category-card:nth-child(5n+5) { background: #f3e5f5; }

.category-card-content h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    text-transform: capitalize;
}

.category-card-content .btn-cta {
    width: auto;
    display: inline-flex;
    font-size: 12px;
    padding: 8px 16px;
}

.category-card-image {
    width: 100px;
    flex-shrink: 0;
}

.category-card-image img {
    width: 100%;
    object-fit: contain;
}

/* Advantages */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.advantage-card {
    background: #fff;
    border-radius: 4px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.advantage-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
}

.advantage-icon--yellow { background: #fff3cd; }
.advantage-icon--blue { background: #d1ecf1; }
.advantage-icon--green { background: #d4edda; }
.advantage-icon--purple { background: #e2d9f3; }

.advantage-card h3 {
    font-size: 1rem;
    margin: 0 0 8px;
}

.advantage-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Ranking */
.ranking-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-list li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.ranking-list-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ranking-list h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.ranking-list p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Product card */
.product-card {
    position: relative;
    background: #fff;
    border: 1px solid #eee;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e67e22;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 1;
}

.shop-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    color: #666;
    font-weight: 600;
    z-index: 1;
}

.product-card-image {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.product-card-image img {
    max-height: 140px;
    object-fit: contain;
}

.product-card-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-brand {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.04em;
}

.product-card-price {
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.product-card-price strong {
    font-size: 16px;
}

.price-old {
    color: #c0392b;
    font-size: 13px;
}

.shipping {
    font-size: 11px;
    color: #666;
    width: 100%;
}

.product-card-link {
    flex: 1;
}

.product-card--hidden {
    display: none !important;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.product-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Listing layout */
.listing-page {
    padding: 24px 0 48px;
}

.listing-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.listing-header h1 {
    font-size: 1.6rem;
    margin: 8px 0 12px;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.listing-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-seo {
    margin-top: 32px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

/* Sidebar filters */
.sidebar {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 4px;
    position: sticky;
    top: 72px;
}

.sidebar h2 {
    font-size: 15px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    cursor: pointer;
}

.price-range-display {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.price-slider {
    width: 100%;
    accent-color: #f5b800;
}

.filter-show-more {
    font-size: 13px;
    color: #2196f3;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.filter-show-more:hover {
    text-decoration: underline;
}

/* Product detail */
.product-page {
    padding: 16px 0 48px;
}

.product-page h1 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 8px 0 24px;
    line-height: 1.35;
}

.product-disclaimer {
    font-size: 12px;
    color: #888;
    margin-bottom: 24px;
    line-height: 1.6;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    margin-bottom: 40px;
}

.product-gallery-main img {
    max-height: 400px;
    margin: 0 auto;
    object-fit: contain;
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-gallery-thumbs img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
}

.product-gallery-thumbs img.active {
    border-color: #f5b800;
}

.product-gallery .btn-cta {
    margin-top: 16px;
    max-width: 320px;
}

.offer-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background: #fafafa;
}

.offer-box-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.offer-box-shop {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: lowercase;
}

.offer-box-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.offer-box-shipping {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.product-description h2 {
    font-size: 1.2rem;
    margin: 0 0 16px;
}

.product-description ul {
    padding-left: 20px;
    line-height: 1.8;
}

.related-section h2 {
    font-size: 1.2rem;
    margin: 0 0 20px;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 12px;
    color: #888;
    padding: 12px 0 0;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin-left: 4px;
    color: #bbb;
}

.breadcrumbs a:hover {
    color: #333;
    text-decoration: underline;
}

/* Legal */
.legal-page {
    padding: 32px 0 64px;
}

.legal-page h1 {
    font-size: 1.6rem;
    margin: 0 0 24px;
}

.legal-page p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
}

/* 404 */
.error-page {
    text-align: center;
    padding: 80px 16px;
}

.error-page h1 {
    font-size: 3rem;
    margin: 0 0 8px;
    color: #ccc;
}

.error-page p {
    color: #666;
    margin-bottom: 24px;
}

/* Footer */
.site-footer {
    background: #2b2b2b;
    color: #ccc;
    padding: 40px 0 24px;
    margin-top: auto;
}

.footer-inner {
    text-align: center;
}

.footer-logo {
    justify-content: center;
    margin-bottom: 20px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.footer-nav a {
    color: #ccc;
    font-size: 14px;
}

.footer-nav a:hover {
    color: #f5b800;
}

.footer-copy {
    font-size: 11px;
    color: #777;
    margin: 0;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    display: none;
}

.no-results.visible {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-deals-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-bar {
        display: none;
    }

    .listing-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .product-main {
        grid-template-columns: 1fr;
    }

    .product-grid,
    .product-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .hero-deals-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .product-grid,
    .product-grid--4 {
        grid-template-columns: 1fr;
    }

    .hero-deals-grid {
        grid-template-columns: 1fr;
    }

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