:root {
    --bs-primary: #1a1a1a;
    --bs-primary-rgb: 26, 26, 26;
    --bs-link-color: #1a1a1a;
    --bs-link-hover-color: #000000;
    --cs-ink: #1a1a1a;
    --cs-ink-soft: #4a4a4a;
    --cs-border: #e7e7e7;
    --cs-surface: #f7f7f7;
}

body {
    background-color: #ffffff;
    color: var(--cs-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-weight: 600;
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
}

/* Navbar */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--cs-border);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar .navbar-brand {
    color: var(--cs-ink) !important;
    font-size: 1.35rem;
}

.navbar .nav-link {
    color: var(--cs-ink) !important;
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: #000000 !important;
}

.navbar-toggler {
    border-color: var(--cs-border);
}

/* Buttons */
.btn {
    border-radius: 2px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: #000000;
    border-color: #000000;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.14), transparent 45%),
        radial-gradient(circle at 10% 100%, rgba(212, 175, 120, 0.22), transparent 50%),
        linear-gradient(135deg, #111111 0%, #2a2a2a 55%, #3d3d3d 100%);
}

.hero.hero-photo {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.1) 100%),
        var(--hero-image) center / cover no-repeat;
}

.hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem 3rem;
    min-height: 380px;
}

.hero-copy {
    max-width: 520px;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8d3ad;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    color: #dedede;
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero .btn-light {
    font-weight: 600;
}

.hero .btn-outline-light {
    border-width: 2px;
}

.hero-collage {
    position: relative;
    flex: 0 0 380px;
    height: 300px;
}

.hero-tile {
    position: absolute;
    width: 180px;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 8px 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    color: #1a1a1a;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.25s ease;
}

.hero-tile img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 6px;
    background: var(--cs-surface);
}

.hero-tile span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-tile-1 { top: 0; left: 0; transform: rotate(-6deg); }
.hero-tile-2 { top: 40px; left: 100px; transform: rotate(3deg); z-index: 1; }
.hero-tile-3 { top: 90px; left: 200px; transform: rotate(9deg); }
.hero-tile:hover { transform: rotate(0) scale(1.05); z-index: 2; }

/* Trust strip */
.usp-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.usp-strip > div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    background: #ffffff;
}

.usp-strip i {
    grid-row: span 2;
    font-size: 1.5rem;
    color: var(--cs-ink);
}

.usp-strip strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.usp-strip span {
    font-size: 0.78rem;
    color: var(--cs-ink-soft);
}

/* Category tiles */
.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.4rem 1rem;
    border: 1px solid var(--cs-border);
    border-radius: 12px;
    background: var(--cs-surface);
    color: var(--cs-ink);
    font-weight: 600;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.category-tile i {
    font-size: 1.8rem;
}

.category-tile:hover {
    background: var(--cs-ink);
    color: #ffffff;
    transform: translateY(-3px);
}

@media (max-width: 991.98px) {
    .hero-inner {
        padding: 2.5rem 1.5rem;
        min-height: 0;
    }

    .hero-collage {
        display: none;
    }

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

@media (max-width: 575.98px) {
    .hero {
        border-radius: 10px;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }
}

/* Product cards */
.product-card {
    border: 1px solid var(--cs-border);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.product-card .card-img-top {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: var(--cs-surface);
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 500;
}

.product-card .price {
    font-weight: 600;
    color: var(--cs-ink);
}

/* Section headings */
.section-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cs-ink);
    display: inline-block;
}

