:root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-alt: #fafafa;
    --text: #222222;
    --muted: #6c757d;
    --border: #dddddd;
    --accent: #d63031;
    --accent-dark: #b71f1f;
    --dark: #111111;
    --shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    max-width: 100%;
}

body.public-body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

picture,
video,
canvas,
svg,
iframe {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    min-width: 0;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-logo {
    width: 146px;
    height: 50px;
    object-fit: contain;
}

.header-menu-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--dark);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.mobile-menu {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.mobile-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-decoration: none;
    font-size: 0.98rem;
}

.mobile-menu a.active {
    font-weight: 700;
}

.mobile-menu .btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
}

.mobile-menu .btn-primary:hover,
.button-primary:hover {
    background: var(--accent-dark);
}

.hidden {
    display: none;
}

.public-main {
    flex: 1;
    min-width: 0;
    padding: 28px 0 56px;
}

.hero-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    min-height: 400px;
    margin-bottom: 32px;
    background: #000;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 376px;
    object-fit: cover;
    filter: brightness(62%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 620px;
    padding: 48px 56px;
    color: #fff;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: #f1c4c4;
}

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.home-hero-overlay {
    align-items: center;
    max-width: none;
    gap: 24px;
    padding: 48px 32px;
    text-align: center;
}

.home-hero-overlay .hero-title {
    margin-bottom: 0;
    max-width: none;
    white-space: nowrap;
}

.home-hero-tracking {
    width: min(720px, 100%);
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: clamp(72px, 9vw, 90px);
    text-align: center;
}

.home-hero-tracking .panel-header {
    margin-bottom: 14px;
}

.home-hero-tracking .section-title,
.home-hero-tracking .section-text {
    color: #fff;
}

.home-hero-tracking .inline-form {
    justify-content: center;
}

.home-hero-tracking .button {
    min-width: 180px;
}

.home-tracking-mobile {
    display: none;
    margin-bottom: 32px;
}

.home-about-section {
    margin-bottom: 32px;
}

.home-about-header {
    margin-bottom: 16px;
}

.home-about-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: 24px;
    margin-bottom: 0;
}

.home-about-copy {
    padding: 28px;
}

.home-about-copy p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
}

.home-about-copy p + p {
    margin-top: 18px;
}

.home-about-visual {
    margin: 0;
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
}

.home-about-image {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.hero-text,
.section-text,
.page-subtitle,
.footer-text,
.info-card p,
.panel-card p,
.detail-list dd,
.timeline-item p,
.content-block p {
    color: var(--muted);
}

.tracking-panel,
.panel-card,
.info-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
}

.tracking-panel {
    padding: 28px;
    margin-bottom: 28px;
}

.tracking-panel.home-hero-tracking {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 14px 34px rgba(17, 17, 17, 0.18);
    backdrop-filter: blur(6px);
}

.tracking-panel-narrow {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.panel-header {
    margin-bottom: 18px;
}

.page-intro {
    margin-bottom: 28px;
}

.page-title,
.section-title {
    margin: 0 0 8px;
}

.page-title {
    font-size: clamp(2rem, 4vw, 2.7rem);
}

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

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.field-label {
    font-weight: 600;
}

.text-input {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.98rem;
    background: #fff;
}

.text-input:focus {
    outline: 2px solid rgba(214, 48, 49, 0.18);
    border-color: var(--accent);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 13px 18px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.button-primary {
    background: var(--accent);
    color: #fff;
}

.button-secondary {
    background: #1f2937;
    color: #fff;
}

.card-grid,
.split-grid,
.details-grid {
    display: grid;
    gap: 20px;
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.split-grid,
.details-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    margin-bottom: 28px;
}

.info-card,
.panel-card {
    padding: 24px;
}

.home-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
}

.home-feature-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #d9dde3;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.home-feature-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--accent);
}

.home-feature-card h3 {
    margin-top: 4px;
}

.info-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.content-block,
.section-stack {
    margin-bottom: 28px;
}

.content-block p + p {
    margin-top: 16px;
}

.bullet-list {
    margin: 0;
    padding-left: 20px;
}

.bullet-list li + li {
    margin-top: 8px;
}

.detail-stack p {
    margin: 0 0 10px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.summary-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #161616 0%, #2e2e2e 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 24px;
}

.summary-banner-block {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.summary-banner-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.75) !important;
}

