﻿:root {
    --navy: #0F2C4C;
    --navy-deep: #081B33;
    --blue: #163B63;
    --orange: #F2994A;
    --orange-deep: #E2680F;
    --bg: #F7FAFC;
    --paper: #FFFFFF;
    --ink: #172033;
    --ink-soft: #4B5768;
    --line: #E2E9F0;
    --danger: #D9412E;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-soft: 0 20px 50px -25px rgba(15,44,76,0.35);
    --shadow-card: 0 12px 30px -18px rgba(15,44,76,0.25);
    --ease: cubic-bezier(.22,.61,.36,1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    padding-bottom: 96px;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--navy-deep);
}

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

a {
    color: inherit;
}

.eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange-deep);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

    .eyebrow::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--orange);
        box-shadow: 0 0 0 4px rgba(242,153,74,0.18);
    }

*:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- Topbar ---------- */
.topbar {
    background: rgba(247,250,252,0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--navy-deep);
    text-decoration: none;
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--navy), var(--orange));
    position: relative;
    flex-shrink: 0;
}

    .logo-mark::after {
        content: "";
        position: absolute;
        inset: 6px;
        border-radius: 3px;
        background: linear-gradient(90deg,#fff 2px,transparent 2px) 0 0/5px 5px, linear-gradient(#fff 2px,transparent 2px) 0 0/5px 5px;
        opacity: .9;
    }

.secure-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* ---------- Layout ---------- */
.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 10px 0;
}

.page-head {
    margin-bottom: 32px;
}

    .page-head h1 {
        font-size: clamp(1.7rem, 3vw, 2.2rem);
        margin-top: 12px;
    }

    .page-head p {
        color: var(--ink-soft);
        margin-top: 10px;
        max-width: 520px;
    }

.order-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 32px;
    align-items: start;
}

/* ---------- Product summary card ---------- */
.summary-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 88px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(160deg, #EAF3FB, #F7FAFC);
    border: 1px solid var(--line);
    margin-bottom: 14px;
}

    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity .25s var(--ease);
    }

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--orange);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 100px;
    box-shadow: 0 8px 18px -8px rgba(226,104,15,0.6);
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 20px;
}

    .gallery-thumbs button {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
        border-radius: 10px;
        border: 1.5px solid var(--line);
        padding: 0;
        overflow: hidden;
        cursor: pointer;
        background: none;
        transition: border-color .2s;
    }

        .gallery-thumbs button.active {
            border-color: var(--orange);
        }

    .gallery-thumbs img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.product-name {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.product-desc {
    color: var(--ink-soft);
    font-size: 0.94rem;
    margin-bottom: 18px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 22px;
}

.price-now {
    font-family: 'Fraunces', serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--navy-deep);
}

.price-was {
    font-size: 1rem;
    color: var(--ink-soft);
    text-decoration: line-through;
}

.variant-group {
    margin-bottom: 6px;
}

.variant-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-deep);
    margin-bottom: 10px;
    display: block;
}

.variant-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-swatch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 100px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

    .variant-swatch .dot {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 1px solid rgba(0,0,0,0.1);
        flex-shrink: 0;
    }

    .variant-swatch[aria-pressed="true"] {
        border-color: var(--orange);
        background: rgba(242,153,74,0.08);
        color: var(--orange-deep);
    }

/* ---------- Form card ---------- */
.form-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

    .form-card h2 {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .form-card .form-sub {
        color: var(--ink-soft);
        font-size: 0.92rem;
        margin-bottom: 26px;
    }

.field {
    margin-bottom: 20px;
}

    .field label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--navy-deep);
        margin-bottom: 8px;
    }

.required-mark {
    color: var(--orange-deep);
}

.field input[type="text"],
.field input[type="tel"],
.field select {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    color: var(--ink);
    transition: border-color .2s, background .2s;
    appearance: none;
    -webkit-appearance: none;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%234B5768' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

    .field input:focus, .field select:focus {
        outline: none;
        border-color: var(--orange);
        background: var(--paper);
    }

    .field input.input-validation-error,
    .field select.input-validation-error {
        border-color: var(--danger);
    }

    .field select:disabled {
        color: var(--ink-soft);
        cursor: not-allowed;
        opacity: 0.7;
    }

.field-error {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 6px;
}

.field-hint {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-top: 6px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    background: var(--bg);
    transition: border-color .2s, background .2s;
}

    .delivery-option input[type="radio"] {
        margin-top: 3px;
        accent-color: var(--orange);
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        cursor: pointer;
    }

.delivery-option-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy-deep);
}

.delivery-option-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

.delivery-option.is-selected {
    border-color: var(--orange);
    background: rgba(242,153,74,0.08);
}

.totals {
    padding: 6px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.totals-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

    .totals-line + .totals-line {
        border-top: 1px solid var(--line);
    }

    .totals-line .lbl {
        font-size: 0.88rem;
        color: var(--ink-soft);
        font-weight: 600;
    }

    .totals-line .val {
        font-size: 0.92rem;
        color: var(--ink);
        font-weight: 600;
    }

.totals-grand .lbl {
    font-size: 0.92rem;
    color: var(--navy-deep);
}

.totals-grand .val {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    color: var(--navy-deep);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 26px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.02rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    color: #fff;
    box-shadow: 0 14px 28px -12px rgba(226,104,15,0.5);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 34px -12px rgba(226,104,15,0.6);
    }

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.form-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

    .form-note svg {
        flex-shrink: 0;
        margin-top: 2px;
    }

.validation-summary-errors {
    background: rgba(217,65,46,0.08);
    border: 1px solid rgba(217,65,46,0.3);
    color: var(--danger);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 0.9rem;
}

    .validation-summary-errors ul {
        margin: 4px 0 0;
        padding-left: 18px;
    }

.validation-summary-valid {
    display: none;
}

/* ---------- Sticky mobile summary ---------- */
.mobile-total-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(247,250,252,0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    align-items: center;
    gap: 14px;
}

    .mobile-total-bar .amount {
        font-family: 'Fraunces', serif;
        font-size: 1.15rem;
        color: var(--navy-deep);
        white-space: nowrap;
    }

    .mobile-total-bar .btn {
        padding: 13px 20px;
        font-size: 0.94rem;
    }

@media (max-width:960px) {
    .order-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }
}

@media (max-width:640px) {
    .page {
        padding: 28px 16px 0;
    }

    .form-card {
        padding: 24px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .delivery-options {
        grid-template-columns: 1fr;
    }

    body {
        padding-bottom: 88px;
    }

    .mobile-total-bar {
        display: flex;
    }
}
