:root {
    --brand: #635bff;
    --brand-2: #8b8dff;
    --bg: #f3f6fb;
    --card: rgba(255, 255, 255, 0.88);
    --card-strong: rgba(255, 255, 255, 0.96);
    --line: rgba(77, 84, 122, 0.12);
    --text: #1d2536;
    --muted: #65708a;
    --radius: 1.5rem;
}

html {
    scroll-behavior: smooth;
}

body.bg-soft {
    background-image:
        url("../img/Plano%20de%20Fundo.png"),
        radial-gradient(circle at top left, rgba(99, 91, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(139, 141, 255, 0.16), transparent 24%),
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.72), transparent 30%);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat;
    background-size: clamp(260px, 46vw, 560px) auto, auto, auto, auto;
    background-position: top center, top left, top right, top center;
    background-color: var(--bg);
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1160px;
}

.navbar-brand-gradient,
.navbar-admin {
    background: linear-gradient(135deg, rgba(99, 91, 255, 0.98), rgba(139, 141, 255, 0.96));
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand,
.nav-link {
    letter-spacing: -0.01em;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.site-logo {
    width: 2.35rem;
    height: 2.35rem;
    object-fit: contain;
    object-position: center;
    display: block;
    flex: 0 0 auto;
}

.navbar-brand::before {
    content: none;
}

.nav-link {
    opacity: 0.92;
}

.nav-link:hover,
.nav-link:focus {
    opacity: 1;
}

.hero-card,
.gift-card,
.panel-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: 0 20px 38px rgba(28, 35, 62, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.hero-card::before,
.panel-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), rgba(99, 91, 255, 0.15));
}

