﻿/* =========================================================
   PERSÉ — ORDER TRAY, CART FAB, EMPTY STATE, MEMORY WALL
   Ivory #F3F0E8 · Charcoal #171717 · Muted #77736B
   Border #C8C2B7 · Accent (rare) #A58A58
   Keeps every flr-* / bn-* hook used by order.js
   ========================================================= */

/* ---------- Cart FAB ---------- */
.sg-cart-fab,
.flr-cart-fab {
    position: fixed;
    bottom: calc(var(--sg-nav-bottom-h, 68px) + 16px);
    left: 20px;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    background: #171717;
    border: 1px solid #171717;
    border-radius: var(--sg-radius-md);
    color: #F3F0E8;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 0 0 3px #F3F0E8, 0 0 0 4px #C8C2B7, 0 10px 24px rgba(23, 23, 23, 0.28);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sg-cart-fab img,
.flr-cart-fab img {
    width: 28px;
    height: auto;
    filter: invert(1);
    opacity: 0.9;
}

@media (min-width: 992px) {
    .sg-cart-fab,
    .flr-cart-fab {
        bottom: 24px;
        left: 24px;
    }
}

.sg-cart-fab:hover,
.flr-cart-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px #F3F0E8, 0 0 0 4px #A58A58, 0 14px 28px rgba(23, 23, 23, 0.32);
}

.sg-cart-fab__count,
.flr-cart-fab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding-inline: 6px;
    border-radius: var(--sg-radius-lg);
    background: #F3F0E8;
    color: #171717;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ---------- Drawer shell ---------- */
.sg-tray,
.flr-order-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    justify-content: flex-start;
    transition: visibility 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sg-tray[aria-hidden="true"],
.flr-order-drawer[aria-hidden="true"] {
    visibility: hidden;
    pointer-events: none;
}

.sg-tray__veil,
.flr-order-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(23, 23, 23, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sg-tray:not([aria-hidden="true"]) .sg-tray__veil,
.flr-order-drawer:not([aria-hidden="true"]) .flr-order-drawer__overlay {
    opacity: 1;
}

.sg-tray__panel,
.flr-order-drawer__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: #F3F0E8;
    color: #171717;
    border-left: 1px solid #171717;
    box-shadow: -12px 0 36px rgba(23, 23, 23, 0.22);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.sg-tray:not([aria-hidden="true"]) .sg-tray__panel,
.flr-order-drawer:not([aria-hidden="true"]) .flr-order-drawer__panel {
    transform: translateX(0);
}

.sg-tray__head,
.flr-order-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #C8C2B7;
    background: #F3F0E8;
    position: relative;
}

.sg-tray__head::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -4px;
    height: 1px;
    background: #C8C2B7;
    opacity: 0.6;
}

.sg-tray__kicker {
    display: block;
    margin-bottom: 2px;
    font-family: 'Cormorant Garamond', 'Playfair Display', 'Vazirmatn', serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #A58A58;
}

.sg-tray__head h2,
.flr-order-drawer__head h2 {
    margin: 0;
    font-family: 'Playfair Display', 'Vazirmatn', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #171717;
}

.sg-tray__close,
.flr-order-drawer__close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #171717;
    border-radius: 50%;
    background: transparent;
    color: #171717;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sg-tray__close:hover,
.flr-order-drawer__close:hover {
    background: #171717;
    color: #F3F0E8;
}

.sg-tray__body,
.flr-order-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------- Cart lines ---------- */
.flr-order-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flr-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #FBF9F4;
    border: 1px solid #C8C2B7;
    border-radius: var(--sg-radius-md);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.flr-order-item:hover {
    border-color: #171717;
    background: #fff;
}

.flr-order-item__img {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    flex-shrink: 0;
    overflow: hidden;
    background: #E8E4D9;
    border: 1px solid #C8C2B7;
}

.flr-order-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.15) contrast(1.02);
}

.flr-order-item__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.flr-order-item__title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #171717;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.flr-order-item__price {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #77736B;
    white-space: nowrap;
}

.flr-order-item__copy strong {
    display: block;
    font-size: 0.88rem;
    color: #171717;
}

.flr-order-item__copy small {
    font-size: 0.78rem;
    color: #77736B;
}

.flr-order-item__remove {
    background: none;
    border: none;
    color: #77736B;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s ease;
}

.flr-order-item__remove:hover {
    color: #8E2B2B;
}

.flr-order-item .flr-qty {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: #F3F0E8;
    border: 1px solid #C8C2B7;
}

.flr-order-item .flr-qty__btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #C8C2B7;
    color: #171717;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.flr-order-item .flr-qty__btn:hover {
    background: #171717;
    border-color: #171717;
    color: #F3F0E8;
}

.flr-order-item .flr-qty__value {
    min-width: 20px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: #171717;
}

