:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #0ea5a4;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #16a34a;
    --text: #0f172a;
    --muted: #64748b;
    --bg: #f4f6fb;
    --card: #ffffff;
    --line: #e2e8f0;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Poppins', sans-serif; color: var(--text); background: radial-gradient(circle at top, #eef4ff 0%, #f8fafc 35%, #f4f6fb 100%); }
a { text-decoration: none; color: inherit; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.brand-logo { width: 42px; height: 42px; border-radius: 11px; background: transparent; color: inherit; display: grid; place-items: center; font-weight: 700; }
.brand h1 { margin: 0; font-size: 20px; }
.brand p { margin: 0; font-size: 12px; color: var(--muted); }
.menu { display: grid; gap: 6px; }
.menu a { padding: 10px 12px; border-radius: 10px; color: #334155; font-size: 14px; }
.menu a.active, .menu a:hover { background: #e8f0ff; color: var(--primary-dark); }
.menu-link-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.menu-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    line-height: 1;
}
.sidebar-user { margin-top: auto; padding: 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
.sidebar-user small { display: block; color: var(--muted); }

.main-content { padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.topbar h2 { margin: 0 0 6px; }
.topbar small { color: var(--muted); }
.topbar-right { display: flex; gap: 8px; }

.btn { border: none; background: linear-gradient(130deg, var(--primary), var(--primary-dark)); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-outline { background: #fff; border: 1px solid var(--line); color: #334155; }
.btn-danger { background: #fff1f2; color: #b91c1c; border: 1px solid #fecdd3; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.alert.success { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.stats-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.stat-card { color: #fff; border-radius: 14px; padding: 16px; }
.stat-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 500; opacity: .95; }
.stat-card strong { display: block; font-size: 34px; line-height: 1.1; }
.stat-card small { opacity: .9; }
.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.orange { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.green { background: linear-gradient(135deg, #10b981, #059669); }
.pink { background: linear-gradient(135deg, #ec4899, #db2777); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.panel h3 { margin-top: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; }
th { color: var(--muted); font-size: 12px; letter-spacing: .3px; text-transform: uppercase; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.warn { background: #ffedd5; color: #9a3412; }
.pill.bad { background: #fee2e2; color: #991b1b; }
.pill.info { background: #dbeafe; color: #1e40af; }

label { display: block; font-size: 13px; margin-bottom: 5px; color: #334155; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; background: #fff; margin-bottom: 10px; }
textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.landing-wrap { max-width: 1180px; margin: 0 auto; padding: 22px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.brand-mini { display: flex; align-items: center; gap: 10px; }
.brand-mini span { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(120deg, var(--accent), var(--primary)); color: #fff; display: grid; place-items: center; }
.brand-mini small { display: block; color: var(--muted); }
.landing-banner {
    position: relative;
    margin-bottom: 18px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
}
.landing-banner-track {
    position: relative;
    min-height: clamp(180px, 30vw, 360px);
}
.landing-banner-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
    margin: 0;
}
.landing-banner-item.active {
    opacity: 1;
    visibility: visible;
}
.landing-banner-image {
    width: 100%;
    height: clamp(180px, 30vw, 360px);
    object-fit: cover;
    display: block;
    background: #f8fafc;
}
.landing-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(15, 23, 42, 0.35);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    font-size: 24px;
    line-height: 1;
    padding: 0;
}
.landing-banner-arrow.prev {
    left: 10px;
}
.landing-banner-arrow.next {
    right: 10px;
}
.landing-banner-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.landing-banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}
.landing-banner-dot.active {
    background: #fff;
}
.hero-grid { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 18px; }
.eyebrow { color: var(--primary-dark); font-weight: 600; margin: 0; }
.hero-grid h1 { margin: 6px 0 10px; font-size: 40px; line-height: 1.15; }
.subtext { color: var(--muted); }
.cta-row { display: flex; gap: 10px; margin-top: 12px; }
.hero-panel { background: linear-gradient(150deg, #ecfeff, #eff6ff); border: 1px solid #dbeafe; border-radius: 14px; padding: 16px; }
.hero-panel h3 { margin-top: 0; }
.hero-panel ul { margin: 0; padding-left: 18px; color: #334155; display: grid; gap: 8px; }

.section-head h2 { margin: 0; }
.section-head p { margin-top: 6px; color: var(--muted); }
.landing-visitor-greeting {
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8 !important;
}
.landing-filter-popover {
    margin-top: 12px;
    position: relative;
    display: inline-block;
}
.landing-filter-popover summary {
    list-style: none;
}
.landing-filter-popover summary::-webkit-details-marker {
    display: none;
}
.landing-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
}
.landing-filter-trigger svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.landing-filter-trigger small {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    display: inline-grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
}
.landing-filter-trigger.is-active {
    border-color: #86efac;
    color: #166534;
    background: #f0fdf4;
}
.landing-filter-trigger.is-active small {
    background: #22c55e;
    color: #fff;
}
.landing-filter-panel {
    margin-top: 10px;
    min-width: min(92vw, 520px);
    max-width: min(92vw, 520px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.12);
    padding: 12px;
    display: grid;
    gap: 12px;
}
.landing-filter-block p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.landing-filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.landing-sort-link {
    min-width: 92px;
    text-align: center;
    padding: 8px 11px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.landing-sort-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.landing-sort-link.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}
.landing-category-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.landing-category-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.landing-category-link.active {
    background: #ecfeff;
    border-color: #99f6e4;
    color: #0f766e;
}
.landing-wa-note { margin: 10px 0 0; color: #9a3412; font-size: 13px; }
body.visitor-capture-open { overflow: hidden; }
.visitor-capture-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.visitor-capture-modal.open {
    display: flex;
}
.visitor-capture-card {
    width: min(460px, 96vw);
    border-radius: 16px;
    border: 1px solid #dbe5db;
    background: #fff;
    padding: 18px;
    box-shadow: 0 26px 56px rgba(2, 6, 23, 0.3);
}
.visitor-capture-card h3 {
    margin: 0 0 6px;
    font-size: 30px;
}
.visitor-capture-card p {
    margin: 0 0 12px;
    color: #475569;
}
.visitor-capture-error {
    min-height: 20px;
    font-size: 13px;
    color: #b91c1c;
    margin-bottom: 8px;
}
.visitor-capture-card .btn {
    width: 100%;
}
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.product-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.landing-wrap { max-width: 1200px; margin-left: auto; margin-right: auto; padding: 0 14px; }
.product-showcase { background: #f8fafc; border-radius: 16px; padding: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
.product-card { border: 1px solid #dbe5ee; background: #ffffff; border-radius: 14px; padding: 14px; text-align: left; box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06); }
.pick-product { cursor: pointer; width: 100%; }
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecf7ff;
    color: #0f4fdc;
    font-size: 11px;
    margin: 0;
    font-weight: 500;
    line-height: 1.3;
}
.landing-pagination { 
    margin: 18px auto 12px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    flex-wrap: nowrap; 
    gap: 0;
    padding: 0 12px;
    width: 100%;
}

.landing-pagination nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.landing-pagination nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.landing-pagination nav ul li {
    display: inline-flex;
    white-space: nowrap;
    flex-shrink: 0;
}

.landing-pagination a, 
.landing-pagination span { 
    min-width: 36px; 
    height: 36px;
    padding: 0 8px; 
    border-radius: 8px; 
    border: 1px solid #cbd5e1; 
    background: #fff; 
    color: #1e3a8a; 
    text-decoration: none; 
    font-weight: 600; 
    text-align: center; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.landing-pagination .active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.landing-pagination a:hover { background: #e0e7ff; border-color: #a5b4fc; }
.landing-pagination .disabled { color: #94a3b8; border-color: #e2e8f0; cursor: not-allowed; }
.landing-pagination span:not(.active) { border: none; background: transparent; color: #cbd5e1; }

.product-card h4 { margin: 2px 0 6px; }
.product-card p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.price-row { display: flex; justify-content: space-between; align-items: center; }

.guest-bg { min-height: 100vh; background: linear-gradient(120deg, #1d4ed8 0%, #0ea5a4 35%, #f8fafc 35%, #f8fafc 100%); }
.guest-bg.landing-florist-bg {
    background: #ffffff;
}
.auth-grid { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { color: #fff; padding: 80px 70px; }
.auth-left h2 { margin-top: 0; font-size: 48px; }
.auth-left p { font-size: 18px; max-width: 520px; }
.auth-left ul { margin-top: 20px; padding-left: 18px; display: grid; gap: 10px; }
.auth-right { display: grid; place-items: center; padding: 26px; }
.auth-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 20px 60px rgba(2, 6, 23, 0.08); }
.auth-card h3 { margin: 0; font-size: 36px; }
.auth-card p { color: var(--muted); margin: 8px 0 14px; }
.auth-switch { text-align: center; margin-top: 12px; }
.auth-switch a { color: var(--primary-dark); font-weight: 600; }

.pos-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.preorder-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.preorder-intro {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border-color: #fed7aa;
}
.preorder-intro p {
    margin: 0;
    color: #7c2d12;
}
.preorder-badge {
    background: #fff7ed;
    color: #c2410c;
}
.preorder-btn {
    background: linear-gradient(130deg, #f97316, #ea580c);
}
.preorder-submit {
    background: linear-gradient(140deg, #f97316, #ea580c) !important;
}
.preorder-success-icon {
    background: #f97316;
}
.preorder-grid.preorder-single-column {
    grid-template-columns: 1fr;
}
.preorder-cart-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1085;
    border: 1px solid #fdba74;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.32);
    cursor: pointer;
}
.preorder-cart-fab-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
}
.preorder-cart-fab-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.preorder-cart-fab-text {
    display: grid;
    gap: 1px;
    text-align: left;
}
.preorder-cart-fab-text strong {
    font-size: 13px;
    line-height: 1;
}
.preorder-cart-fab-text small {
    font-size: 11px;
    opacity: 0.95;
    line-height: 1;
}
.preorder-cart-fab-count {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 6px;
    background: #fff;
    color: #c2410c;
    font-size: 11px;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
}
.preorder-cart-fab.has-items {
    box-shadow: 0 18px 36px rgba(194, 65, 12, 0.4);
}
.preorder-cart-dock {
    position: fixed;
    right: 20px;
    bottom: 84px;
    width: min(430px, 95vw);
    z-index: 1080;
    display: none;
}
.preorder-cart-dock.open {
    display: block;
}
.preorder-cart-panel {
    margin: 0;
    border: 1px solid #fdba74;
    box-shadow: 0 26px 52px rgba(15, 23, 42, 0.22);
    max-height: 72vh;
    overflow: auto;
}
.preorder-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.preorder-cart-head h3 {
    margin: 0;
}
.preorder-cart-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #c2410c;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.preorder-cart-panel .cart-rows {
    max-height: 240px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.chip { border: 1px solid var(--line); padding: 8px 11px; border-radius: 999px; background: #fff; cursor: pointer; }
.chip.active { background: #ecfeff; color: #0f766e; border-color: #99f6e4; }
.cart-rows { display: grid; gap: 8px; max-height: 300px; overflow: auto; margin-bottom: 8px; }
.cart-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.cart-item-info strong { display: block; line-height: 1.25; }
.cart-row small { display: block; color: var(--muted); }
.qty-box { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; justify-self: end; }
.qty-box button { width: 26px; height: 26px; border: 1px solid #cbd5e1; background: #fff; border-radius: 7px; cursor: pointer; }
.qty-input { width: 60px; margin: 0; padding: 6px 8px; text-align: center; }
.cart-remove-btn {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border: 1px solid #fecdd3 !important;
    background: #fff1f2 !important;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cart-remove-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}
.cart-remove-btn:hover {
    background: #ffe4e6 !important;
}

@media (max-width: 600px) {
    .cart-row {
        grid-template-columns: 1fr;
    }

    .qty-box {
        justify-self: start;
    }
}
.checkout-summary { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; margin: 10px 0; }
.checkout-summary p { display: flex; justify-content: space-between; margin: 6px 0; }
.edit-item-list { display: grid; gap: 10px; margin-bottom: 10px; }
.edit-item-row {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px auto;
    gap: 8px;
    align-items: end;
}
.edit-item-row input,
.edit-item-row select {
    margin-bottom: 0;
}
.edit-item-action {
    display: flex;
    align-items: end;
}
.product-hidden-pricing {
    margin: 8px 0 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    background: #f8fafc;
}
.product-hidden-pricing summary {
    cursor: pointer;
    font-weight: 600;
    color: #334155;
}
.product-tier-box {
    margin: 10px 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.product-tier-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.product-tier-add {
    padding: 8px 10px;
}
.product-tier-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}
.product-tier-row:last-child {
    margin-bottom: 0;
}
.product-tier-row input {
    margin-bottom: 0;
}
.product-tier-action {
    display: flex;
    align-items: end;
}

@media (max-width: 1080px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; border-right: none; border-bottom: 1px solid var(--line); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pos-grid, .hero-grid, .auth-grid, .product-grid, .product-grid.compact { grid-template-columns: 1fr; }
    .auth-left { padding: 30px 24px; }
    .auth-left h2 { font-size: 34px; }

    .edit-item-row {
        grid-template-columns: 1fr;
    }

    .product-tier-row {
        grid-template-columns: 1fr;
    }
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    background: #f8fafc;
    display: block;
}
.product-thumb-small { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f8fafc; }

/* Landing & POS image tuning (minimalis + proporsional) */
.landing-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    align-items: start;
}

.landing-product-card {
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.landing-product-card:hover {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.landing-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 10px;
}

.landing-product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.landing-product-body h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.landing-product-body p {
    margin: 0;
}
.landing-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    min-height: 16px;
}

.landing-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.landing-star {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1;
}

.landing-star.filled {
    color: #f59e0b;
}

.landing-rating small {
    color: #64748b;
    font-size: 11px;
    line-height: 1;
}

.landing-product-desc {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sold-count {
    display: block;
    color: #9ca3af;
    margin: 0;
    font-size: 11px;
    line-height: 1.3;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.price-row strong {
    font-size: 16px;
    color: #1d4ed8;
    font-weight: 700;
}

.landing-order-row {
    margin-top: auto;
    padding-top: 8px;
}

.landing-wa-btn {
    width: 100%;
    font-size: 14px;
    padding: 10px 14px;
}

.landing-wa-btn.is-disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.landing-empty-card {
    text-align: left;
    padding: 18px;
}

.landing-empty-card h4 {
    margin: 0 0 6px;
}

.landing-empty-card p {
    margin: 0;
    color: var(--muted);
}

.product-review-nav {
    display: flex;
    gap: 8px;
}

.product-review-panel {
    margin-top: 12px;
}

.product-review-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.product-review-image {
    margin-bottom: 0;
}
.product-review-content h2 {
    margin: 4px 0 8px;
    font-size: 34px;
    line-height: 1.15;
}
.product-review-desc {
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.55;
    white-space: pre-line;
}
.product-review-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.product-review-meta strong {
    font-size: 26px;
}
.product-review-meta small {
    color: #334155;
}
.product-review-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.review-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.review-section-head h3 {
    margin: 0;
}
.review-section-head small {
    color: var(--muted);
}
.review-form {
    margin-bottom: 14px;
}
.review-access-note {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
}
.review-list {
    display: grid;
    gap: 10px;
}
.review-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}
.review-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.review-item-head small {
    color: var(--muted);
}
.review-item-rating {
    margin: 0 0 6px;
    font-size: 13px;
    color: #334155;
}
.review-item p {
    margin: 0;
    color: #334155;
}
.review-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    color: var(--muted);
    background: #f8fafc;
}
.banner-form {
    margin-bottom: 14px;
}
.banner-list {
    display: grid;
    gap: 10px;
}
.banner-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.banner-thumb {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f8fafc;
}
.banner-item-body {
    display: grid;
    gap: 8px;
    align-content: start;
}
.banner-item-actions {
    display: flex;
    justify-content: flex-start;
}
.banner-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    color: var(--muted);
    background: #f8fafc;
}

.product-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.pos-product-card {
    padding: 10px;
}

.pos-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 6px;
}

.pos-product-card h4 {
    font-size: 15px;
    margin: 0 0 2px;
}

.pos-product-card p {
    font-size: 12px;
    margin: 0 0 4px;
}

/* POS Popup Checkout */
.pos-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pos-modal-backdrop.active {
    display: flex;
}

.pos-modal-card {
    width: min(520px, 96vw);
    max-height: calc(100dvh - 28px);
    background: #fff;
    border-radius: 14px;
    border: 1px solid #dbe1ef;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pay-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.pay-top-box {
    padding: 14px;
    color: #fff;
}

.pay-top-box small {
    display: block;
    opacity: 0.95;
    margin-bottom: 4px;
}

.pay-top-box strong {
    font-size: 44px;
    line-height: 1;
}

.pay-body {
    padding: 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}

.quick-pay-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-pay-btn {
    border: 1px solid #dbe1ef;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 500;
}

.pay-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-shrink: 0;
}

.pay-btn {
    border: none;
    padding: 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.pay-btn.cancel {
    background: linear-gradient(140deg, #f43f5e, #ec4899);
}

.pay-btn.submit {
    background: linear-gradient(140deg, #22c55e, #10b981);
}

.pay-btn.info {
    background: linear-gradient(140deg, #3b82f6, #2563eb);
}

.success-modal {
    padding: 16px;
    overflow-y: auto;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 2px auto 10px;
    background: #22c55e;
    color: #fff;
    font-size: 44px;
    font-weight: 800;
}

.success-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.success-box .row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.print-help {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    margin: 0 0 10px;
}

.success-action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 6px;
}

.auto-close-text {
    display: block;
    text-align: center;
    color: #64748b;
}

@media (max-width: 600px) {
    .pos-modal-backdrop {
        align-items: flex-start;
        padding: 8px;
    }

    .pos-modal-card {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 12px;
    }

    .pay-body {
        padding: 12px;
    }

    .pay-action-row {
        position: sticky;
        bottom: 0;
        z-index: 1;
        background: #fff;
        box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
    }

    .pay-btn {
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .pay-top-box strong {
        font-size: 34px;
    }

    .success-action-row {
        grid-template-columns: 1fr;
    }
}
/* Store logo */
.brand-logo {
    overflow: hidden;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-logo-fallback {
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.brand-mini-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #dbeafe;
    object-fit: contain;
    background: #fff;
    padding: 3px;
}

.setting-logo-preview-wrap {
    margin: 6px 0 12px;
}

.setting-logo-preview {
    width: 96px;
    height: 96px;
    border: 1px solid var(--line);
    border-radius: 12px;
    object-fit: contain;
    padding: 4px;
    background: #fff;
}
/* Logo polish: use uploaded logo as-is (no forced blue background) */
.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.brand-logo.has-image {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.brand-logo.has-image .brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border: 0;
    padding: 0;
    display: block;
}

.brand-logo.no-image .brand-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: 11px;
    background: linear-gradient(140deg, var(--accent), var(--primary));
    color: #fff;
    font-size: 12px;
    letter-spacing: .5px;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.brand-mini-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    display: block;
}
/* Final logo behavior: uploaded logo keeps original look */
.brand-logo,
.brand-logo.has-image,
.brand-logo.has-image .brand-logo-img,
.brand-mini-logo-img,
.setting-logo-preview {
    background: transparent !important;
}

.brand-logo.has-image {
    border: 0 !important;
    box-shadow: none !important;
}

.brand-logo.has-image .brand-logo-img,
.brand-mini-logo-img,
.setting-logo-preview {
    object-fit: contain;
    object-position: center;
}

.setting-logo-preview {
    border: 1px solid #e2e8f0;
    padding: 0;
}

/* fallback only (when no uploaded logo) */
.brand-logo.no-image .brand-logo-fallback {
    background: linear-gradient(140deg, var(--accent), var(--primary));
    color: #fff;
}

/* Responsive sidebar drawer and mobile layout */
.sidebar {
    overflow-y: auto;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-toggle,
.sidebar-close {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    color: #0f172a;
    border-radius: 10px;
    cursor: pointer;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.sidebar-toggle span {
    width: 16px;
    height: 2px;
    background: #0f172a;
    border-radius: 999px;
}

.sidebar-close {
    margin-left: auto;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1080px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(84vw, 320px);
        z-index: 1200;
        border-right: 1px solid var(--line);
        border-bottom: none;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
        padding: 14px 12px;
        background: #fff;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1100;
        border: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-toggle,
    .sidebar-close {
        display: inline-flex;
    }

    .main-content {
        padding: 14px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .topbar-right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .topbar-right .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-row,
    .hero-grid,
    .auth-grid,
    .pos-grid,
    .preorder-grid {
        grid-template-columns: 1fr;
    }

    .main-content .product-grid,
    .main-content .product-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-left {
        padding: 24px 18px;
    }

    .auth-left h2 {
        font-size: 34px;
    }

    .preorder-cart-fab {
        right: 12px;
        bottom: 12px;
        padding: 10px 12px;
    }

    .preorder-cart-dock {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 76px;
    }
}

@media (max-width: 720px) {
    .guest-bg.landing-florist-bg {
        background: #ffffff;
    }

    .landing-product-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }

    .landing-product-card {
        padding: 10px;
    }

    .banner-item {
        grid-template-columns: 1fr;
    }

    .product-review-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .product-review-grid {
        grid-template-columns: 1fr;
    }

    .product-review-content h2 {
        font-size: 28px;
    }

    .product-review-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-filter-panel {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .landing-filter-options {
        gap: 6px;
    }

    .stats-grid,
    .topbar-right,
    .main-content .product-grid,
    .main-content .product-grid.compact {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 12px;
    }

    .preorder-cart-fab-text strong {
        font-size: 12px;
    }

    .preorder-cart-fab-text small {
        font-size: 10px;
    }

    .topbar h2 {
        font-size: 28px;
    }

    th,
    td {
        font-size: 13px;
        white-space: nowrap;
    }
}