body.public-themed-body {
    background-color: var(--list-page-bg) !important;
    background-image: var(--list-background-image) !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
}
.navbar-brand-gradient.navbar-themed {
    background: linear-gradient(135deg, var(--list-nav-start), var(--list-nav-end));
    color: var(--list-nav-text, #fff);
}

.navbar-themed .navbar-brand,
.navbar-themed .nav-link {
    color: var(--list-nav-text, #fff);
}

.navbar-themed .btn-light {
    color: var(--list-nav-start);
    background: color-mix(in srgb, var(--list-nav-text, #fff) 92%, transparent);
    border-color: transparent;
}

.public-list-page {
    --list-accent: var(--brand);
    --list-accent-2: var(--brand-2);
    --list-page-bg: #f3f6fb;
    --list-card-bg: rgba(255, 255, 255, 0.88);
    --list-card-strong: #ffffff;
    --list-text: var(--text);
    --list-muted: var(--muted);
    --list-line: var(--line);
    --list-on-accent: #ffffff;
    --list-nav-start: var(--brand);
    --list-nav-end: var(--brand-2);
    --list-background-image: none;
    position: relative;
    isolation: isolate;
    margin: -3rem calc((1160px - 100vw) / 2) -3rem;
    padding: 3rem max(1rem, calc((100vw - 1160px) / 2));
    min-height: calc(100vh - 4rem);
    background-color: var(--list-page-bg);
}

.public-list-page::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: var(--list-background-image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0.2;
    pointer-events: none;
}

.public-list-page > * {
    position: relative;
    z-index: 1;
}

.public-list-page .hero-card::before,
.public-list-page .panel-card::before {
    background: linear-gradient(90deg, var(--list-accent), color-mix(in srgb, var(--list-accent) 12%, transparent));
}

.public-list-page .gift-card {
    border-top: 4px solid var(--list-accent);
    background: var(--list-card-bg);
}

.public-list-page .quantity-pill {
    border-color: color-mix(in srgb, var(--list-accent) 38%, transparent);
    background: color-mix(in srgb, var(--list-accent) 12%, white);
    color: color-mix(in srgb, var(--list-accent) 76%, #1d2536);
}

.public-list-page {
    color: var(--list-text);
}

.public-list-page .hero-card,
.public-list-page .panel-card,
.public-list-page .gift-card {
    background: var(--list-card-bg);
    border-color: var(--list-line);
    color: var(--list-text);
}

.public-list-page .public-list-hero {
    background: var(--list-card-strong);
}

.public-list-page .hero-card::before,
.public-list-page .panel-card::before {
    background: linear-gradient(90deg, var(--list-accent), var(--list-accent-2));
}

.public-list-page .text-muted,
.public-list-page .form-text {
    color: var(--list-muted) !important;
}

.public-list-page .text-primary {
    color: var(--list-accent) !important;
}

.public-list-page .btn-brand {
    color: var(--list-on-accent);
    background: linear-gradient(135deg, var(--list-accent), var(--list-accent-2));
    border-color: var(--list-accent);
    box-shadow: 0 10px 20px color-mix(in srgb, var(--list-accent) 24%, transparent);
}

.public-list-page .btn-brand:hover,
.public-list-page .btn-brand:focus {
    color: var(--list-on-accent);
    filter: brightness(.94) saturate(1.08);
}

.public-list-page .btn-outline-secondary {
    color: var(--list-accent);
    border-color: var(--list-line);
}

.public-list-page .btn-outline-secondary:hover,
.public-list-page .btn-outline-secondary:focus {
    color: var(--list-on-accent);
    background: var(--list-accent);
    border-color: var(--list-accent);
}

.public-list-page .form-select,
.public-list-page .form-control,
.public-list-page .border,
.public-list-page .bg-white {
    border-color: var(--list-line) !important;
    background-color: var(--list-card-strong) !important;
    color: var(--list-text);
}

.public-list-page .gift-card {
    border-top-color: var(--list-accent);
}

.theme-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

@media (min-width: 768px) {
    .theme-picker {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .theme-picker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (pointer: coarse) {
    .customization-layout > .col-lg-5,
    .customization-layout > .col-lg-7 {
        flex: 0 0 auto;
        width: 100%;
    }

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

.theme-option {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    min-height: 58px;
    padding: .55rem .6rem;
    border: 1px solid rgba(77, 84, 122, .12);
    border-radius: .85rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.theme-option strong {
    min-width: 0;
    overflow: hidden;
    font-size: .82rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-option:hover,
.theme-option:focus-within {
    border-color: var(--theme-accent);
    transform: translateY(-1px);
}

.theme-option.is-selected {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

.theme-option-swatch {
    display: inline-flex;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: .8rem;
    background: var(--theme-page);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.theme-option-swatch i:first-child {
    width: 38%;
    height: 100%;
    background: var(--theme-accent);
}

.theme-option-swatch i:last-child {
    flex: 1;
    height: 70%;
    margin-top: 15%;
    background: var(--theme-accent-2);
    border-radius: .35rem 0 0 .35rem;
}
.customization-preview {
    border: 1px solid rgba(99, 91, 255, 0.14);
    background: #f3f6fb;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: background-color 0.18s ease, background-image 0.18s ease;
}

.customization-preview-header {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    border-radius: 0.85rem;
}

.list-header-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    object-position: center;
    margin-inline: auto;
    border-radius: 1.15rem;
    box-shadow: 0 12px 26px rgba(28, 35, 62, 0.14);
}

.public-list-hero {
    background: rgba(255, 255, 255, 0.84);
}

.gift-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.gift-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px rgba(28, 35, 62, 0.12);
}

.gift-cover {
    height: 160px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    overflow: hidden;
}

.public-list-page .gift-cover {
    background: linear-gradient(135deg, var(--list-accent), var(--list-accent-2));
    color: var(--list-on-accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--list-on-accent) 18%, transparent);
}

.gift-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-visual {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    aspect-ratio: 16 / 10;
    min-height: 260px;
    overflow: hidden;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(99, 91, 255, 0.06), rgba(139, 141, 255, 0.08));
}

.hero-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.gift-cover-large {
    height: 280px;
}

.gift-image-preview {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

.image-option-card {
    display: block;
    border: 2px solid rgba(99, 91, 255, 0.12);
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
    height: 100%;
    transition: all 0.18s ease;
    box-shadow: 0 8px 18px rgba(28, 35, 62, 0.05);
}

.image-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(28, 35, 62, 0.08);
}

.image-option-card.is-selected {
    border-color: var(--brand);
    box-shadow: 0 16px 28px rgba(99, 91, 255, 0.18);
}

.image-option-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-option-card .badge {
    font-size: 0.72rem;
}

.quantity-pill {
    background: rgba(99, 91, 255, 0.1);
    color: var(--brand);
    border: 1px solid rgba(99, 91, 255, 0.16);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

h1, h2, h3, h4, h5 {
    letter-spacing: -0.03em;
}

p,
.form-label,
.form-text,
.small,
.text-muted {
    color: var(--muted) !important;
}

.form-label {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 0.95rem;
    border-color: rgba(77, 84, 122, 0.14);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    border-color: rgba(99, 91, 255, 0.48);
    box-shadow: 0 0 0 0.25rem rgba(99, 91, 255, 0.12);
}

.btn {
    border-radius: 0.95rem;
    font-weight: 600;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: none;
    color: white;
    box-shadow: 0 12px 24px rgba(99, 91, 255, 0.2);
}

.btn-brand:hover {
    color: white;
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.btn-outline-secondary,
.btn-outline-warning,
.btn-outline-success,
.btn-outline-danger {
    background: rgba(255, 255, 255, 0.58);
}

.badge {
    border-radius: 999px;
    font-weight: 600;
}

.alert {
    border-radius: 1rem;
    border-color: rgba(77, 84, 122, 0.08);
}

.table thead th {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .hero-visual {
        aspect-ratio: 4 / 3;
        min-height: 220px;
    }
}

@media (max-width: 575.98px) {
    .public-list-page {
        width: 100vw;
        margin: -3rem 0 -3rem calc(50% - 50vw);
        padding: 3rem 0.75rem;
    }

    body.bg-soft {
        background-size: clamp(180px, 70vw, 320px) auto, auto, auto, auto;
    }

    .site-logo {
        width: 2.05rem;
        height: 2.05rem;
    }

    .navbar-brand {
        gap: 0.4rem;
        font-size: 0.97rem;
    }

    .hero-visual {
        aspect-ratio: 4 / 3;
        min-height: 180px;
    }
}

footer::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 50%;
    transform: translateX(-50%);
    width: min(260px, 40vw);
    height: 1px;
    background: rgba(77, 84, 122, 0.14);
}

.product-suggestion-popover {
    position: absolute;
    z-index: 1050;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    max-height: 22rem;
    overflow-y: auto;
    padding: .35rem;
    background: #fff;
    border: 1px solid rgba(81, 73, 216, .18);
    border-radius: .85rem;
    box-shadow: 0 .8rem 2rem rgba(29, 37, 54, .16);
}

.product-suggestion-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .6rem;
    text-align: left;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: .65rem;
}

.product-suggestion-item:hover,
.product-suggestion-item:focus-visible {
    background: #f3f6fb;
    outline: none;
}

.product-suggestion-item img {
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 3.2rem;
    object-fit: contain;
    border-radius: .5rem;
    background: #fff;
}

.product-suggestion-copy {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.product-suggestion-copy strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: .88rem;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-suggestion-copy small,
.product-suggestion-message {
    color: #65708a;
    font-size: .78rem;
}

.product-suggestion-message {
    padding: .75rem;
}
