@charset "UTF-8";
/* =========================================================================
   Vitalis UI — Part 2/4: layout primitives & base components
   ========================================================================= */

/* --------------------------- layout helpers ---------------------------- */
.container-wide {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: 16px;
}

@media (max-width: 575.98px) {
    .container, .container-wide, .container-fluid {
        padding-inline: 14px;
    }
}

.stack > * + * {
    margin-top: var(--stack-gap, 1rem);
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--cluster-gap, .6rem);
}

.push-left {
    margin-left: auto;
}

.push-right {
    margin-right: auto;
}

/* --------------------------- section wrapper --------------------------- */
.section {
    padding: clamp(2rem, 1.2rem + 3vw, 4rem) 0;
}

.section--tight {
    padding: clamp(1.4rem, 1rem + 1.6vw, 2.4rem) 0;
}

.section--surface {
    background: var(--c-surface);
}

.section--soft {
    background: var(--c-surface-2);
}

.section--brand {
    background: var(--c-brand-50);
    color: var(--c-ink-2);
    border-block: 1px solid var(--c-line);
}

.section--brand h1, .section--brand h2, .section--brand h3 {
    color: var(--c-ink);
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.section__title {
    position: relative;
    margin: 0;
    padding-right: .85rem;
    font-size: clamp(1.15rem, 1rem + .7vw, 1.55rem);
}

.section__title::before {
    content: "";
    position: absolute;
    top: .28em;
    right: 0;
    bottom: .28em;
    width: 5px;
    border-radius: var(--r-pill);
    background: linear-gradient(to bottom, var(--c-brand-400), var(--c-leaf-400));
}

.section__subtitle {
    margin: .25rem 0 0;
    font-size: .9rem;
    font-weight: 400;
    color: var(--c-ink-3);
}

.section__link {
    flex: none;
    font-size: .88rem;
    white-space: nowrap;
}

.section__link i {
    font-size: .78em;
    margin-right: .3rem;
    transition: transform var(--t-fast);
    display: inline-block;
}

.section__link:hover i {
    transform: translateX(-4px);
}

/* Legacy page headings (`<h1>` straight inside content) used to be styled by
   an inline block in base.html. Keep them presentable. */
.page-head {
    padding: 1.6rem 0 0;
}

.page-title {
    margin: 0;
}

.page-title__meta {
    margin: .35rem 0 0;
    color: var(--c-ink-3);
    font-size: .9rem;
}

/* ------------------------------ buttons -------------------------------- */
.btn {
    --btn-bg: var(--c-surface);
    --btn-fg: var(--c-ink-2);
    --btn-bd: var(--c-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .58rem 1.15rem;
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-sm);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.btn:hover {
    color: var(--btn-fg);
    text-decoration: none;
    font-weight: 700;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled, .btn.disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: .38rem .8rem;
    font-size: .84rem;
    border-radius: var(--r-xs);
}

.btn-lg {
    padding: .8rem 1.7rem;
    font-size: 1rem;
    border-radius: var(--r-md);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-pill {
    border-radius: var(--r-pill);
}

.btn-icon {
    padding: .5rem;
    min-width: 2.4rem;
}

/* brand / primary */
.btn-brand, .btn-primary {
    --btn-bg: var(--c-brand-500);
    --btn-fg: #fff;
    --btn-bd: transparent;
    box-shadow: none;
}

.btn-brand:hover, .btn-primary:hover,
.btn-primary:not(:disabled):not(.disabled):active {
    --btn-bg: var(--c-brand-600);
    color: #fff;
    box-shadow: none;
}

/* accent (offers / add-to-cart) */
.btn-accent {
    --btn-bg: var(--c-brand-700);
    --btn-fg: #fff;
    --btn-bd: transparent;
    box-shadow: none;
}

.btn-accent:hover {
    --btn-bg: var(--c-brand-800);
    color: #fff;
}

/* soft tinted */
.btn-soft {
    --btn-bg: var(--c-brand-50);
    --btn-fg: var(--c-brand-700);
    --btn-bd: var(--c-brand-100);
}

.btn-soft:hover {
    --btn-bg: var(--c-brand-100);
    --btn-fg: var(--c-brand-800);
}

/* outline / ghost */
.btn-outline-brand, .btn-outline-dark {
    --btn-bg: transparent;
    --btn-fg: var(--c-brand-700);
    --btn-bd: var(--c-brand-300);
}

.btn-outline-brand:hover, .btn-outline-dark:hover {
    --btn-bg: var(--c-brand-50);
    --btn-fg: var(--c-brand-800);
    --btn-bd: var(--c-brand-400);
}

.btn-ghost {
    --btn-bg: transparent;
    --btn-bd: transparent;
    --btn-fg: var(--c-ink-3);
    box-shadow: none;
}

.btn-ghost:hover {
    --btn-bg: var(--c-surface-2);
    --btn-fg: var(--c-ink);
}

/* keep bootstrap semantic buttons on-palette */
.btn-success {
    --btn-bg: linear-gradient(135deg, var(--c-brand-500), var(--c-brand-600));
    --btn-fg: #fff;
    --btn-bd: transparent;
    background-color: var(--c-brand-500);
    border-color: transparent;
}

.btn-success:hover, .btn-success:not(:disabled):not(.disabled):active {
    --btn-bg: linear-gradient(135deg, var(--c-brand-600), var(--c-brand-700));
    background-color: var(--c-brand-600);
    border-color: transparent;
    color: #fff;
}

.btn-danger {
    --btn-bg: var(--c-rose-500);
    --btn-fg: #fff;
    --btn-bd: transparent;
    background-color: var(--c-rose-500);
}

.btn-danger:hover, .btn-danger:not(:disabled):not(.disabled):active {
    --btn-bg: var(--c-rose-600);
    background-color: var(--c-rose-600);
    color: #fff;
}

.btn-dark {
    --btn-bg: var(--c-ink);
    --btn-fg: #fff;
    --btn-bd: transparent;
    background-color: var(--c-ink);
}

.btn-dark:hover {
    --btn-bg: var(--c-ink-2);
    background-color: var(--c-ink-2);
    color: #fff;
}

.btn-outline-danger {
    --btn-bg: transparent;
    --btn-fg: var(--c-rose-500);
    --btn-bd: #f5c2cf;
}

.btn-outline-danger:hover {
    --btn-bg: var(--c-rose-100);
    --btn-fg: var(--c-rose-600);
}

.btn-outline-success {
    --btn-bg: transparent;
    --btn-fg: var(--c-brand-600);
    --btn-bd: var(--c-brand-200);
}

.btn-outline-success:hover {
    --btn-bg: var(--c-brand-50);
    --btn-fg: var(--c-brand-700);
}

.btn-info {
    --btn-bg: var(--c-info);
    --btn-fg: #fff;
    --btn-bd: transparent;
}

/* loading state (JS toggles `.loading`, legacy spinner bg is overridden) */
.btn.loading {
    position: relative;
    color: transparent !important;
    background-image: none;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    color: #fff;
    animation: ui-spin .7s linear infinite;
}

@keyframes ui-spin {
    to {
        transform: rotate(1turn);
    }
}

/* ------------------------------- cards --------------------------------- */
.card {
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    background: var(--c-surface);
    box-shadow: var(--sh-xs);
}

.card-header {
    border-bottom: 1px solid var(--c-line);
    background: var(--c-surface-2);
    border-radius: var(--r-md) var(--r-md) 0 0 !important;
    padding: .85rem 1.1rem;
    font-weight: 700;
}

.card-header h6 {
    margin: 0;
}

/* dark card headers used across checkout: retint to brand */
.card-header.bg-dark {
    background: linear-gradient(135deg, var(--c-brand-800), var(--c-brand-600)) !important;
    border-color: transparent;
    color: #fff !important;
}

.card-header.bg-dark h6 {
    color: #fff;
}

.card-body {
    padding: 1.1rem;
}

.panel {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: clamp(1rem, .8rem + .8vw, 1.6rem);
}

.panel--flush {
    padding: 0;
    overflow: hidden;
}

/* ------------------------------ badges --------------------------------- */
.chip, .badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .6rem;
    border-radius: var(--r-pill);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.6;
}

.chip {
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    color: var(--c-ink-3);
}

.chip--brand {
    background: var(--c-brand-50);
    border-color: var(--c-brand-100);
    color: var(--c-brand-700);
}

.chip--leaf {
    background: var(--c-leaf-100);
    border-color: #e0c888;
    color: #6d5420;
}

.chip--amber {
    background: var(--c-amber-100);
    border-color: #fde3ad;
    color: #8a5606;
}

.chip--rose {
    background: var(--c-rose-100);
    border-color: #f9ccd7;
    color: var(--c-rose-600);
}

.badge-danger {
    background: var(--c-rose-500);
    color: #fff;
}

.badge-success {
    background: var(--c-brand-500);
    color: #fff;
}

.badge-warning {
    background: var(--c-amber-400);
    color: #4a3000;
}

/* ------------------------------ prices --------------------------------- */
.price {
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    color: var(--c-ink);
}

.price__num {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.price__cur {
    font-size: .78rem;
    font-weight: 600;
    color: var(--c-ink-3);
}

.price--lg .price__num {
    font-size: 1.7rem;
}

.price--sm .price__num {
    font-size: 1rem;
}

.price--muted {
    color: var(--c-ink-4);
}

.price--old .price__num {
    font-size: .92rem;
    font-weight: 600;
    color: var(--c-ink-4);
    text-decoration: line-through;
}

.price-off {
    display: inline-block;
    padding: .1rem .45rem;
    border-radius: var(--r-pill);
    background: var(--c-rose-500);
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
}

/* ------------------------------- forms --------------------------------- */
.form-control, input[type=text], input[type=tel], input[type=email],
input[type=number], input[type=password], input[type=search], textarea, select {
    width: 100%;
    padding: .55rem .85rem;
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    background: var(--c-surface);
    color: var(--c-ink);
    font-family: inherit;
    font-size: .93rem;
    line-height: 1.6;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-control:focus, input:focus, textarea:focus, select:focus {
    border-color: var(--c-brand-400);
    box-shadow: 0 0 0 4px rgba(61, 106, 76, .13);
    outline: none;
}

textarea, textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

label {
    display: inline-block;
    margin-bottom: .35rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--c-ink-2);
}

.form-group {
    margin-bottom: 1rem;
}

.form-hint {
    display: block;
    margin-top: .3rem;
    font-size: .8rem;
    color: var(--c-ink-4);
}

/* style.css sets a yellow placeholder via the vendor-prefixed selectors, which
   outrank a plain `::placeholder`; match its specificity to win. */
::placeholder,
input::placeholder, textarea::placeholder,
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder,
input:-moz-placeholder, textarea:-moz-placeholder,
input::-moz-placeholder, textarea::-moz-placeholder,
input:-ms-input-placeholder, textarea:-ms-input-placeholder {
    color: var(--c-ink-4) !important;
    opacity: 1;
}

input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
    height: 1.6rem;
}

/* quantity stepper */
.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--c-surface);
}