/* ---------- Empty cart ---------- */
.sg-tray__empty {
    text-align: center;
    padding: 28px 16px;
}

.sg-tray__empty-art {
    width: 104px;
    height: 104px;
    margin: 0 auto 14px;
    padding: 6px;
    border: 1px solid #171717;
    border-radius: 50%;
    background: #F3F0E8;
    box-shadow: 0 0 0 4px #F3F0E8, 0 0 0 5px #C8C2B7;
    overflow: hidden;
}

.sg-tray__empty-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(1) contrast(1.05);
    mix-blend-mode: multiply;
}

.sg-tray__empty-title {
    margin: 0 0 4px;
    font-weight: 600;
    color: #171717;
}

.sg-tray__empty-hint {
    display: block;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #77736B;
}

/* ---------- Totals ---------- */
.sg-tray__total,
.flr-order-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #FBF9F4;
    border: 1px solid #C8C2B7;
    border-radius: var(--sg-radius-md);
}

.sg-tray__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #77736B;
}

.sg-tray__row strong {
    color: #171717;
}

.sg-tray__row--payable {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #171717;
    font-size: 1.05rem;
    font-weight: 700;
    color: #171717;
}

/* ---------- Form ---------- */
.sg-tray__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sg-field,
.flr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sg-field label,
.flr-field label,
.flr-field__label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #171717;
}