.tracking-code {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    overflow-wrap: anywhere;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pending {
    background: #ececec;
    color: #4b5563;
}

.status-received {
    background: #e0f2fe;
    color: #075985;
}

.status-processing {
    background: #e8f1ff;
    color: #1d4ed8;
}

.status-in-transit {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-arrived {
    background: #fef3c7;
    color: #92400e;
}

.status-out-for-delivery {
    background: #ffedd5;
    color: #c2410c;
}

.status-delivered {
    background: #dcfce7;
    color: #166534;
}

.status-on-hold {
    background: #ede9fe;
    color: #6d28d9;
}

.status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.status-returned {
    background: #fce7f3;
    color: #9d174d;
}

.status-default {
    background: rgba(214, 48, 49, 0.16);
    color: #fff;
}

.tracking-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.overview-tile {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
    border-top: 3px solid var(--accent);
}

.overview-label {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.overview-value {
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tracking-info-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.tracking-info-grid-tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.mono-text {
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.04em;
}

.detail-list {
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

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

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

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.data-table th {
    background: #f3f4f6;
}

.timeline-list {
    display: grid;
    gap: 14px;
}

.timeline-item {
    position: relative;
    border-left: 4px solid var(--accent);
    background: var(--surface-alt);
    padding: 16px 18px;
    border-radius: 10px;
}

.timeline-topline {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 8px;
}

.timeline-title {
    margin: 0 0 8px;
    color: var(--text) !important;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.timeline-date {
    color: var(--muted);
    font-size: 0.92rem;
    white-space: nowrap;
}

.empty-state {
    margin: 0;
    color: var(--muted);
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fdecec;
    color: #8c2323;
    border: 1px solid #f3c1c1;
}

.inline-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.public-footer {
    background: var(--dark);
    color: #fff;
    padding: 52px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 28px;
}

.footer-heading,
.footer-subheading {
    margin-top: 0;
    margin-bottom: 10px;
}

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

.footer-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 18px;
}

.footer-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 900px) {
    .hero-overlay {
        padding: 32px 24px;
        max-width: 450px;
    }

    .home-hero-overlay {
        max-width: none;
        gap: 20px;
        padding: 32px 24px;
    }

    .home-about-image {
        min-height: 320px;
    }

    .tracking-info-grid,
    .tracking-info-grid-tight {
        grid-template-columns: 1fr;
    }

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

@media (min-width: 769px) {
    .mobile-menu {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 24px;
    }

    .mobile-menu a.active {
        border-bottom: 2px solid var(--accent);
        padding-bottom: 2px;
    }

    .menu-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
        flex-shrink: 0;
        margin-left: auto;
    }

    .mobile-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(320px, calc(100vw - 24px));
        z-index: 60;
    }

    .hidden {
        display: none !important;
    }

    .mobile-menu:not(.hidden) {
        display: grid;
        gap: 12px;
    }

    .mobile-menu a {
        justify-content: flex-start;
        width: 100%;
        padding: 12px 14px;
        border-radius: 10px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .mobile-menu a.active {
        background: rgba(214, 48, 49, 0.08);
    }

    .mobile-menu .btn-primary {
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .inline-form,
    .detail-list div {
        grid-template-columns: 1fr;
    }

    .site-container {
        width: min(1120px, calc(100% - 24px));
    }

    .brand-logo {
        width: clamp(144px, 42vw, 188px);
        height: auto;
    }

    .hero-card,
    .hero-image {
        min-height: 320px;
    }

    .hero-overlay {
        max-width: none;
        padding: 24px 20px;
    }

    .home-tracking-desktop {
        display: none;
    }

    .home-tracking-mobile {
        display: block;
    }

    .home-hero-tracking {
        width: 100%;
        margin-top: 24px;
    }

    .home-mobile-tracking {
        width: min(720px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero-overlay .hero-title {
        white-space: normal;
    }

    .home-about-grid {
        grid-template-columns: 1fr;
    }

    .home-about-section {
        margin-bottom: 28px;
    }

    .home-about-copy,
    .home-about-visual {
        padding: 20px;
    }

    .home-about-visual {
        padding: 0;
    }

    .home-about-image {
        min-height: 240px;
    }

    .public-main {
        padding-top: 20px;
    }
    .button,
    .action-row > * {
        width: 100%;
    }

    .tracking-panel,
    .panel-card,
    .info-card,
    .summary-banner {
        padding: 20px;
    }

    .summary-banner,
    .section-heading-row,
    .timeline-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-feature-grid {
        grid-template-columns: 1fr;
    }
}
