:root {
    --primary: #1858d6;
    --primary-dark: #103d9c;
    --accent: #ff6a00;
    --accent-soft: #fff2e8;
    --ink: #162033;
    --muted: #667085;
    --border: #e6e9ef;
    --surface: #ffffff;
    --soft: #f7f8fb;
    --success: #168a49;
    --shadow: 0 18px 50px rgba(18, 38, 63, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input {
    font: inherit;
}

body.cart-open {
    overflow: hidden;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 86px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(16px);
    display: grid;
    grid-template-columns: 240px minmax(280px, 1fr) auto;
    gap: 22px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 17px 17px 17px 5px;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(24, 88, 214, .25);
}

.brand strong {
    display: block;
    color: var(--primary);
    font-size: 26px;
    line-height: 1;
    letter-spacing: -.8px;
}

.brand small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.search-box {
    max-width: 660px;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    background: var(--soft);
}

.search-box span {
    color: var(--muted);
    font-size: 26px;
    transform: rotate(-20deg);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.cliente-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}

.cliente-box small {
    color: var(--muted);
}

.badge-reventa {
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

.cart-button,
.login-button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(255, 106, 0, .22);
}

.page-shell {
    min-height: calc(100vh - 86px);
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 86px;
    height: calc(100vh - 86px);
    border-right: 1px solid var(--border);
    padding: 18px 14px;
    overflow-y: auto;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar nav,
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar a {
    padding: 12px 14px;
    border-radius: 10px;
    color: #5f6571;
    font-weight: 600;
}

.sidebar a:hover,
.sidebar a.active {
    background: #eef3ff;
    color: var(--primary);
}

.sidebar-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 34px 70px;
}

.hero {
    min-height: 280px;
    border-radius: 24px;
    overflow: hidden;
    padding: 44px 52px;
    background:
        radial-gradient(circle at 75% 30%, rgba(255,255,255,.22), transparent 24%),
        linear-gradient(120deg, #ff6a00, #ff8a00);
    color: white;
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    align-items: center;
    box-shadow: var(--shadow);
}

.hero-kicker,
.section-kicker {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 700px;
    margin: 10px 0 12px;
    font-size: clamp(34px, 4.6vw, 64px);
    line-height: 1.02;
    letter-spacing: -2px;
}

.hero p {
    max-width: 650px;
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
}

.hero-button {
    display: inline-flex;
    margin-top: 24px;
    padding: 13px 19px;
    border-radius: 10px;
    background: white;
    color: var(--accent);
    font-weight: 900;
}

.hero-visual {
    position: relative;
    min-height: 210px;
    display: grid;
    place-items: center;
}

.hero-circle {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 38px solid rgba(255,255,255,.18);
    border-radius: 50%;
}

.hero-visual strong {
    position: relative;
    font-size: 30px;
    line-height: 1;
    text-align: center;
    transform: rotate(-7deg);
}

.guest-notice,
.customer-notice {
    margin: 22px 0 10px;
    padding: 15px 18px;
    border-radius: 12px;
    font-size: 14px;
}

.guest-notice {
    background: #f4f5f8;
    color: #4e5664;
}

.customer-notice {
    background: #edf9f1;
    color: #17663a;
}

.section-heading {
    margin: 34px 0 17px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-spacing {
    margin-top: 52px;
}

.section-kicker {
    color: var(--accent);
}

.section-heading h2 {
    margin: 4px 0 0;
    font-family: Georgia, serif;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -.8px;
}

.section-heading > a {
    color: var(--muted);
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    position: relative;
    min-width: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

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

.product-image-wrap {
    position: relative;
    height: 255px;
    border-bottom: 1px solid var(--border);
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #ffffff, #fafbfc);
}

.product-image {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.product-badge,
.detail-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.product-info {
    position: relative;
    padding: 15px 16px 18px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.presentation {
    color: var(--muted);
    font-size: 15px;
}

.product-name {
    margin: 7px 0 16px;
    min-height: 52px;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 850;
}

.price-condition {
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
}

.price-reventa,
.price-publico,
.detail-main-price {
    display: block;
    margin-top: 4px;
    color: var(--accent);
    font-size: 30px;
    line-height: 1.15;
}

.price-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.price-publico {
    color: var(--ink);
}

.price-publico-small {
    margin-top: 4px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
}

.stock-line {
    margin-top: 12px;
    color: var(--success);
    font-size: 13px;
}

.add-button {
    align-self: flex-end;
    margin-top: auto;
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 9px 18px rgba(24, 88, 214, .20);
}

.product-page {
    max-width: 1350px;
}

.breadcrumb {
    margin: 3px 0 24px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr);
    gap: 60px;
    align-items: start;
}

.product-detail-image {
    position: relative;
    min-height: 530px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, white, #fafbfc);
    display: grid;
    place-items: center;
}

.product-detail-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.product-detail-info {
    padding-top: 18px;
}

.detail-presentation {
    font-size: 19px;
}

.product-detail-info h1 {
    max-width: 680px;
    margin: 10px 0 18px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.02;
    letter-spacing: -1.8px;
}

.detail-condition {
    display: block;
    font-size: 19px;
}

.detail-main-price {
    margin-top: 8px;
    font-size: clamp(42px, 5vw, 66px);
}

.detail-main-price.public {
    color: var(--ink);
}

.detail-public-price {
    display: block;
    margin-top: 6px;
    font-size: 17px;
    font-weight: 800;
}

.detail-stock {
    margin: 22px 0 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--success);
}

.stock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(22, 138, 73, .12);
}

.quantity-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.quantity-control {
    display: grid;
    grid-template-columns: 44px 58px 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.quantity-control button,
.quantity-control input {
    border: 0;
    background: white;
    text-align: center;
}

.quantity-control button {
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
}

.quantity-control input {
    width: 100%;
    outline: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.detail-add-button {
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 900;
    cursor: pointer;
}

.guest-detail-box {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--soft);
    color: var(--muted);
}

.description-box {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.description-box h3 {
    margin: 0 0 8px;
}

.description-box p {
    color: #4d5562;
    line-height: 1.6;
}

.description-box dl {
    margin-top: 18px;
}

.description-box dl div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.description-box dt {
    color: var(--muted);
}

.description-box dd {
    margin: 0;
    font-weight: 800;
}

.cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(16, 24, 40, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.cart-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    width: min(440px, 94vw);
    height: 100vh;
    background: white;
    box-shadow: -18px 0 55px rgba(16, 24, 40, .20);
    transform: translateX(105%);
    transition: transform .25s ease;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

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

.cart-header,
.cart-footer {
    padding: 22px;
    border-bottom: 1px solid var(--border);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-header small {
    color: var(--muted);
}

.cart-header h2 {
    margin: 3px 0 0;
}

.cart-header button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--soft);
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    padding: 12px 22px;
    overflow-y: auto;
}

.empty-cart {
    min-height: 350px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    color: var(--muted);
}

.empty-cart span {
    font-size: 42px;
}

.empty-cart h3 {
    margin: 10px 0 3px;
    color: var(--ink);
}

.empty-cart p {
    margin: 0;
}

.cart-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-main span {
    color: var(--muted);
    font-size: 13px;
}

.cart-item-actions {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cart-item-actions button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: white;
    cursor: pointer;
}

.cart-item-actions .remove-item {
    margin-left: 5px;
    color: #c02828;
}

.cart-item-subtotal {
    float: right;
    margin-top: -29px;
}

.cart-footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.cart-total-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cart-total-line strong {
    font-size: 24px;
}

.checkout-button {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 210px 1fr auto;
    }

    .cliente-box {
        display: none;
    }

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

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .search-box {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: none;
    }

    .page-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 10px 14px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .sidebar nav {
        display: flex;
        flex-direction: row;
    }

    .sidebar-bottom {
        display: none;
    }

    .content {
        padding: 24px 18px 60px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 34px 26px;
    }

    .hero-visual {
        display: none;
    }

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

    .product-detail {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .product-detail-image {
        min-height: 400px;
    }
}

@media (max-width: 580px) {
    .topbar {
        padding: 12px;
        gap: 12px;
    }

    .brand small {
        display: none;
    }

    .brand strong {
        font-size: 22px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        font-size: 25px;
    }

    .cart-button,
    .login-button {
        min-height: 42px;
        padding: 0 12px;
        font-size: 13px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .product-image-wrap {
        height: 280px;
    }

    .product-info {
        min-height: auto;
    }

    .add-button {
        margin-top: 18px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading > a {
        font-size: 13px;
    }

    .product-detail-image {
        min-height: 330px;
    }

    .product-detail-info h1 {
        font-size: 34px;
    }

    .quantity-row {
        flex-direction: column;
    }

    .quantity-control {
        width: 100%;
        grid-template-columns: 1fr 1fr 1fr;
        min-height: 50px;
    }

    .detail-add-button {
        width: 100%;
    }
}


.category-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
}

.category-icon {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f3f5f9;
    display: inline-grid;
    place-items: center;
    font-size: 17px;
}

.category-menu a:hover .category-icon,
.category-menu a.active .category-icon {
    background: #dfe9ff;
}

.home-carousel {
    position: relative;
    width: 100%;
    min-height: 320px;
    overflow: hidden;
    border-radius: 24px;
    background: #f2f4f7;
    box-shadow: var(--shadow);
}

.carousel-track {
    position: relative;
    min-height: 320px;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease, visibility .55s ease;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
}

.carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(9, 26, 61, .82) 0%, rgba(9, 26, 61, .48) 42%, rgba(9, 26, 61, .05) 76%);
}

.carousel-caption {
    position: absolute;
    z-index: 2;
    left: 54px;
    top: 50%;
    width: min(590px, 70%);
    transform: translateY(-50%);
    color: white;
}

.carousel-caption span {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.carousel-caption h1,
.carousel-caption h2 {
    margin: 0 0 10px;
    font-size: clamp(34px, 4vw, 60px);
    line-height: 1.02;
    letter-spacing: -1.8px;
}

.carousel-caption p {
    max-width: 520px;
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
}

.carousel-caption a {
    display: inline-flex;
    margin-top: 22px;
    padding: 12px 18px;
    border-radius: 10px;
    background: white;
    color: var(--primary-dark);
    font-weight: 900;
}

.carousel-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .15);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

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

.carousel-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.carousel-dots button.active {
    width: 28px;
    background: white;
}

@media (max-width: 900px) {
    .home-carousel,
    .carousel-track,
    .carousel-slide img {
        min-height: 285px;
    }

    .carousel-caption {
        left: 28px;
        width: calc(100% - 80px);
    }

    .carousel-caption p {
        font-size: 15px;
    }
}

@media (max-width: 580px) {
    .home-carousel,
    .carousel-track,
    .carousel-slide img {
        min-height: 330px;
    }

    .carousel-slide::after {
        background: linear-gradient(90deg, rgba(9, 26, 61, .87), rgba(9, 26, 61, .42));
    }

    .carousel-caption {
        left: 24px;
        width: calc(100% - 48px);
    }

    .carousel-caption h1,
    .carousel-caption h2 {
        font-size: 35px;
        letter-spacing: -1px;
    }

    .carousel-arrow {
        display: none;
    }
}
