/* =============================================
   UnLost — Global Design System
   Loaded by base.html for all pages
============================================= */

/* =============================================
   DESIGN TOKENS
============================================= */
:root {
    --cream:      #faf7f2;
    --warm-white: #f4f0e8;
    --parchment:  #ede8de;
    --navy:       #1a2744;
    --navy-light: #253562;
    --beacon:     #e8420e;
    --beacon-warm:#ff5a2a;
    --beacon-pale:#fde8e2;
    --gold:       #c8941a;
    --gold-pale:  #fdf4e0;
    --ink:        #1c1c1c;
    --mid:        #6b6659;
    --rule:       #d8d2c6;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Lato', sans-serif;
    --font-mono:    'Courier Prime', Courier, monospace;

    --nav-h:  68px;
    --max-w:  1380px;
    --gutter: clamp(16px, 4vw, 56px);
    --radius: 2px;
}

/* =============================================
   RESET
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* =============================================
   NAVIGATION
============================================= */
.nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--navy);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 0 rgba(232,66,14,0.7), 0 4px 20px rgba(26,39,68,0.4);
}

.nav__inner {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__logo {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 900;
    color: var(--cream);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav__logo-dot {
    width: 10px;
    height: 10px;
    background: var(--beacon);
    border-radius: 50%;
    animation: pulse-dot 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232,66,14,0.5); }
    50%       { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(232,66,14,0); }
}

.nav__tagline {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(250,247,242,0.35);
    margin-left: 4px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 28px;
    list-style: none;
}

.nav__links a {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(250,247,242,0.6);
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}

.nav__links a:hover, .nav__links a.active {
    color: var(--cream);
    background: rgba(255,255,255,0.08);
}

.nav__right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav__user-link {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(250,247,242,0.45);
    padding: 6px 10px;
    transition: color 0.15s;
}

.nav__user-link:hover { color: var(--cream); }

.nav__cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--beacon);
    color: #fff;
    padding: 9px 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: var(--radius);
    transition: background 0.15s, transform 0.1s;
}

.nav__cart-btn:hover { background: var(--beacon-warm); transform: translateY(-1px); }

.nav__cart-count {
    background: var(--navy);
    color: var(--beacon);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.icon {
    width: 15px; height: 15px;
    fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cream);
    padding: 6px;
    margin-left: auto;
}

.nav__mobile {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--navy);
    padding: 24px var(--gutter) 32px;
    border-bottom: 3px solid var(--beacon);
    z-index: 199;
}

.nav__mobile.open { display: block; }

.nav__mobile a {
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cream);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .nav__links { display: none; }
    .nav__tagline { display: none !important; }
    .nav__toggle { display: flex; }
    .hide-mobile { display: none !important; }
}

/* =============================================
   MISSION BANNER
============================================= */
.mission-banner {
    background: var(--beacon);
    color: #fff;
    text-align: center;
    padding: 9px var(--gutter);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    line-height: 1.5;
}

.mission-banner a { color: #fff; text-decoration: underline; }

/* =============================================
   MESSAGES
============================================= */
.messages {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.msg {
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    line-height: 1.5;
    border-left: 4px solid;
    border-radius: var(--radius);
    animation: toastIn 0.35s cubic-bezier(.22,1,.36,1) forwards;
    box-shadow: 0 8px 32px rgba(26,39,68,0.18);
}

.msg--success { background: var(--navy); color: var(--cream); border-color: var(--beacon); }
.msg--error   { background: #3d0c04; color: #ffb8a8; border-color: #e02020; }
.msg--info    { background: var(--navy); color: var(--parchment); border-color: var(--gold); }
.msg--warning { background: #3d2800; color: #ffd480; border-color: var(--gold); }

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

/* =============================================
   LAYOUT
============================================= */
.page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* =============================================
   PAGE HEADER BANNER
============================================= */
.page-header {
    background: var(--navy);
    padding: 56px var(--gutter);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: attr(data-bg-text);
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: clamp(80px, 14vw, 180px);
    font-weight: 900;
    color: rgba(255,255,255,0.03);
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
    letter-spacing: -0.02em;
}

.page-header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-header__label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--beacon);
    margin-bottom: 10px;
}

.page-header__title {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 58px);
    font-weight: 900;
    color: var(--cream);
    line-height: 1.05;
}

.page-header__sub {
    margin-top: 12px;
    font-size: 15px;
    color: rgba(250,247,242,0.6);
    max-width: 560px;
}

/* =============================================
   TYPOGRAPHY HELPERS
============================================= */
.section-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--beacon);
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 46px);
    font-weight: 900;
    color: var(--navy);
    line-height: 1.1;
}

.section-title em { color: var(--beacon); font-style: italic; }