.qty__btn {
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    background: var(--c-surface-2);
    color: var(--c-brand-700);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--t-fast);
}

.qty__btn:hover {
    background: var(--c-brand-50);
}

.qty__btn:disabled {
    color: var(--c-ink-4);
    cursor: not-allowed;
}

.qty__input {
    width: 3rem;
    height: 2.1rem;
    padding: 0;
    border: 0;
    border-inline: 1px solid var(--c-line);
    border-radius: 0;
    text-align: center;
    direction: ltr;
    font-weight: 700;
    box-shadow: none !important;
}

.qty__input:focus {
    border-color: var(--c-line);
    box-shadow: none;
}

/* ------------------------------ alerts --------------------------------- */
.alert {
    padding: .8rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-size: .9rem;
    font-weight: 600;
}

.alert-success {
    background: var(--c-brand-50);
    border-color: var(--c-brand-100);
    color: var(--c-brand-800);
}

.alert-danger {
    background: var(--c-rose-100);
    border-color: #f7c6d3;
    color: #9b1c3c;
}

.alert-warning {
    background: var(--c-amber-100);
    border-color: #fbdfa6;
    color: #8a5606;
}

.alert-info {
    background: #e8f2fb;
    border-color: #c9e0f4;
    color: #1d5a8a;
}