/* Footer */
.footer {
    background-color: var(--bs-primary);
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer a {
    color: #d9d9d9;
}

.footer a:hover {
    color: #ffffff;
}

.footer h6 {
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links i {
    margin-right: 0.4rem;
    width: 1rem;
    text-align: center;
}

.footer-about {
    color: #d9d9d9;
    font-size: 0.9rem;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 2rem 0 1rem;
}

/* Two-tier header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.top-bar {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.category-bar {
    background-color: var(--cs-ink) !important;
    border-bottom: none;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.category-scroll {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-scroll .nav-item {
    flex: 0 0 auto;
}

.category-scroll .nav-item + .nav-item {
    margin-left: 0.5rem;
}

.category-bar .nav-link {
    color: #ffffff !important;
    font-size: 0.9rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    white-space: nowrap;
}

.nav-link-split {
    display: flex;
    align-items: center;
}

.nav-link-split .nav-link {
    padding-right: 0.25rem;
}

.nav-link-split .dropdown-caret {
    padding-left: 0.15rem;
    padding-right: 0.5rem;
}

.nav-link-split .dropdown-caret i {
    font-size: 0.7rem;
}

.category-bar .nav-link:hover {
    color: #cccccc !important;
}

.category-bar .nav-link i {
    margin-right: 0.35rem;
    font-size: 0.85rem;
}

/* Search */
.search-form {
    flex: 1 1 auto;
    max-width: 520px;
    margin: 0 2rem;
}

.search-form .form-control {
    border-radius: 2px 0 0 2px;
    border-right: none;
}

.search-form .btn {
    border-radius: 0 2px 2px 0;
}

/* Icon nav */
.icon-nav .nav-link i {
    margin-right: 0.3rem;
}

.cart-badge {
    display: inline-block;
    background-color: #c0392b;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.05rem 0.45rem;
    margin-left: 0.3rem;
    vertical-align: middle;
}

/* Breadcrumbs */
.breadcrumb-nav {
    font-size: 0.875rem;
    color: var(--cs-ink-soft);
}

.breadcrumb-nav a {
    color: var(--cs-ink-soft);
}

.breadcrumb-nav a:hover {
    color: #000000;
}

.breadcrumb-nav i {
    font-size: 0.7rem;
    margin: 0 0.4rem;
    vertical-align: middle;
}

/* Stock badge on product cards */
.product-card-media {
    position: relative;
}

.stock-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.stock-badge i {
    margin-right: 0.25rem;
}

.stock-badge-in {
    color: #1e7e34;
}

.stock-badge-out {
    color: #b02a37;
}

/* Product gallery */
.product-gallery img {
    border-radius: 4px;
    border: 1px solid var(--cs-border);
}

/* Quantity stepper */
.qty-stepper {
    display: flex;
}

.qty-stepper .form-control {
    text-align: center;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}

.qty-stepper .btn {
    border-radius: 2px;
}

/* Filter bar on category pages */
.filter-bar {
    background-color: var(--cs-surface);
    padding: 1rem;
    border-radius: 4px;
}

.category-filter-menu {
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
}

.category-filter-menu .form-check {
    margin-bottom: 0.4rem;
}

/* Infinite scroll */
#infinite-scroll-sentinel {
    height: 1px;
}

.spin {
    display: inline-block;
    animation: cs-spin 1s linear infinite;
}

@keyframes cs-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Admin panel — sidebar shell
   ========================================================================== */

.admin-body {
    background-color: var(--cs-surface);
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: var(--cs-ink);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.admin-sidebar-brand i {
    font-size: 1.4rem;
}

.admin-sidebar-brand small {
    display: block;
    font-weight: 400;
    font-size: 0.7rem;
    color: #a0a0a0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0 0.75rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: #c9c9c9 !important;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.92rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.admin-nav-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
}

.admin-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
}

.admin-nav-link.active {
    background-color: #ffffff;
    color: var(--cs-ink) !important;
    font-weight: 600;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 1rem 0.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logout-btn {
    cursor: pointer;
}

.admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
    color: #8a8a8a;
    font-size: 0.8rem;
}

.admin-content {
    flex: 1;
    min-width: 0;
}

.admin-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--cs-border);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-topbar-toggle {
    border: 1px solid var(--cs-border);
    color: var(--cs-ink);
}

.admin-topbar-brand {
    color: var(--cs-ink) !important;
    font-weight: 600;
}

.admin-main {
    padding: 1.5rem;
}

.admin-sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -270px;
        height: 100vh;
        z-index: 1045;
        transition: left 0.25s ease;
    }

    .admin-sidebar.show {
        left: 0;
    }

    .admin-sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1040;
    }

    .admin-topbar {
        display: flex;
    }
}

@media (min-width: 992px) {
    .admin-topbar {
        display: none;
    }
}

/* Dashboard stat cards */
.stat-card {
    background-color: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    flex-shrink: 0;
}

.stat-icon-blue {
    background-color: #2563eb;
}

.stat-icon-amber {
    background-color: #d97706;
}

.stat-icon-red {
    background-color: #dc2626;
}

.stat-icon-green {
    background-color: #16a34a;
}

.stat-icon-purple {
    background-color: #7c3aed;
}

