/* =========================================================
 * Luxe Minimal - Shared Design System (main.css)
 * YES Exosome 購物車 / 付款頁共用樣式
 * ========================================================= */

/* ---------- Design Tokens ---------- */
:root
{
    --brand: #c9b0ac;
    --brand-light: #ddd0cd;
    --brand-lighter: #f0eae8;
    --brand-dark: #b49590;
    --brand-darker: #8a6e69;

    --surface: #faf8f7;
    --surface-warm: #f5f0ee;
    --surface-card: #ffffff;

    --ink: #1a1a1a;
    --ink-light: #555555;
    --ink-muted: #888888;

    --success: #2f8f4e;
    --danger: #c43b3b;

    --font-serif: 'Cormorant', 'PingFang TC', 'PingFang HK', 'Noto Sans TC', 'Microsoft JhengHei', serif;
    --font-sans: 'PingFang TC', 'PingFang HK', 'Noto Sans TC', 'Microsoft JhengHei', 'Montserrat', Arial, sans-serif;

    --max-w-7xl: 1280px;
    --max-w-5xl: 1024px;
    --max-w-4xl: 900px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after
{
    box-sizing: border-box;
}

html
{
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.lm-body
{
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:where(.lm-body) a
{
    color: inherit;
    text-decoration: none;
}

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

body.lm-body button
{
    font-family: inherit;
}

/* ---------- Typography Helpers ---------- */
.lm-font-serif
{
    font-family: var(--font-serif);
}

.lm-font-sans
{
    font-family: var(--font-sans);
}

.lm-tracking-tight-sm { letter-spacing: -0.02em; }
.lm-tracking-wide-sm { letter-spacing: 0.08em; }
.lm-tracking-wide-md { letter-spacing: 0.15em; }
.lm-tracking-wide-lg { letter-spacing: 0.25em; }

.lm-uppercase { text-transform: uppercase; }

.lm-text-muted { color: var(--ink-muted); }
.lm-text-light { color: var(--ink-light); }
.lm-text-brand-dark { color: var(--brand-dark); }
.lm-text-brand-darker { color: var(--brand-darker); }
.lm-text-success { color: var(--success); }
.lm-text-danger { color: var(--danger); }

.lm-eyebrow
{
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brand-darker);
    font-weight: 500;
    margin: 0 0 10px 0;
}

/* ---------- Layout Containers ---------- */
.lm-container
{
    width: 100%;
    max-width: var(--max-w-7xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.lm-container-narrow
{
    width: 100%;
    max-width: var(--max-w-4xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---------- Announcement Bar ---------- */
.lm-announcement
{
    background: var(--brand);
    color: #ffffff;
    text-align: center;
    padding: 10px 16px;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ---------- Header (full) ---------- */
.lm-header
{
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--brand-lighter);
}

.lm-header-inner
{
    max-width: var(--max-w-7xl);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

@media (min-width: 768px)
{
    .lm-header-inner
    {
        height: 80px;
    }
}

.lm-logo
{
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    line-height: 0;
    display: inline-flex;
    align-items: center;
}

.lm-logo img
{
    display: block;
    height: 36px;
    width: auto;
}

.lm-logo .lm-logo-accent
{
    color: var(--brand-dark);
}

@media (min-width: 768px)
{
    .lm-logo
    {
        font-size: 30px;
        position: static;
        transform: none;
    }

    .lm-logo img { height: 44px; }
}

.lm-nav
{
    display: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 768px)
{
    .lm-nav
    {
        display: flex;
    }
}

.lm-nav a
{
    padding: 8px 18px;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--ink);
    transition: color 0.2s ease;
}

.lm-nav a:hover
{
    color: var(--brand-dark);
}

.lm-header-icons
{
    display: flex;
    align-items: center;
    gap: 4px;
}

.lm-icon-btn
{
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--ink);
    transition: color 0.2s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lm-icon-btn:hover
{
    color: var(--brand-dark);
}

.lm-icon-btn svg
{
    width: 20px;
    height: 20px;
}

.lm-cart-badge
{
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--brand-dark);
    color: #ffffff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-family: var(--font-sans);
}

/* ---------- User Menu Dropdown ---------- */
.lm-user-menu
{
    position: relative;
}

.lm-user-menu-dropdown
{
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid var(--brand-lighter);
    box-shadow: 0 12px 32px rgba(180, 149, 144, 0.18);
    padding: 8px 0;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.lm-user-menu.active .lm-user-menu-dropdown
{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lm-user-menu-dropdown a
{
    display: block;
    padding: 10px 22px;
    font-size: 14px;
    letter-spacing: 0.05em;
    color: var(--ink);
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.lm-user-menu-dropdown a:hover
{
    background: var(--brand-lighter);
    color: var(--ink);
}

.lm-user-menu-divider
{
    height: 1px;
    background: var(--brand-lighter);
    margin: 6px 0;
}

.lm-menu-toggle
{
    display: inline-flex;
    background: none;
    border: none;
    padding: 8px;
    margin-left: -8px;
    cursor: pointer;
    color: var(--ink);
}

@media (min-width: 768px)
{
    .lm-menu-toggle
    {
        display: none;
    }
}

.lm-menu-toggle svg
{
    width: 24px;
    height: 24px;
}

/* ---------- Simple (checkout) Header ---------- */
.lm-header-simple
{
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--brand-lighter);
}

.lm-header-simple-inner
{
    max-width: var(--max-w-5xl);
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lm-back-link
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--ink-light);
    transition: color 0.2s ease;
}

.lm-back-link:hover
{
    color: var(--ink);
}

.lm-back-link svg
{
    width: 16px;
    height: 16px;
}

.lm-secure-badge
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.lm-secure-badge svg
{
    width: 14px;
    height: 14px;
}

/* ---------- Mobile Drawer ---------- */
.lm-mobile-menu
{
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}

.lm-mobile-menu.active
{
    display: block;
}

.lm-mobile-overlay
{
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.lm-mobile-drawer
{
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.lm-mobile-menu.active .lm-mobile-drawer
{
    transform: translateX(0);
}

.lm-mobile-drawer-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--brand-lighter);
}

.lm-mobile-drawer-header .lm-logo
{
    position: static;
    transform: none;
    font-size: 20px;
}

.lm-mobile-drawer-header .lm-logo img { height: 30px; }

.lm-mobile-nav
{
    display: flex;
    flex-direction: column;
    padding: 14px 0;
}

.lm-mobile-nav a
{
    padding: 14px 24px;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--ink);
    transition: background 0.2s ease;
}

.lm-mobile-nav a:hover
{
    background: var(--brand-lighter);
}

.lm-mobile-nav-divider
{
    height: 1px;
    background: var(--brand-lighter);
    margin: 10px 24px;
}

/* ---------- Buttons ---------- */
.lm-btn
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    background: none;
    line-height: 1.2;
    white-space: nowrap;
}

.lm-btn:focus
{
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.lm-btn-primary
{
    background: var(--ink);
    color: #ffffff;
    border-color: var(--ink);
}

.lm-btn-primary:hover
{
    background: var(--brand-darker);
    border-color: var(--brand-darker);
}

.lm-btn-outline
{
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.lm-btn-outline:hover
{
    background: var(--ink);
    color: #ffffff;
}

.lm-btn-ghost
{
    background: transparent;
    color: var(--ink);
    border-color: var(--brand-light);
}

.lm-btn-ghost:hover
{
    border-color: var(--ink);
}

.lm-btn-sm
{
    padding: 9px 18px;
    font-size: 11px;
}

.lm-btn-lg
{
    padding: 16px 36px;
    font-size: 14px;
}

.lm-btn-block
{
    width: 100%;
}

.lm-btn svg
{
    width: 14px;
    height: 14px;
}

/* ---------- Forms ---------- */
.lm-form-label
{
    display: block;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    font-weight: 500;
    margin-bottom: 8px;
}

.lm-form-label .lm-required
{
    color: var(--danger);
    margin-left: 4px;
}

.lm-input,
.lm-select,
.lm-textarea
{
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--brand-lighter);
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.lm-input:focus,
.lm-select:focus,
.lm-textarea:focus
{
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 1px var(--ink);
}

.lm-input::placeholder
{
    color: var(--ink-muted);
}

.lm-select
{
    padding-right: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%231a1a1a' stroke-width='1.5' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    cursor: pointer;
}

.lm-form-help
{
    font-size: 11px;
    color: var(--ink-muted);
    margin-top: 6px;
    line-height: 1.5;
}

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

.lm-form-grid
{
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px)
{
    .lm-form-grid-2 { grid-template-columns: 1fr 1fr; }
    .lm-form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Modal ---------- */
.lm-modal
{
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lm-modal.active
{
    display: flex;
}

.lm-modal-overlay
{
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.lm-modal-dialog
{
    position: relative;
    background: #ffffff;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lm-modal-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--brand-lighter);
    flex-shrink: 0;
}

.lm-modal-title
{
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
}

.lm-modal-close
{
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--ink);
    line-height: 0;
}

.lm-modal-close svg
{
    width: 18px;
    height: 18px;
}

.lm-modal-body
{
    padding: 24px;
    overflow-y: auto;
}

/* ---------- Toast ---------- */
.lm-toast
{
    position: fixed;
    top: 96px;
    right: 20px;
    z-index: 9999;
    padding: 14px 18px 14px 20px;
    background: #ffffff;
    color: var(--ink);
    border-left: 3px solid var(--success);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    max-width: 340px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: lm-slide-in 0.3s ease-out;
}

.lm-toast.error
{
    border-left-color: var(--danger);
}

.lm-toast-close
{
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--ink-muted);
    font-size: 20px;
    line-height: 1;
    margin-left: auto;
}

@keyframes lm-slide-in
{
    from
    {
        opacity: 0;
        transform: translateX(24px);
    }
    to
    {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lm-fade-in
{
    from
    {
        opacity: 0;
        transform: translateY(12px);
    }
    to
    {
        opacity: 1;
        transform: translateY(0);
    }
}

.lm-fade-in
{
    animation: lm-fade-in 0.5s ease-out both;
}

/* ---------- Footer ---------- */
.lm-footer
{
    background: var(--surface-warm);
    border-top: 1px solid var(--brand-lighter);
    margin-top: 80px;
}

.lm-footer-inner
{
    max-width: var(--max-w-7xl);
    margin: 0 auto;
    padding: 48px 24px;
}

@media (min-width: 768px)
{
    .lm-footer-inner
    {
        padding: 64px 48px;
    }
}

.lm-footer-grid
{
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

@media (min-width: 768px)
{
    .lm-footer-grid
    {
        grid-template-columns: repeat(4, 1fr);
        gap: 48px;
    }
}

.lm-footer-brand-block .lm-logo
{
    position: static;
    transform: none;
    font-size: 20px;
}

.lm-footer-brand-block .lm-logo img { height: 32px; }

.lm-footer-tagline
{
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 10px;
    line-height: 1.6;
}

.lm-footer-col h4
{
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink);
    font-weight: 600;
    margin: 0 0 14px 0;
}

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

.lm-footer-col ul li
{
    margin-bottom: 10px;
}

.lm-footer-col ul li:last-child
{
    margin-bottom: 0;
}

.lm-footer-col a
{
    font-size: 14px;
    color: var(--ink-light);
    transition: color 0.2s ease;
}

.lm-footer-col a:hover
{
    color: var(--brand-dark);
}

.lm-footer-social
{
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.lm-footer-social a
{
    color: var(--ink-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lm-footer-social a:hover
{
    color: var(--brand-dark);
}

.lm-footer-social svg
{
    width: 18px;
    height: 18px;
}

.lm-footer-contact
{
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.7;
}

.lm-footer-contact li
{
    margin-bottom: 4px;
}

.lm-footer-bottom
{
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--brand-lighter);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px)
{
    .lm-footer-bottom
    {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.lm-footer-copyright
{
    font-size: 12px;
    color: var(--ink-muted);
    margin: 0;
}

.lm-footer-legal
{
    display: flex;
    gap: 24px;
}

.lm-footer-legal a
{
    font-size: 12px;
    color: var(--ink-muted);
    transition: color 0.2s ease;
}

.lm-footer-legal a:hover
{
    color: var(--brand-dark);
}

/* ---------- Compact Footer (for checkout) ---------- */
.lm-footer-compact
{
    border-top: 1px solid var(--brand-lighter);
    padding: 28px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 60px;
    background: var(--surface-warm);
}

.lm-footer-compact p
{
    margin: 0 0 6px 0;
}

.lm-footer-compact a
{
    color: var(--ink-light);
    transition: color 0.2s ease;
}

.lm-footer-compact a:hover
{
    color: var(--brand-dark);
}

/* ---------- Utility ---------- */
.lm-hidden { display: none !important; }
.lm-sr-only
{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lm-hstack
{
    display: flex;
    align-items: center;
    gap: 12px;
}

.lm-vstack
{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Page title section */
.lm-page-title
{
    padding: 40px 0 28px;
    text-align: center;
    border-bottom: 1px solid var(--brand-lighter);
    margin-bottom: 40px;
}

@media (min-width: 768px)
{
    .lm-page-title
    {
        padding: 56px 0 40px;
        margin-bottom: 56px;
    }
}

.lm-page-title h1
{
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}

@media (min-width: 768px)
{
    .lm-page-title h1
    {
        font-size: 48px;
    }
}