/* ---------------------------- breadcrumbs ------------------------------ */
.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: .9rem 0;
    list-style: none;
    font-size: .84rem;
    color: var(--c-ink-4);
}

.crumbs li {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.crumbs li + li::before {
    content: "\f104"; /* fa angle-left */
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    font-size: .72rem;
    color: var(--c-ink-4);
}

.crumbs a {
    color: var(--c-ink-3);
    font-weight: 600;
}

.crumbs a:hover {
    color: var(--c-brand-600);
}

.crumbs [aria-current="page"] {
    color: var(--c-ink);
    font-weight: 700;
}

/* ------------------------------ tables --------------------------------- */
table.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--c-surface);
    font-size: .9rem;
}

table.table th {
    background: var(--c-surface-2);
    color: var(--c-ink);
    font-weight: 700;
    border-bottom: 1px solid var(--c-line);
    padding: .7rem .85rem;
    white-space: nowrap;
}

table.table td {
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--c-line-2);
    vertical-align: middle;
}

table.table tr:last-child td {
    border-bottom: 0;
}

.table-bordered, .table-bordered td, .table-bordered th {
    border-color: var(--c-line-2);
}

.table-wrap {
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--c-surface);
    box-shadow: var(--sh-xs);
}

.table-responsive {
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------- empty states ----------------------------- */
.empty-state {
    padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 1.5rem;
    text-align: center;
    background: var(--c-surface);
    border: 1px dashed var(--c-line);
    border-radius: var(--r-lg);
}

.empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--c-brand-50);
    color: var(--c-brand-400);
    font-size: 1.8rem;
}

