/* ==========================================================================
   Store demo — dùng chung cho /store và /store/{slug}
   Tách riêng khỏi main.css để không ảnh hưởng site bán hàng.
   ========================================================================== */

:root {
    --store-brand: #1d4ed8;
    --store-ink: #0b1220;
    --store-muted: #5b6478;
    --store-line: #e3e7ef;
    --store-bg: #f5f7fb;
}

/* --------------------------------------------------------------------------
   Trang danh mục gói
   -------------------------------------------------------------------------- */
.store-hero {
    padding: clamp(40px, 6vw, 76px) 0 clamp(24px, 3vw, 36px);
    background:
        radial-gradient(1100px 420px at 15% -10%, rgba(29, 78, 216, .12), transparent 60%),
        linear-gradient(180deg, #f7f9ff, #fff);
    border-bottom: 1px solid var(--store-line);
}

.store-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(29, 78, 216, .1);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
}

.store-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--store-ink);
}

.store-sub {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--store-muted);
    font-size: 16px;
    line-height: 1.7;
}

.store-tenant {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(11, 18, 32, .06);
    max-width: 720px;
}

.store-tenant label {
    font-size: 14px;
    font-weight: 600;
    color: var(--store-ink);
}

.store-tenant input {
    flex: 1 1 240px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid #cfd6e4;
    border-radius: 10px;
    font: inherit;
    color: var(--store-ink);
    background: #fff;
}

.store-tenant input:focus {
    outline: 2px solid rgba(29, 78, 216, .35);
    outline-offset: 1px;
    border-color: #1d4ed8;
}

.store-hint {
    flex: 1 0 100%;
    font-size: 13px;
    color: var(--store-muted);
}

.store-section {
    padding: clamp(36px, 5vw, 64px) 0;
}

.store-section--alt {
    background: var(--store-bg);
    border-top: 1px solid var(--store-line);
    border-bottom: 1px solid var(--store-line);
}

.store-section-head {
    margin-bottom: 24px;
}

.store-section-head h2 {
    margin: 0 0 6px;
    font-size: clamp(20px, 2.2vw, 27px);
    color: var(--store-ink);
}

