:root {
    --bg-0: #070b1d;
    --bg-1: #0d1530;
    --bg-2: #121f42;
    --line: rgba(103, 128, 213, 0.28);
    --line-soft: rgba(103, 128, 213, 0.18);
    --text: #eaf0ff;
    --text-soft: #aab7da;
    --primary: #4f7cff;
    --primary-2: #00d4ff;
    --success: #22c55e;
    --danger: #ef4444;
    --promo: #f97316;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 10%, rgba(79, 124, 255, 0.18), transparent 25%),
        radial-gradient(circle at 86% 14%, rgba(0, 212, 255, 0.15), transparent 25%),
        linear-gradient(180deg, var(--bg-1), var(--bg-0));
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-custom {
    background: rgba(8, 13, 32, 0.9);
    border-bottom: 1px solid var(--line-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.navbar-brand i {
    margin-right: 8px;
    color: var(--primary-2);
}

.nav-link {
    color: #e8edff !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 8px 12px !important;
}

.nav-link:hover {
    background: rgba(79, 124, 255, 0.15);
}

.nav-link-danger {
    color: #ffb3b3 !important;
}

.home-shell {
    width: min(1360px, calc(100% - 24px));
    margin: 22px auto 30px;
}

.hero-card {
    background: linear-gradient(145deg, rgba(16, 28, 58, 0.95), rgba(26, 17, 49, 0.95));
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 45px rgba(5, 8, 20, 0.38);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: center;
}

.hero-card.has-hero-logo .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
}

.hero-main {
    min-width: 0;
}

.hero-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(150deg, rgba(10, 18, 42, 0.65), rgba(27, 18, 50, 0.62));
    padding: 14px;
}

.hero-logo-image {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.32));
}

.hero-card h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 800;
    color: #f3f7ff;
}

.hero-card p {
    margin: 8px 0 0;
    color: var(--text-soft);
}