.empty-state__title {
    margin-bottom: .4rem;
}

.empty-state__text {
    max-width: 38ch;
    margin: 0 auto 1.2rem;
    color: var(--c-ink-3);
    font-size: .92rem;
}

/* ------------------------- legacy compatibility ------------------------ */
/* JS toggles these; restyle instead of renaming. */
.loading {
    display: inline-block;
    min-width: 50px;
    min-height: 24px;
    background: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.4rem;
    height: 1.4rem;
    border: 2px solid var(--c-brand-200);
    border-top-color: var(--c-brand-500);
    border-radius: 50%;
    animation: ui-spin .7s linear infinite;
}

li.selector-item {
    border: 1px solid var(--c-line) !important;
    border-radius: var(--r-md) !important;
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

li.selector-item:hover {
    border-color: var(--c-brand-300) !important;
    box-shadow: var(--sh-sm);
}

li.selector-item.selected {
    border: 2px solid var(--c-brand-500) !important;
    background: var(--c-brand-50) !important;
    box-shadow: 0 0 0 4px rgba(61, 106, 76, .1);
}

li.selector-item.default {
    background: var(--c-amber-100) !important;
    border-color: #fbdfa6 !important;
}

.flex-item {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
}

.flex-item:hover {
    background: var(--c-surface);
    box-shadow: var(--sh-md);
}

ul.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.error-list li {
    padding-right: 1.2rem;
    position: relative;
    margin-bottom: .3rem;
}

ul.error-list li::before {
    content: "\f06a";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 0;
}

/* lightbox (markup lives in base.html) */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(7, 51, 47, .88);
    backdrop-filter: blur(4px);
    text-align: center;
    padding: 3rem 1rem;
}

#lightbox img {
    max-width: 92%;
    max-height: 86vh;
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
}

#lightbox .close {
    position: absolute;
    top: 1rem;
    left: 1.4rem;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    opacity: .85;
    cursor: pointer;
    text-shadow: none;
}

img.lightbox, .lightbox img {
    cursor: zoom-in;
}

/* modal polish */
.modal-content {
    border: 0;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    overflow: hidden;
}

.modal-header {
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-line);
    align-items: center;
}

.modal-title {
    font-size: 1.02rem;
}

.modal-header .close {
    margin: 0;
    padding: .3rem .6rem;
    font-size: 1.6rem;
    color: var(--c-ink-3);
    text-shadow: none;
    opacity: 1;
}