.stat-icon-slate {
    background-color: #475569;
}

a.stat-card-link {
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
}

a.stat-card-link:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stat-card > div:last-child {
    min-width: 0;
}

/* Dashboard charts */
.chart-card {
    background-color: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
}

.chart-card h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-box {
    position: relative;
    height: 280px;
}

.chart-empty {
    color: var(--cs-ink-soft);
    text-align: center;
    padding: 3rem 0;
    margin: 0;
}

@media (max-width: 575.98px) {
    .stat-value {
        font-size: 1.5rem;
    }

    .chart-box {
        height: 240px;
    }
}

.stat-label {
    margin: 0;
    font-size: 0.78rem;
    color: var(--cs-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--cs-ink);
}

/* Order status badges */
.order-status {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background-color: var(--cs-surface);
    color: var(--cs-ink-soft);
}

.order-status-paid,
.order-status-delivered {
    background-color: #e6f4ea;
    color: #1e7e34;
}

.order-status-pending_payment {
    background-color: #fdf1dc;
    color: #b5720a;
}

.order-status-processing,
.order-status-shipped {
    background-color: #e5edff;
    color: #2563eb;
}

.order-status-cancelled {
    background-color: #fbe5e5;
    color: #b02a37;
}

/* ------------------------------------------------------------------
   Shared page building blocks
------------------------------------------------------------------- */
.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.page-title i {
    margin-right: 0.35rem;
    color: var(--cs-ink-soft);
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.page-head .page-title {
    margin-bottom: 0;
}

.panel {
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    padding: 1.25rem;
}

.panel h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    background: var(--cs-surface);
    border-radius: 10px;
}

.empty-state i {
    font-size: 3rem;
    color: #b8b8b3;
}

.empty-state p {
    margin: 0.75rem 0 1.25rem;
    color: var(--cs-ink-soft);
}

.form-control,
.form-select {
    border-color: #d6d6d2;
    border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cs-ink);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Line items: cart, order detail, admin order */
.line-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--cs-border);
}

.line-item:last-child {
    border-bottom: 0;
}

.line-item-thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
}

.line-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.line-item-body {
    flex: 1 1 auto;
    min-width: 0;
}

.line-item-name {
    font-weight: 600;
    color: var(--cs-ink);
    display: block;
}

a.line-item-name:hover {
    text-decoration: underline;
}

.line-item-meta {
    color: var(--cs-ink-soft);
    font-size: 0.85rem;
}

.line-item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 0.6rem;
}

.qty-input {
    width: 68px;
}

.line-item-total {
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Summary panels */
.summary-panel {
    position: sticky;
    top: 1rem;
}

.summary-list {
    margin: 0 0 1rem;
}

.summary-list > div {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    color: var(--cs-ink-soft);
}

.summary-list dt,
.summary-list dd {
    margin: 0;
    font-weight: 500;
}

.summary-list .summary-total {
    border-top: 1px solid var(--cs-border);
    margin-top: 0.4rem;
    padding-top: 0.75rem;
    color: var(--cs-ink);
    font-size: 1.1rem;
}

.summary-list .summary-total dt,
.summary-list .summary-total dd {
    font-weight: 700;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--cs-border);
}

.summary-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
}

.summary-item-body {
    flex: 1;
    min-width: 0;
}

.summary-item-price {
    font-weight: 600;
    white-space: nowrap;
}

/* Customer order list cards */
.order-card {
    display: block;
    background: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.9rem;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.order-card:hover {
    border-color: #c9c9c4;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.order-card-head,
.order-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.order-card-head {
    margin-bottom: 0.9rem;
}

.order-card-number {
    font-weight: 700;
}

.order-card-total {
    font-weight: 700;
    white-space: nowrap;
}

.thumb-strip {
    display: flex;
    align-items: center;
}

.thumb-strip img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px var(--cs-border);
    background: var(--cs-surface);
    margin-right: -8px;
}

.thumb-more {
    margin-left: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cs-ink-soft);
}

/* Order progress */
.order-steps {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0 0 1.5rem;
}

.order-steps li {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 0.8rem;
    color: #9a9a95;
}

.order-steps li::before {
    content: '';
    position: absolute;
    top: 11px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--cs-border);
}

.order-steps li:first-child::before {
    display: none;
}