.store-section-head p {
    margin: 0;
    color: var(--store-muted);
    font-size: 15px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.store-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.store-card:hover {
    transform: translateY(-3px);
    border-color: #b9c6e4;
    box-shadow: 0 14px 34px rgba(11, 18, 32, .1);
}

.store-card-tag {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(29, 78, 216, .1);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.store-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    color: var(--store-ink);
}

.store-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--store-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-card--compact p {
    -webkit-line-clamp: 2;
}

.store-chips,
.demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.store-chips li,
.demo-chips li {
    padding: 4px 9px;
    border-radius: 8px;
    background: #f1f4fa;
    border: 1px solid #e4e9f3;
    font-size: 12px;
    color: #44506a;
}

.store-card-cta {
    margin-top: auto;
    padding-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
}

.store-final {
    padding: clamp(40px, 5vw, 66px) 0;
    text-align: center;
    background: #0b1220;
    color: #e8edf8;
}

.store-final h2 {
    margin: 0 0 8px;
    font-size: clamp(21px, 2.4vw, 28px);
}

.store-final p {
    margin: 0 auto 22px;
    max-width: 620px;
    color: #a9b4cc;
    font-size: 15px;
    line-height: 1.7;
}

.store-final-cta {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 11px;
    background: #facc15;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.store-final-cta:hover {
    background: #fde047;
}

/* --------------------------------------------------------------------------
   Trang demo (giả lập ứng dụng)
   -------------------------------------------------------------------------- */
.store-body {
    margin: 0;
    background: var(--store-bg);
    color: var(--store-ink);
    font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.demo-shell {
    --brand: #1d4ed8;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.demo-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
    background: #0b1220;
    color: #dbe3f4;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow: auto;
}

.demo-brand {
    /* Logo ở trên, tên công ty + nhãn ở dưới (tên có trọn chiều ngang sidebar) */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.demo-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .02em;
}

.demo-brand-text {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.demo-brand-text strong {
    font-size: 14px;
    line-height: 1.35;
    /* Tên công ty dài thì xuống dòng, không cắt bằng dấu "..." */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.demo-brand-text small {
    margin-top: 2px;
    font-size: 11px;
    color: #8e9cbc;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.demo-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.demo-nav-title {
    padding: 0 8px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #7c8aab;
}

.demo-nav-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #c3cde3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-nav-item:nth-child(2) {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.demo-side-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: #8e9cbc;
}

.demo-side-foot strong {
    color: #facc15;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.demo-main {
    padding: clamp(18px, 2.4vw, 30px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.demo-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 16px;
}

.demo-top-title h1 {
    margin: 0 0 3px;
    font-size: clamp(18px, 2vw, 23px);
    letter-spacing: -.01em;
}

.demo-top-title p {
    margin: 0;
    font-size: 13px;
    color: var(--store-muted);
}

.demo-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}

.demo-cta {
    padding: 11px 18px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.demo-cta:hover {
    filter: brightness(1.08);
}

.demo-ghost {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #cfd6e4;
    background: #fff;
    color: var(--store-ink);
    font-size: 14px;
    text-decoration: none;
}

.demo-ghost:hover {
    border-color: #9fb0d0;
}

.demo-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.demo-kpi {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 14px;
}

.demo-kpi span {
    font-size: 12.5px;
    color: var(--store-muted);
}

.demo-kpi strong {
    font-size: clamp(19px, 2.1vw, 24px);
    letter-spacing: -.01em;
}

.demo-kpi small {
    font-size: 12px;
    color: #15803d;
}

.demo-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 14px;
}

.demo-card {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 14px;
    min-width: 0;
}

.demo-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.demo-card-head h2 {
    margin: 0;
    font-size: 15px;
}

.demo-card-head span {
    font-size: 12px;
    color: var(--store-muted);
}

.demo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.demo-table th {
    text-align: left;
    padding: 8px 6px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--store-muted);
    border-bottom: 1px solid var(--store-line);
    font-weight: 600;
}

.demo-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #eef1f7;
    color: #1c2537;
}

.demo-table tr:last-child td {
    border-bottom: 0;
}

.demo-table .is-right {
    text-align: right;
    white-space: nowrap;
}

.demo-status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.demo-status.is-ok {
    background: #dcfce7;
    color: #166534;
}

.demo-status.is-due {
    background: #fee2e2;
    color: #991b1b;
}

.demo-status.is-wait {
    background: #e0e7ff;
    color: #3730a3;
}

.demo-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 176px;
    padding-top: 8px;
}

.demo-bar {
    flex: 1;
    position: relative;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #ffffff));
    min-height: 8px;
}

.demo-bar b {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--store-muted);
}

.demo-days {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--store-muted);
}

.demo-days span {
    flex: 1;
    text-align: center;
}

.demo-scope .demo-chips {
    gap: 7px;
}

.demo-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #0b1220;
    color: #e8edf8;
}

.demo-bottom h2 {
    margin: 0 0 5px;
    font-size: clamp(16px, 1.9vw, 20px);
}

.demo-bottom p {
    margin: 0;
    font-size: 13.5px;
    color: #a9b4cc;
    max-width: 560px;
}

.demo-bottom-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-bottom .demo-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .28);
    color: #e8edf8;
}

.demo-siblings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--store-muted);
}

.demo-siblings a {
    padding: 5px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--store-line);
    color: #1d4ed8;
    text-decoration: none;
}

.demo-siblings a:hover {
    border-color: #b9c6e4;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .demo-cols {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .demo-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-side {
        position: static;
        max-height: none;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
    }

    .demo-brand {
        border-bottom: 0;
        padding-bottom: 0;
        flex: 1 1 200px;
    }

    .demo-nav,
    .demo-side-foot {
        display: none;
    }
}

@media (max-width: 640px) {
    .store-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-kpis {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-table th:nth-child(2),
    .demo-table td:nth-child(2) {
        display: none;
    }

    .demo-top-actions {
        width: 100%;
    }

    .demo-top-actions .demo-cta,
    .demo-top-actions .demo-ghost {
        flex: 1;
        text-align: center;
    }
}