.sg-field input,
.sg-field textarea,
.np-input,
.flr-field input {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #C8C2B7;
    border-radius: var(--sg-radius-md);
    color: #171717;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sg-field input::placeholder,
.sg-field textarea::placeholder,
.np-input::placeholder {
    color: #77736B;
    opacity: 0.8;
}

.sg-field input:focus,
.sg-field textarea:focus,
.np-input:focus {
    outline: none;
    border-color: #171717;
    box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.sg-modes,
.flr-order-types {
    display: flex;
    gap: 10px;
}

.sg-mode,
.flr-order-type {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.flr-order-type__input {
    display: none;
}

.sg-mode__face,
.flr-order-type__face {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: transparent;
    border: 1px solid #C8C2B7;
    border-radius: var(--sg-radius-md);
    color: #77736B;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sg-mode:hover .sg-mode__face,
.flr-order-type:hover .flr-order-type__face {
    border-color: #171717;
    color: #171717;
}

.flr-order-type__input:checked + .flr-order-type__face,
.flr-order-type__input:checked + .sg-mode__face {
    background: #171717;
    border-color: #171717;
    color: #F3F0E8;
}

/* ---------- Table picker ---------- */
.sg-tables,
.bn-tables {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    background: #FBF9F4;
    border: 1px solid #C8C2B7;
    border-radius: var(--sg-radius-md);
}

.sg-tables__label,
.bn-tables__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #171717;
}

.sg-tables__label i {
    color: #77736B;
}

.sg-tables__grid,
.bn-tables__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sg-tables__empty {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.8rem;
    color: #77736B;
}

.sg-table-chip,
.bn-table-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: #fff;
    border: 1px solid #C8C2B7;
    border-radius: var(--sg-radius-md);
    color: #171717;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sg-table-chip strong,
.bn-table-chip strong {
    font-family: 'Cormorant Garamond', 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #171717;
}

.sg-table-chip small,
.bn-table-chip small {
    font-size: 0.68rem;
    color: #77736B;
}

.sg-table-chip:hover:not(:disabled),
.bn-table-chip:hover:not(:disabled) {
    border-color: #171717;
}

.sg-table-chip.is-selected,
.bn-table-chip.is-selected {
    background: #171717;
    border-color: #171717;
}

.sg-table-chip.is-selected strong,
.bn-table-chip.is-selected strong,
.sg-table-chip.is-selected small,
.bn-table-chip.is-selected small {
    color: #F3F0E8;
}

.sg-table-chip.is-reserved,
.bn-table-chip.is-reserved {
    border-color: #A58A58;
    border-style: dashed;
    background: rgba(165, 138, 88, 0.08);
}

.sg-table-chip.is-reserved.is-selected,
.bn-table-chip.is-reserved.is-selected {
    background: #171717;
    border-style: solid;
}

.sg-table-chip.is-busy,
.bn-table-chip.is-busy {
    opacity: 0.5;
    cursor: not-allowed;
    background: #E8E4D9;
    border-color: #C8C2B7;
}

/* ---------- Captcha / submit / notes ---------- */
.sg-captcha,
.bn-captcha,
.flr-captcha-row {
    display: flex;
    gap: 8px;
}

.sg-captcha input,
.bn-captcha input {
    flex: 1;
}

.sg-captcha button,
.bn-captcha button {
    padding-inline: 14px;
    border-radius: var(--sg-radius-md);
}

.sg-tray__form .sg-btn {
    background: transparent;
    color: #171717;
    border: 1px solid #171717;
    border-radius: var(--sg-radius-md);
    box-shadow: none;
}

.sg-tray__form .sg-btn:hover {
    background: #171717;
    color: #F3F0E8;
    transform: none;
    box-shadow: none;
}

.sg-tray__note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #77736B;
}

.sg-tray__form .sg-tray__submit,
.sg-tray__submit {
    width: 100%;
    padding: 14px;
    background: #171717;
    color: #F3F0E8;
    border: 1px solid #171717;
    border-radius: var(--sg-radius-md);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.sg-tray__form .sg-tray__submit:hover,
.sg-tray__submit:hover {
    background: #F3F0E8;
    color: #171717;
    border-color: #171717;
}

.sg-tray__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.flr-order-form__alert {
    padding: 10px 14px;
    border: 1px solid #8E2B2B;
    background: rgba(142, 43, 43, 0.06);
    color: #8E2B2B;
    font-size: 0.84rem;
}

/* ---------- Toast ---------- */
.sg-toast,
.bn-toast,
.flr-order-toast {
    position: fixed;
    top: calc(var(--sg-header-h, 72px) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    padding: 12px 24px;
    background: #171717;
    border: 1px solid #171717;
    border-radius: var(--sg-radius-md);
    color: #F3F0E8;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 600;
    box-shadow: 0 0 0 3px #F3F0E8, 0 0 0 4px #C8C2B7, 0 12px 28px rgba(23, 23, 23, 0.3);
    animation: sg-toast-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sg-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ---------- Empty state partial ---------- */
.sg-empty {
    text-align: center;
    padding: 36px 16px;
    color: #77736B;
}

.sg-empty--inline {
    padding: 20px 12px;
}

.sg-empty__seal {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-empty__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.sg-empty__mark {
    position: relative;
    width: 34px;
    height: auto;
    opacity: 0.85;
}

.sg-empty__message {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #171717;
}

.sg-empty__hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #77736B;
}

/* ---------- Memory wall (kept in sync with home.css) ---------- */
.sg-wall__board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 0.9rem;
    align-items: stretch;
}

.sg-wall__shot {
    position: relative;
    margin: 0;
    flex: 1 1 150px;
    max-width: 220px;
    min-width: 0;
    width: 100%;
}

.sg-wall__frame {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.4rem;
    background: var(--sg-surface-elevated, #FFFEFA);
    border: 1px solid var(--sg-border, #C8C2B7);
    border-radius: var(--sg-radius-md, 22px);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.sg-wall__frame:hover {
    border-color: var(--sg-charcoal, #171717);
    transform: translateY(-2px);
}

.sg-wall__frame img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: calc(var(--sg-radius-md, 22px) - 6px);
    filter: grayscale(0.12) contrast(1.03);
}

.sg-wall__caption {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--sg-text-secondary, #77736B);
}

.sg-wall__lightbox .sg-modal__dialog {
    text-align: center;
}

.sg-wall__lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 1px solid var(--sg-border, #C8C2B7);
    padding: 6px;
    background: #fff;
}

.sg-wall__lightbox-caption {
    margin-top: 14px;
    font-weight: 600;
    color: var(--sg-charcoal, #171717);
}

@media (min-width: 640px) {
    .sg-wall__board {
        gap: 1rem 1.1rem;
    }

    .sg-wall__shot {
        flex-basis: 170px;
        max-width: 240px;
    }
}

@media (min-width: 1024px) {
    .sg-wall__shot {
        flex-basis: 190px;
        max-width: 260px;
    }

    .sg-wall__frame img {
        aspect-ratio: 4 / 5;
    }
}

@media (max-width: 480px) {
    .sg-tray__panel,
    .flr-order-drawer__panel {
        max-width: 100%;
    }

    .sg-tables__grid,
    .bn-tables__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Signature — table campaign banner */
.sg-campaign-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: var(--sg-radius-sm);
    background: rgba(11, 218, 81, 0.12);
    border: 1px solid rgba(11, 218, 81, 0.35);
    color: var(--sg-charcoal);
}
.sg-campaign-banner i { color: var(--sg-green); margin-top: 0.15rem; }
.sg-campaign-banner strong { display: block; font-size: 0.85rem; margin-bottom: 0.15rem; }
.sg-campaign-banner span { font-size: 0.88rem; color: var(--sg-text-secondary); }
.sg-table-chip.has-offer { border-color: rgba(11, 218, 81, 0.45); }
.sg-table-chip__offer { color: var(--sg-green); font-weight: 700; }
.sg-cart-fab, .flr-cart-fab {
    background: var(--sg-charcoal) !important;
    border-color: var(--sg-malachite) !important;
    color: var(--sg-ivory) !important;
    box-shadow: 0 10px 28px rgba(25, 34, 38, 0.28) !important;
}
.sg-cart-fab__count, .flr-cart-fab__count {
    background: var(--sg-malachite) !important;
    color: var(--sg-charcoal) !important;
}