.order-steps li.done::before,
.order-steps li.current::before {
    background: var(--cs-ink);
}

.order-step-dot {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--cs-border);
    font-size: 0.8rem;
}

.order-steps li.done .order-step-dot {
    background: var(--cs-ink);
    border-color: var(--cs-ink);
    color: #ffffff;
}

.order-steps li.current .order-step-dot {
    border-color: var(--cs-ink);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.12);
}

.order-steps li.done,
.order-steps li.current {
    color: var(--cs-ink);
    font-weight: 600;
}

.order-step-label {
    display: block;
    margin-top: 0.35rem;
}

.order-status-lg {
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
}

.order-status-awaiting_manual_review {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Admin tables */
.admin-table thead th {
    background: var(--cs-surface);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cs-ink-soft);
    font-weight: 600;
    border-bottom: 1px solid var(--cs-border);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-color: var(--cs-border);
}

.admin-table tbody tr:hover {
    background: #fafaf9;
}

.admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
}

/* Product photo management */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}

.image-tile {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
    cursor: pointer;
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-tile-remove {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Product page gallery */
.gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 68px;
    height: 68px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cs-surface);
    cursor: pointer;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb.active {
    border-color: var(--cs-ink);
}

.product-gallery img.gallery-main {
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .line-item {
        padding: 0.85rem;
        gap: 0.75rem;
    }

    .line-item-thumb {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
    }

    .line-item-total {
        font-size: 0.9rem;
    }

    .order-steps li {
        font-size: 0.7rem;
    }

    .summary-panel {
        position: static;
    }
}

/* Discounts and stock hints */
.discount-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}

.discount-badge-inline {
    position: static;
    display: inline-block;
}

.list-price {
    color: #8a8a85;
    font-weight: 400;
    font-size: 0.85em;
    margin-left: 0.25rem;
}

.stock-note {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stock-note-in { color: #1e7e34; }
.stock-note-low { color: #b5720a; }
.stock-note-out { color: #b02a37; }

/* Order tracking */
.track-panel {
    padding: 2rem;
}

.track-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--cs-ink);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--cs-border);
}

.timeline li {
    position: relative;
    padding: 0 0 1.1rem 0.9rem;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    margin-left: -6px;
    border-radius: 50%;
    background: #c9c9c4;
    box-shadow: 0 0 0 3px #ffffff;
}

.timeline li.timeline-current::before {
    background: var(--cs-ink);
}

.timeline-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-note {
    font-size: 0.85rem;
    background: var(--cs-surface);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    margin-top: 0.25rem;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--cs-ink-soft);
    margin-top: 0.15rem;
}

/* ------------------------------------------------------------------
   Small-screen layout
------------------------------------------------------------------- */

/* Tables turn into stacked cards on phones instead of scrolling sideways. */
@media (max-width: 767.98px) {
    .table-stack,
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }

    .table-stack thead {
        display: none;
    }

    .table-stack tr {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--cs-border);
    }

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

    .table-stack td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.3rem 0;
        border: 0;
        text-align: right;
    }

    .table-stack td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--cs-ink-soft);
        text-align: left;
    }

    .table-stack td[data-label=""]::before {
        display: none;
    }

    .table-stack td[data-label=""] {
        justify-content: flex-start;
        flex-wrap: wrap;
        text-align: left;
    }

    .table-stack td {
        background: transparent;
        box-shadow: none;
    }

    .table-stack td.text-nowrap {
        white-space: normal !important;
    }

    /* The variants editor: each variant is a small form card. */
    .table-stack-form tr {
        background: var(--cs-surface);
        border: 1px solid var(--cs-border);
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }

    .table-stack-form td .form-control {
        max-width: 60%;
        text-align: right;
    }

    .table-stack-form td[data-label=""] {
        justify-content: flex-end;
    }

    .page-head .btn {
        flex: 0 0 auto;
    }
}

/* Dashboard stat cards: compact, two per row. */
@media (max-width: 575.98px) {
    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        padding: 0.9rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }

    .stat-label {
        font-size: 0.68rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .admin-main {
        padding: 1rem 0.75rem;
    }

    .page-title {
        font-size: 1.35rem;
    }
}

/* Product page */
@media (max-width: 767.98px) {
    .product-gallery {
        margin-bottom: 1.25rem;
    }

    #add-to-cart-btn {
        width: 100%;
    }
}