.hero-stats {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-stats span {
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.hero-stats strong {
    color: #ffffff;
}

.hero-shortcuts {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.shortcut-link {
    text-decoration: none;
    color: #e6ebff;
    border: 1px solid var(--line);
    background: rgba(79, 124, 255, 0.1);
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.shortcut-link:hover {
    color: #fff;
    border-color: rgba(0, 212, 255, 0.45);
}

.shortcut-link.is-active {
    border-color: rgba(0, 212, 255, 0.7);
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.3), rgba(0, 212, 255, 0.2));
}

.btn-share {
    margin-top: 14px;
    border: 1px solid rgba(34, 197, 94, 0.55);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(10, 84, 41, 0.45));
    color: #d8ffe7;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
}

.btn-share:hover {
    border-color: rgba(34, 197, 94, 0.8);
}

.filters-panel {
    margin-top: 16px;
    background: rgba(13, 22, 49, 0.95);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 14px;
}

.category-strip {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-chip {
    text-decoration: none;
    color: #dfe8ff;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.83rem;
    background: rgba(255, 255, 255, 0.03);
}

.category-chip:hover {
    border-color: rgba(0, 212, 255, 0.5);
    color: #fff;
}

.category-chip.is-active {
    border-color: rgba(0, 212, 255, 0.7);
    background: rgba(0, 212, 255, 0.2);
}

.filters-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 2.1fr 1fr 1fr 1fr;
    align-items: end;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(0, 212, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.form-control::placeholder {
    color: #94a3c7;
}

.form-select option {
    background: #111b3d;
    color: #fff;
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-filter-submit,
.btn-filter-reset {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
}

.btn-filter-submit {
    color: #fff;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.9), rgba(0, 212, 255, 0.75));
}

.btn-filter-reset {
    color: #dbe6ff;
    background: rgba(255, 255, 255, 0.04);
}

.catalog-meta {
    margin-top: 14px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.catalog-grid {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(222px, 1fr));
}

.product-card {
    background: rgba(13, 21, 44, 0.98);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card.is-destaque {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.25) inset;
    background: linear-gradient(180deg, rgba(15, 28, 58, 0.98), rgba(23, 16, 45, 0.98));
}

.product-image-box {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.product-carousel {
    display: flex;
    width: 100%;
    transition: transform 0.35s ease;
}

.product-image {
    width: 100%;
    min-width: 100%;
    height: 206px;
    object-fit: cover;
}

.badge-promocao,
.badge-destaque,
.badge-esgotado {
    position: absolute;
    z-index: 4;
    font-size: 0.72rem;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-promocao {
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff;
}

.badge-promocao strong {
    background: rgba(4, 52, 20, 0.45);
    padding: 2px 8px;
    border-radius: 999px;
}

.badge-destaque {
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #00d4ff, #3578ff);
    color: #fff;
}

.badge-esgotado {
    top: 44px;
    right: 8px;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(5, 9, 25, 0.68);
    color: #fff;
    z-index: 5;
}

.carousel-nav.prev { left: 7px; }
.carousel-nav.next { right: 7px; }

.carousel-indicators {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 7px;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 5;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.55);
}

.carousel-dot.active {
    background: #00d4ff;
}

.product-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.thumb-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0;
    min-width: 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
    background: transparent;
}

.thumb-btn.active {
    border-color: rgba(0, 212, 255, 0.65);
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: 11px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.product-title a {
    color: #edf2ff;
    text-decoration: none;
}

.product-title a:hover {
    color: #8cc8ff;
}

.price-old {
    color: #9ca8c6;
    text-decoration: line-through;
    font-size: 0.84rem;
}

.price-current {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 800;
    color: #ffffff;
}

.price-installment {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-top: 0.35rem;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: normal;
}

.price-installment-interest {
    color: #fde68a;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.2));
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow:
        0 4px 10px rgba(249, 115, 22, 0.2),
        0 0 0 1px rgba(249, 115, 22, 0.12) inset;
}

.price-installment-no-interest {
    color: #86efac;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow:
        0 4px 10px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.12) inset;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-view-product,
.btn-add-product {
    border-radius: 10px;
    border: 1px solid var(--line);
    text-decoration: none;
    text-align: center;
    padding: 9px 8px;
    font-size: 0.86rem;
    font-weight: 700;
}

.btn-view-product {
    color: #e7ecff;
    background: rgba(255, 255, 255, 0.04);
}

.btn-add-product {
    color: #ecfff6;
    background: linear-gradient(135deg, #089c55, #1dbf65);
    border-color: rgba(34, 197, 94, 0.65);
}

.btn-add-product.is-disabled {
    background: rgba(112, 121, 152, 0.25);
    color: #9ba7ca;
    border-color: rgba(112, 121, 152, 0.35);
}

.empty-state {
    margin-top: 18px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 26px 14px;
    color: var(--text-soft);
}

.empty-state i {
    font-size: 2rem;
    color: #7f90c2;
}

.btn-empty {
    margin-top: 10px;
    display: inline-block;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #f1f5ff;
    padding: 8px 12px;
}

.pagination-wrap {
    margin-top: 14px;
}

.pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-link {
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #dbe5ff;
    text-decoration: none;
    min-width: 36px;
    padding: 8px 10px;
    text-align: center;
    font-weight: 700;
    display: inline-block;
}

.pagination-link.active {
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.9), rgba(0, 212, 255, 0.75));
    color: #fff;
    border-color: transparent;
}

.floating-cart {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1100;
}

.cart-button {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #3578ff, #00c8ff);
    box-shadow: 0 10px 22px rgba(18, 68, 173, 0.38);
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: #ef4444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    z-index: 1200;
}

.cart-overlay.show {
    display: block;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: min(420px, 100%);
    height: 100dvh;
    z-index: 1201;
    background: #0f1735;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
}

.cart-close {
    border: 0;
    background: transparent;
    color: #fff;
}

.cart-sidebar-body {
    flex: 1;
    overflow: auto;
    padding: 12px;
}

.cart-sidebar-footer {
    border-top: 1px solid var(--line-soft);
    padding: 12px;
}

.cart-empty {
    text-align: center;
    color: var(--text-soft);
    padding: 20px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 700;
}

.cart-item-detail {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.cart-item-price {
    font-weight: 700;
    margin-top: 3px;
}

.cart-item-remove {
    border: 0;
    background: transparent;
    color: #ffb4b4;
}

.cart-total-label {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.cart-total-value {
    font-size: 1.35rem;
    font-weight: 800;
}

.btn-checkout {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 11px 12px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.selection-modal,
.alert-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.65);
}

.selection-modal.show,
.alert-modal.show {
    display: flex;
}

.selection-modal-content,
.alert-modal-content {
    width: min(640px, 100%);
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #101a3b;
    color: #fff;
    padding: 14px;
}

.selection-modal-header {
    margin-bottom: 10px;
}

.selection-modal-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.selection-group {
    margin-top: 10px;
}

.selection-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.selection-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.selection-option {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: 8px 10px;
    font-weight: 700;
}

.selection-option.selected {
    border-color: rgba(34, 197, 94, 0.8);
    background: rgba(34, 197, 94, 0.22);
}

.selection-modal-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-modal-cancel,
.btn-modal-confirm,
.alert-modal-button {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 800;
}

.btn-modal-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-modal-confirm {
    background: linear-gradient(135deg, #3578ff, #00c8ff);
    color: #fff;
}

.alert-modal-title {
    margin-top: 8px;
}

.alert-modal-message {
    color: var(--text-soft);
}

.alert-modal-button {
    background: linear-gradient(135deg, #3578ff, #00c8ff);
    color: #fff;
}

.success-toast {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1500;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(16, 133, 68, 0.94), rgba(20, 163, 74, 0.92));
    color: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(120%);
    transition: transform 0.25s ease;
}

.success-toast.show {
    transform: translateX(0);
}

.public-footer {
    margin-top: 22px;
    border-top: 1px solid var(--line-soft);
    padding: 16px 10px 24px;
    color: #b8c3e6;
    text-align: center;
}

.public-footer a {
    color: #8dc7ff;
    text-decoration: none;
}

@media (max-width: 1080px) {
    .hero-card.has-hero-logo .hero-layout {
        grid-template-columns: 1fr;
    }
    .hero-logo-box {
        min-height: 120px;
    }
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
    .filter-col-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .home-shell {
        width: calc(100% - 14px);
        margin-top: 12px;
    }
    .hero-card {
        padding: 14px;
    }
    .hero-shortcuts {
        flex-direction: column;
    }
    .hero-logo-image {
        max-height: 92px;
    }
    .shortcut-link {
        width: 100%;
        justify-content: center;
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .filter-actions {
        grid-template-columns: 1fr;
    }
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-image {
        height: 200px;
    }
    .selection-modal-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
    .success-toast {
        left: 10px;
        right: 10px;
        transform: translateY(-130%);
    }
    .success-toast.show {
        transform: translateY(0);
    }
}