/* =============================================
   BUTTONS
============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: var(--beacon);
    color: #fff;
    box-shadow: 0 4px 16px rgba(232,66,14,0.28);
}

.btn--primary:hover {
    background: var(--beacon-warm);
    box-shadow: 0 6px 24px rgba(232,66,14,0.38);
}

.btn--navy {
    background: var(--navy);
    color: var(--cream);
}

.btn--navy:hover {
    background: var(--navy-light);
    box-shadow: 0 6px 20px rgba(26,39,68,0.25);
}

.btn--outline {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn--outline:hover {
    background: var(--navy);
    color: var(--cream);
}

.btn--outline-white {
    background: transparent;
    color: var(--cream);
    border: 2px solid rgba(250,247,242,0.35);
}

.btn--outline-white:hover {
    border-color: var(--cream);
}

.btn--lg { padding: 16px 36px; font-size: 13px; }
.btn--sm { padding: 8px 16px; font-size: 11px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* =============================================
   FORM ELEMENTS
============================================= */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--mid);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1.5px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(26,39,68,0.07);
}

.form-control::placeholder { color: #bbb5aa; }

.form-error {
    font-size: 12px;
    color: var(--beacon);
    font-family: var(--font-mono);
    margin-top: 5px;
}

.form-hint {
    font-size: 12px;
    color: var(--mid);
    margin-top: 5px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6659' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* =============================================
   PRODUCT CARD
============================================= */
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--rule);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 44px rgba(26,39,68,0.13);
    border-color: var(--navy);
}

.product-card__img-wrap {
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--warm-white);
    position: relative;
}

.product-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-card:hover .product-card__img-wrap img { transform: scale(1.05); }

.product-card__no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--parchment);
    color: var(--mid);
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--beacon);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: var(--radius);
}

.product-card__body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__category {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--mid);
    margin-bottom: 5px;
}

.product-card__name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 10px;
}

.product-card__price {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--beacon);
    margin-top: auto;
}

.product-card__price-from {
    font-size: 10px;
    color: var(--mid);
    font-weight: 400;
    margin-right: 3px;
}

/* =============================================
   PRODUCT GRID
============================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* =============================================
   BREADCRUMB
============================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mid);
    padding: 22px 0;
}

.breadcrumb a { color: var(--mid); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb__sep { color: var(--rule); }
.breadcrumb__current { color: var(--ink); }

/* =============================================
   RULE / DIVIDER
============================================= */
.rule {
    border: none;
    border-top: 1.5px solid var(--rule);
    margin: 40px 0;
}

/* =============================================
   EMPTY STATE
============================================= */
.empty-state {
    text-align: center;
    padding: 80px 24px;
}

.empty-state__icon {
    width: 72px; height: 72px;
    background: var(--parchment);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}

.empty-state__icon svg { width: 30px; height: 30px; color: var(--mid); }

.empty-state h2 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--mid);
    font-size: 15px;
    margin-bottom: 28px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   BADGE / STATUS CHIP
============================================= */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.status-chip--pending    { background: var(--gold-pale); color: var(--gold); }
.status-chip--paid       { background: #e8f5e0; color: #2d7a1a; }
.status-chip--processing { background: #e0f0ff; color: #1a5fa8; }
.status-chip--shipped    { background: var(--beacon-pale); color: var(--beacon); }
.status-chip--delivered  { background: #e0ffe8; color: #1a8040; }
.status-chip--cancelled  { background: #f5e0e0; color: #8a1a1a; }

/* =============================================
   PAGE FADE IN
============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeUp 0.5s ease both; }

/* =============================================
   FOOTER
============================================= */
.footer {
    background: var(--navy);
    color: rgba(250,247,242,0.55);
    margin-top: 80px;
}

.footer__mission {
    background: var(--beacon);
    padding: 28px var(--gutter);
    text-align: center;
}

.footer__mission p {
    font-family: var(--font-display);
    font-size: clamp(17px, 2.5vw, 23px);
    font-weight: 700;
    font-style: italic;
    color: #fff;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.35;
}

.footer__body {
    padding: 56px var(--gutter) 40px;
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 900px) { .footer__body { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer__body { grid-template-columns: 1fr; } }

.footer__brand-name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--cream);
    margin-bottom: 12px;
}

.footer__brand-desc {
    font-size: 14px;
    line-height: 1.75;
    max-width: 280px;
}

.footer__col-title {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--beacon);
    margin-bottom: 18px;
}

.footer__links { display: flex; flex-direction: column; gap: 10px; }

.footer__links a {
    font-size: 14px;
    transition: color 0.15s;
}

.footer__links a:hover { color: var(--cream); }

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 20px var(--gutter);
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__copy {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: rgba(250,247,242,0.25);
}

.footer__hotline {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: rgba(250,247,242,0.35);
}

.footer__hotline a { color: var(--beacon); }
