:root {
    --red: #e01e24;
    --red-dark: #b3151a;
    --dark: #000000;
    --ink: #12131a;
    --gray-800: #2a2a2a;
    --gray-100: #f4f4f4;
    --gray-300: #e2e2e2;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --header-h: 76px;
    --info-h: 40px;
    --footer-h: 132px;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + var(--info-h) + 70px);
}

body {
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

/* ===== Site header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--ink);
    border-bottom: 3px solid var(--red);
}

.header-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.75rem;
    padding: 0.45rem 1.5rem;
    background: var(--red);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 600;
}

.header-info span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    text-decoration: none;
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-logo-text {
    color: var(--white);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.header-search-wrap {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.header-search {
    display: flex;
    background: var(--white);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.6rem 1.1rem;
    font: inherit;
    font-size: 0.92rem;
    min-width: 0;
}

.header-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: var(--red);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s;
}

.header-search button:hover {
    background: var(--red-dark);
}

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

/* Search suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    list-style: none;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    z-index: 55;
    max-height: 70vh;
    overflow-y: auto;
}

.search-suggestions[hidden] {
    display: none;
}

.search-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    text-decoration: none;
    color: var(--dark);
}

.search-suggestion:hover,
.search-suggestion.is-highlighted {
    background: var(--gray-100);
}

.search-suggestion img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--gray-100);
}

.search-suggestion-info {
    min-width: 0;
}

.search-suggestion-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-category {
    font-size: 0.75rem;
    color: #888;
}

.search-suggestion-empty {
    padding: 0.9rem 1rem;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
}

.search-suggestion-more {
    justify-content: center;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    color: var(--red);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.search-suggestion-more:hover {
    background: var(--gray-300);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.header-nav a {
    color: #c7c7cf;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.is-active {
    color: var(--white);
    border-color: var(--red);
}

.cart-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s;
}

.cart-toggle:hover {
    background: var(--red);
}

.cart-toggle svg {
    width: 20px;
    height: 20px;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
    border: 2px solid var(--ink);
}

.cart-count[hidden] {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Category quick links (loja.html) */
.category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.category-chip:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* ===== Cart drawer ===== */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 60;
}

.cart-overlay.is-open {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 100%);
    background: var(--white);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
    z-index: 61;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.cart-drawer.is-open {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-300);
}

.cart-drawer-header h2 {
    font-size: 1.15rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0.25rem;
}

.cart-close:hover {
    color: var(--red);
}

.cart-items {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    background: var(--white);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--dark);
}

.qty-btn:hover {
    background: var(--gray-100);
}

.cart-item-qty {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
}

.cart-item-remove:hover {
    color: var(--red);
}

.cart-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #888;
}

.cart-empty[hidden],
.cart-items[hidden] {
    display: none;
}

.cart-drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-300);
}

.cart-checkout {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0;
}

.cart-checkout[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.5;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
}

.hero-banner {
    padding-bottom: 280px;
    background-image: url('assets/hero-banner.png'), linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: center calc(100% + 10px), center;
    background-size: min(1400px, 92%) auto, cover;
}

.hero h1 {
    font-size: 2.4rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.hero p {
    max-width: 620px;
    margin: 0 auto;
    color: #555;
    font-size: 1.05rem;
}

.btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s, transform 0.2s;
}

.btn:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

/* ===== Main / sections ===== */
main {
    flex: 1;
}

.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--dark);
    position: relative;
}

.section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    background: var(--red);
    margin: 0.6rem auto 0;
    border-radius: 2px;
}

.services {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.service-item {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-top: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 1.5rem;
    flex: 1 1 260px;
    min-width: 0;
    max-width: 320px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.service-item:hover {
    transform: translateY(-4px);
}

.service-item h3 {
    color: var(--red);
    margin-bottom: 0.5rem;
}

/* ===== Brands ===== */
.brands {
    background: var(--gray-100);
}

.brand-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.brands-cta {
    text-align: center;
    margin-top: 1.75rem;
}

.brand-tag {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: var(--dark);
    box-shadow: var(--shadow);
}

/* ===== Products / loja ===== */
.category-section {
    padding: 2.5rem 0;
    border-top: 1px solid var(--gray-300);
}

.category-section:first-of-type {
    border-top: none;
}

.category-section h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.category-section h2::after {
    margin: 0.6rem 0 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: contain;
    background: var(--white);
    padding: 0.5rem;
}

.product-card .product-info {
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card h3 {
    color: var(--red);
    margin-bottom: 0.4rem;
}

.product-card p {
    color: #555;
    font-size: 0.88rem;
    flex: 1;
}

.add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: var(--red);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-cart:hover {
    background: var(--red-dark);
}

.add-to-cart svg {
    width: 16px;
    height: 16px;
}

.add-to-cart.is-added {
    background: #1a9e4e;
}

.no-results {
    text-align: center;
    color: #888;
    padding: 3rem 1.5rem;
}

.no-results[hidden] {
    display: none;
}

/* ===== Testimonials ===== */
.testimonials {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.testimonial {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    flex: 1 1 300px;
    min-width: 0;
    max-width: 340px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--red);
}

.testimonial p.quote {
    font-style: italic;
    color: #444;
    margin-bottom: 0.75rem;
}

.testimonial .author {
    font-weight: 700;
    color: var(--red);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: #999;
    border-top: 3px solid var(--red);
    text-align: center;
    padding: 1.75rem 1.5rem 1.25rem;
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    text-decoration: none;
    transition: background 0.2s;
}

.footer-social a:hover {
    background: var(--red);
}

.footer a {
    color: var(--gray-300);
    text-decoration: none;
}

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

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: calc(var(--header-h) + var(--info-h));
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
    html {
        scroll-padding-top: 285px;
    }

    .page {
        padding-top: 215px;
    }

    .header-bar {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
        order: 1;
    }

    .header-logo {
        order: 2;
    }

    .cart-toggle {
        order: 3;
        margin-left: auto;
    }

    .header-search-wrap {
        order: 4;
        max-width: none;
        width: 100%;
    }

    .header-nav {
        order: 5;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .header-nav.is-open {
        max-height: 20rem;
        margin-top: 0.5rem;
    }

    .header-nav a {
        padding: 0.7rem 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .header-info {
        font-size: 0.72rem;
        gap: 0.4rem 1rem;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-banner {
        padding-bottom: 150px;
        background-size: min(700px, 96%) auto, cover;
    }

    .category-bar {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.75rem;
    }
}
