/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #172033;
    --text-soft: #667085;
    --text-muted: #98a2b3;

    --border: #e7eaf0;

    --primary: #315efb;
    --primary-dark: #2448d8;
    --primary-soft: #eef2ff;

    --success: #159957;
    --success-soft: #ecfdf3;

    --warning: #d97706;
    --warning-soft: #fff7ed;

    --danger: #dc3545;
    --danger-soft: #fff1f2;

    --sidebar: #101828;

    --shadow-sm:
        0 1px 2px rgba(16, 24, 40, 0.04);

    --shadow:
        0 4px 18px rgba(16, 24, 40, 0.06);

    --radius: 14px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

body {
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* =========================================================
   LOGIN
========================================================= */

.login-body {
    min-height: 100vh;
    background: var(--bg);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-left {
    background: var(--sidebar);
    color: white;
    padding: 52px 8%;
    display: flex;
    flex-direction: column;
}

.login-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================================================
   BRAND / LOGO
========================================================= */

.login-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;

    background: linear-gradient(
        135deg,
        var(--primary),
        #587cff
    );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.8px;

    box-shadow:
        0 8px 20px rgba(49, 94, 251, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

.brand-logo.large {
    width: 48px;
    height: 48px;
    font-size: 12px;
}

.brand-copy {
    min-width: 0;
}

.login-brand h2,
.sidebar-brand h2 {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.25px;
    white-space: nowrap;
}

.login-brand span,
.sidebar-brand span {
    display: block;
    margin-top: 4px;
    color: #98a2b3;
    font-size: 9px;
    line-height: 1.3;
    white-space: nowrap;
}

.login-brand h2,
.sidebar-brand h2 {
    font-size: 16px;
    line-height: 1.1;
}

.login-brand span,
.sidebar-brand span {
    color: #98a2b3;
    font-size: 11px;
}

.login-hero {
    max-width: 580px;
    margin: auto 0;
}

.section-eyebrow {
    display: block;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin-bottom: 9px;
}

.login-left .section-eyebrow {
    color: #8da5ff;
}

.login-hero h1 {
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -2.5px;
    margin-bottom: 25px;
}

.login-hero h1 span {
    display: block;
    color: #8da5ff;
}

.login-hero > p {
    color: #aeb8c7;
    font-size: 16px;
    line-height: 1.7;
    max-width: 480px;
}

.feature-list {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature {
    color: #d0d5dd;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature span {
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(49, 94, 251, 0.18);
    color: #8da5ff;
    border-radius: 50%;
    font-size: 12px;
}

.login-right {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.auth-box {
    width: min(420px, 100%);
}

.mobile-login-logo {
    display: none;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 34px;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-box .form-group {
    margin-bottom: 18px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #344054;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 45px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--text);
    padding: 0 13px;
    outline: none;
    transition: 0.2s;
    font-size: 13px;
}

.form-group input::placeholder {
    color: #b0b8c5;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.10);
}

.login-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
    margin-top: 5px;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.error {
    color: var(--danger);
    font-size: 12px;
    min-height: 18px;
    margin-top: 10px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 15px;
    color: var(--text-muted);
    font-size: 10px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.demo-credentials {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-credentials div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-credentials span {
    color: var(--text-muted);
    font-size: 11px;
}

.demo-credentials strong {
    font-size: 11px;
    color: var(--text-soft);
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   DASHBOARD LAYOUT
========================================================= */

.dashboard-body {
    min-height: 100vh;
}

.app-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 245px;
    background: var(--sidebar);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 25px 15px;
    z-index: 20;
}

.sidebar-brand {
    padding: 0 10px;
    margin-bottom: 42px;
}

.sidebar-section-title {
    color: #667085;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 0 12px;
    margin-bottom: 10px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-link {
    border: none;
    background: transparent;
    color: #98a2b3;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    text-align: left;
    transition: .2s;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255,255,255,.05);
}

.sidebar-link.active {
    color: white;
    background: rgba(49,94,251,.18);
}

.nav-icon {
    width: 24px;
    text-align: center;
    font-size: 16px;
}

.sidebar-bottom {
    margin-top: auto;
}

.sidebar-user {
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 18px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.avatar,
.top-avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #263b82;
    color: #b9c6ff;
    font-weight: 800;
}

.avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
}

.sidebar-user-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-user-info strong {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    font-size: 9px;
    color: #667085;
}

.logout-btn {
    width: 100%;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.08);
    color: #98a2b3;
    border-radius: 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    color: white;
    border-color: rgba(255,255,255,.18);
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.main-content {
    margin-left: 245px;
    width: calc(100% - 245px);
    min-height: 100vh;
}

.topbar {
    height: 88px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
}

.breadcrumb {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.breadcrumb span {
    padding: 0 6px;
}

.breadcrumb strong {
    color: var(--text-soft);
}

.topbar h1 {
    font-size: 21px;
    letter-spacing: -.5px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.top-user-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.top-user-text strong {
    font-size: 12px;
}

.top-user-text span {
    color: var(--text-muted);
    font-size: 9px;
}

.top-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.page-content {
    padding: 30px 35px 60px;
    max-width: 1500px;
}


/* =========================================================
   SUMMARY CARDS
========================================================= */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 22px;
}

.summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.summary-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.summary-icon {
    width: 31px;
    height: 31px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
}

.summary-value {
    margin-top: 15px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
}

.summary-description {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
}


/* =========================================================
   ALERT
========================================================= */

.alert-box {
    background: var(--warning-soft);
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 11px;
    padding: 13px 15px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 11px;
}

.alert-icon {
    width: 26px;
    height: 26px;
    background: #ffedd5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}


/* =========================================================
   SECTIONS
========================================================= */

.tab-content {
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 22px;
    letter-spacing: -.5px;
}

.section-heading p {
    color: var(--text-soft);
    font-size: 11px;
    margin-top: 4px;
}


/* =========================================================
   BUTTONS
========================================================= */

.primary-btn {
    height: 39px;
    padding: 0 15px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: .2s;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.secondary-btn {
    height: 39px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}

.secondary-btn:hover {
    background: var(--surface-soft);
}


/* =========================================================
   FORMS
========================================================= */

.form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.form-card-header {
    margin-bottom: 20px;
}

.form-card-header h3 {
    font-size: 13px;
}

.form-card-header p {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.form-actions .primary-btn {
    width: 100%;
}

.form-actions .secondary-btn {
    width: auto;
    white-space: nowrap;
}


/* =========================================================
   TABLES
========================================================= */

.table-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    min-height: 70px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.table-header h3 {
    font-size: 13px;
}

.table-header > div:first-child span {
    color: var(--text-muted);
    font-size: 9px;
    display: block;
    margin-top: 3px;
}

.search-box {
    width: 230px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
}

.search-box span {
    color: var(--text-muted);
    font-size: 17px;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 11px;
    color: var(--text);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #fafbfc;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .8px;
    text-align: left;
    padding: 12px 18px;
    white-space: nowrap;
}

td {
    padding: 14px 18px;
    border-top: 1px solid #f0f2f5;
    font-size: 11px;
    color: var(--text-soft);
    vertical-align: middle;
}

tbody tr:hover {
    background: #fafbff;
}

.product-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-mini-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
}

.product-name-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-name-text strong {
    color: var(--text);
    font-size: 11px;
}

.product-name-text span {
    color: var(--text-muted);
    font-size: 9px;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
}

.stock-good {
    background: var(--success-soft);
    color: var(--success);
}

.stock-low {
    background: var(--warning-soft);
    color: var(--warning);
}

.stock-out {
    background: var(--danger-soft);
    color: var(--danger);
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 9px;
    font-size: 9px;
    font-weight: 700;
}

.action-btn.edit {
    background: var(--primary-soft);
    color: var(--primary);
}

.action-btn.delete {
    background: var(--danger-soft);
    color: var(--danger);
}

.action-btn:hover {
    filter: brightness(.95);
}


/* =========================================================
   EMPTY
========================================================= */

.empty-state {
    padding: 45px 20px;
    text-align: center;
}

.empty-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    font-size: 20px;
}

.empty-state h3 {
    font-size: 13px;
    margin-top: 12px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 4px;
}


/* =========================================================
   SALES
========================================================= */

.sale-layout {
    margin-bottom: 18px;
}

.sale-create-card {
    margin-bottom: 0;
}

.sale-add-row {
    display: grid;
    grid-template-columns: 1fr 140px auto;
    align-items: end;
    gap: 12px;
}

.add-item-btn {
    margin-bottom: 0;
}

.sale-items-heading {
    border-top: 1px solid var(--border);
    margin-top: 22px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sale-items-heading h4 {
    font-size: 12px;
}

.sale-items-heading span {
    color: var(--text-muted);
    font-size: 9px;
}

.sale-total-label {
    color: var(--text-muted);
    font-size: 10px;
}

.sale-total-label strong {
    color: var(--text);
    font-size: 19px;
    margin-left: 5px;
}

.sale-items-list {
    list-style: none;
    margin: 12px 0;
}

.sale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 11px 13px;
    margin-bottom: 7px;
}

.sale-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sale-item-info strong {
    font-size: 11px;
}

.sale-item-info span {
    color: var(--text-muted);
    font-size: 9px;
}

.sale-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sale-item-price {
    font-size: 11px;
}

.remove-item {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: 6px;
    font-weight: 800;
}

.complete-sale-btn {
    width: 100%;
    height: 43px;
    border: none;
    border-radius: 8px;
    background: var(--success);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.complete-sale-btn:hover {
    filter: brightness(.95);
}


/* =========================================================
   TOAST
========================================================= */

.toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 250px;
    max-width: 350px;
    background: #172033;
    color: white;
    padding: 12px 14px;
    border-radius: 9px;
    box-shadow: 0 12px 30px rgba(0,0,0,.16);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    animation: toastIn .25s ease;
}

.toast.success span:first-child {
    color: #6ee7b7;
}

.toast.error span:first-child {
    color: #fca5a5;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 800px) {

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-left {
        display: none;
    }

    .mobile-login-logo {
        display: block;
        margin-bottom: 30px;
    }

    .login-right {
        min-height: 100vh;
    }

    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }

    .sidebar-brand > div:last-child,
    .sidebar-section-title,
    .sidebar-link span:last-child,
    .sidebar-user-info,
    .logout-btn {
        display: none;
    }

    .sidebar-brand {
        justify-content: center;
        padding: 0;
    }

    .sidebar-link {
        justify-content: center;
        padding: 0;
    }

    .sidebar-user {
        justify-content: center;
    }

    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }

    .topbar {
        padding: 0 20px;
    }

    .page-content {
        padding: 22px 20px 40px;
    }

}

@media (max-width: 600px) {

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .sale-add-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        align-items: stretch;
    }

    .section-heading {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    .topbar {
        height: auto;
        min-height: 80px;
    }

    .top-user-text {
        display: none;
    }

    .table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .page-content {
        padding: 18px 12px 35px;
    }

    .topbar {
        padding: 15px 12px;
    }

    .form-card {
        padding: 16px;
    }

}

/* ================================
   LOW STOCK MOVING ALERT
================================ */

/* =========================================================
   PROFESSIONAL LOW STOCK TICKER
========================================================= */

.low-stock-ticker {
    width: 100%;
    height: 46px;

    display: flex;
    align-items: center;

    margin: 18px 0 24px;

    background: #fffaf0;
    border: 1px solid #f4dfb3;
    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(16, 24, 40, 0.03);

    position: relative;
}


/* ---------------------------------------------------------
   FIXED LOW STOCK LABEL
--------------------------------------------------------- */

.low-stock-label {
    height: 100%;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 0 17px;

    background: #fff3d6;
    border-right: 1px solid #f4dfb3;

    color: #a15c00;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;
}


/* Warning icon */

.low-stock-label-icon {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f59e0b;
    color: white;

    font-size: 11px;
    font-weight: 900;

    box-shadow:
        0 3px 8px rgba(245, 158, 11, 0.2);
}


/* ---------------------------------------------------------
   MOVING AREA
--------------------------------------------------------- */

.low-stock-viewport {
    flex: 1;

    min-width: 0;
    height: 100%;

    overflow: hidden;

    display: flex;
    align-items: center;

    position: relative;
}


/* Subtle fade at edges */

.low-stock-viewport::before,
.low-stock-viewport::after {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;

    width: 35px;

    z-index: 2;

    pointer-events: none;
}

.low-stock-viewport::before {
    left: 0;

    background:
        linear-gradient(
            to right,
            #fffaf0,
            rgba(255, 250, 240, 0)
        );
}

.low-stock-viewport::after {
    right: 0;

    background:
        linear-gradient(
            to left,
            #fffaf0,
            rgba(255, 250, 240, 0)
        );
}


/* ---------------------------------------------------------
   MOVING TRACK
--------------------------------------------------------- */

.low-stock-track {
    display: flex;
    align-items: center;

    width: max-content;

    white-space: nowrap;

    animation:
        lowStockTicker 28s linear infinite;

    will-change: transform;
}


/* Each complete ticker copy */

.low-stock-content {
    display: inline-flex;
    align-items: center;

    flex-shrink: 0;

    padding-right: 70px;

    color: #8a4b08;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.1px;
}


/* Product separator */

.low-stock-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* Product name */

.low-stock-product-name {
    color: #5f3a08;
    font-weight: 700;
}


/* Quantity */

.low-stock-quantity {
    color: #a15c00;
    font-weight: 600;
}


/* Dot between products */

.low-stock-separator {
    margin: 0 18px;

    color: #d7a85a;

    font-size: 10px;
}


/* ---------------------------------------------------------
   ANIMATION
--------------------------------------------------------- */

@keyframes lowStockTicker {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

}


/* Pause on hover */

.low-stock-ticker:hover .low-stock-track {
    animation-play-state: paused;
}


/* ---------------------------------------------------------
   ACCESSIBILITY
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .low-stock-track {
        animation: none;
        transform: none;
    }

}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 600px) {

    .low-stock-ticker {
        height: 42px;
        margin: 14px 0 20px;
    }

    .low-stock-label {
        padding: 0 11px;
        gap: 6px;
        font-size: 8px;
    }

    .low-stock-label-icon {
        width: 19px;
        height: 19px;
        font-size: 10px;
    }

    .low-stock-content {
        font-size: 10px;
        padding-right: 50px;
    }

    .low-stock-separator {
        margin: 0 12px;
    }

}

.low-stock-track {
    display: inline-flex;
    min-width: max-content;
    animation: lowStockScroll 22s linear infinite;
    padding-left: 100%;
}

#low-stock-content {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

@keyframes lowStockScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Pause when user hovers */
.low-stock-ticker:hover .low-stock-track {
    animation-play-state: paused;
}