/* ================================================================
   LASOMRA — Design System
   Luxury Beauty & Body Care — Black & Gold Identity
   ================================================================ */

/* ── CSS Custom Properties ────────────────────────────────────── */
:root {
    /* Colors */
    --gold:              #C8A84E;
    --gold-light:        #E2C97E;
    --gold-dark:         #A88B3A;
    --gold-glow:         rgba(200, 168, 78, 0.20);
    --gold-glow-strong:  rgba(200, 168, 78, 0.35);

    --bg-dark:           #0A0A0A;
    --bg-card:           #121212;
    --bg-input:          #181818;

    --text-light:        #F4F0EA;
    --text-dim:          #9E968E;
    --text-muted:        #7A7268;

    --error:             #E85D5D;
    --success:           #5DB87A;

    /* Typography */
    --font-serif:        'Cormorant Garamond', 'Georgia', serif;
    --font-sans:         'Outfit', -apple-system, sans-serif;

    /* Metrics */
    --radius:            16px;
    --radius-sm:         8px;
    --container-max:     620px;

    /* Transitions */
    --transition-fast:   0.2s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 75px;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

::selection {
    background: var(--gold);
    color: var(--bg-dark);
}

/* ── Keyframe Animations ──────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(10, 10, 10, 0.3);
    border-top-color: #0A0A0A;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ── Layout Container ─────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

/* ── 1. Top Header & Brand Logo ───────────────────────────────── */
.top-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(200, 168, 78, 0.12);
}

.top-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* ── 2. Product Title Header ──────────────────────────────────── */
.product-header {
    text-align: center;
    padding: 22px 0 12px;
}

.product-badge {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 5px;
    font-weight: 500;
}

.product-title {
    font-family: var(--font-serif);
    font-size: clamp(1.85rem, 5vw, 2.35rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    line-height: 1.2;
}

.product-title span {
    color: var(--gold-light);
    font-style: italic;
}

/* ── 3. Product Hero Image ────────────────────────────────────── */
.product-image-container {
    text-align: center;
    margin: 10px 0 16px;
}

.product-image {
    width: 100%;
    max-width: 440px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid rgba(200, 168, 78, 0.22);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(200, 168, 78, 0.08);
    display: inline-block;
}

/* ── 4. Product Description ───────────────────────────────────── */
.product-simple-desc {
    text-align: center;
    padding: 0 10px 20px;
}

.desc-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #D6D0C7;
    margin-bottom: 8px;
}

.desc-text strong {
    color: #FFFFFF;
    font-weight: 500;
}

.desc-fragrance {
    font-size: 0.82rem;
    color: var(--gold-light);
}

/* ── 5. Direct Order Section (Clean Form Without Layering Bugs) ── */
.order-section {
    padding: 10px 0 35px;
    background: transparent;
    position: relative;
}

/* Main Form Card */
.order-box {
    background: var(--bg-card);
    border: 1px solid rgba(200, 168, 78, 0.22);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 24px rgba(200, 168, 78, 0.05);
}

.order-form-header {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(200, 168, 78, 0.15);
}

.order-form-title {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 0.02em;
}

.order-form-subtitle {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 3px;
}

/* Form Container */
.order-form {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* ── Order Item (Single / Multiple Product Rows) ──────────────── */
.order-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(200, 168, 78, 0.12);
    padding: 20px 18px;
    margin-bottom: 18px;
    animation: fadeInUp 0.35s ease forwards;
    position: relative;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.order-item-number {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--gold);
    font-weight: 400;
    font-style: italic;
}

.btn-remove-item {
    color: var(--text-dim);
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(200, 168, 78, 0.12);
    background: transparent;
    transition: all var(--transition-fast);
    letter-spacing: 0.04em;
    cursor: pointer;
}

.btn-remove-item:hover {
    color: var(--error);
    border-color: rgba(232, 93, 93, 0.35);
    background: rgba(232, 93, 93, 0.08);
}

/* Product dropdown selector (hidden if only one product) */
.order-product-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(200, 168, 78, 0.15);
    background: var(--bg-input);
    color: var(--text-light);
    font-size: 0.9rem;
    appearance: none;
    -webkit-appearance: none;
    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 d='M1 1l5 5 5-5' stroke='%23C8A84E' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    margin-bottom: 14px;
}

.order-product-select:focus {
    border-color: var(--gold);
}

/* Order Item Content */
.order-item-content {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: center;
}

.order-item-image {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-input);
    border: 1px solid rgba(200, 168, 78, 0.15);
}

.order-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.order-item-brand {
    font-size: 0.68rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-bottom: 2px;
}

.order-item-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: #FFFFFF;
    font-style: italic;
    margin-bottom: 4px;
}

.order-item-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.45;
}

.order-item-fragrance {
    font-size: 0.76rem;
    color: var(--gold-light);
    margin-top: 3px;
}

/* Variant Swatches */
.variant-swatches {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.variant-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.variant-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.variant-swatch:hover {
    transform: scale(1.12);
}

.variant-swatch.active {
    border-color: #FFFFFF;
    box-shadow: 0 0 12px var(--gold-glow);
    transform: scale(1.15);
}

/* Volume Selector */
.volume-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.volume-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(200, 168, 78, 0.18);
    background: var(--bg-input);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.volume-btn:hover {
    border-color: var(--gold);
    background: rgba(200, 168, 78, 0.06);
}

.volume-btn.active {
    border-color: var(--gold);
    background: rgba(200, 168, 78, 0.16);
    color: var(--gold-light);
    font-weight: 600;
    box-shadow: 0 0 14px var(--gold-glow);
}

/* Product Price Display */
.product-price {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--gold);
    font-weight: 600;
    text-align: right;
}

.product-price .currency {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
}

/* ── Add Another Product Button ───────────────────────────────── */
.btn-add-product {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: 1.5px dashed rgba(200, 168, 78, 0.25);
    background: transparent;
    color: var(--gold);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all var(--transition-fast);
    margin-bottom: 22px;
    cursor: pointer;
}

.btn-add-product:hover {
    border-color: var(--gold);
    background: rgba(200, 168, 78, 0.05);
    box-shadow: 0 0 16px var(--gold-glow);
}

/* ── Customer Delivery Info Fields ────────────────────────────── */
.customer-info {
    background: transparent;
    border: none;
    border-top: 1px solid rgba(200, 168, 78, 0.15);
    padding: 20px 0 0;
    margin-bottom: 20px;
}

.customer-info-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--gold-light);
    margin-bottom: 16px;
    font-weight: 400;
    font-style: italic;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.form-input,
.city-search-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 8px;
    border: 1px solid rgba(200, 168, 78, 0.15);
    background: var(--bg-input);
    color: var(--text-light);
    font-size: 0.92rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder,
.city-search-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.city-search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-input.error,
.city-search-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(232, 93, 93, 0.12);
}

.form-error {
    font-size: 0.76rem;
    color: var(--error);
    margin-top: 5px;
    display: none;
}

.form-error.visible {
    display: block;
}

/* City Search & Dropdown */
.city-select-wrapper {
    position: relative;
}

.city-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #181818;
    border: 1px solid rgba(200, 168, 78, 0.25);
    border-radius: 8px;
    z-index: 999;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
    display: none;
}

.city-dropdown.open {
    display: block;
}

.city-dropdown-item {
    padding: 11px 16px;
    font-size: 0.88rem;
    color: #E2DDD5;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.city-dropdown-item:last-child {
    border-bottom: none;
}

.city-dropdown-item:hover,
.city-dropdown-item.highlighted {
    background: rgba(200, 168, 78, 0.12);
    color: var(--gold-light);
}

.city-dropdown::-webkit-scrollbar {
    width: 5px;
}

.city-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.city-dropdown::-webkit-scrollbar-thumb {
    background: rgba(200, 168, 78, 0.25);
    border-radius: 3px;
}

#custom-city-group {
    display: none;
}

/* ── Delivery Info Banner ─────────────────────────────────────── */
.delivery-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(200, 168, 78, 0.06);
    border: 1px solid rgba(200, 168, 78, 0.15);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    margin-bottom: 22px;
    font-size: 0.86rem;
    color: #D6D0C7;
}

.delivery-info strong {
    color: var(--gold-light);
}

.delivery-info-icon {
    font-size: 1.15rem;
}

/* ── Submit Button ────────────────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0A0A0A;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: all var(--transition-normal);
    box-shadow: 0 6px 24px rgba(200, 168, 78, 0.28);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::after {
    left: 100%;
}

.btn-submit:hover {
    box-shadow: 0 8px 32px rgba(200, 168, 78, 0.45);
    transform: translateY(-2px);
}

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

.btn-submit:disabled:hover {
    box-shadow: 0 6px 24px rgba(200, 168, 78, 0.28);
}

/* ── Order Status Message (Success / Error) ───────────────────── */
.order-message {
    text-align: center;
    padding: 28px 20px;
    border-radius: 12px;
    margin-top: 22px;
    animation: fadeInUp 0.4s ease forwards;
    display: none;
}

.order-message.success {
    display: block;
    background: rgba(93, 184, 122, 0.09);
    border: 1px solid rgba(93, 184, 122, 0.25);
}

.order-message.error {
    display: block;
    background: rgba(232, 93, 93, 0.09);
    border: 1px solid rgba(232, 93, 93, 0.25);
}

.order-message-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.order-message-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.order-message-text {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.55;
    max-width: 420px;
    margin: 0 auto;
}

/* ── Floating Price Widget (Desktop) ──────────────────────────── */
.floating-price {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: rgba(16, 16, 16, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(200, 168, 78, 0.22);
    border-radius: 14px;
    padding: 16px 20px;
    z-index: 900;
    min-width: 240px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px var(--gold-glow);
    transition: all var(--transition-normal);
}

.floating-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(200, 168, 78, 0.15);
}

.floating-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.floating-price-sublabel {
    letter-spacing: 0.03em;
}

.floating-price-subval {
    color: #FFFFFF;
    font-weight: 500;
}

.floating-price-total-box {
    margin-bottom: 4px;
}

.floating-price-label {
    font-size: 0.72rem;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 2px;
    font-weight: 500;
}

.floating-price-amount {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.1;
    margin-bottom: 4px;
}

.floating-price-amount .currency {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
}

.floating-price-delivery {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding-top: 8px;
    border-top: 1px solid rgba(200, 168, 78, 0.12);
}

/* ── Mobile Floating Bar (Smartphones & Narrow Screens) ───────── */
.mobile-price-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(14, 14, 14, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(200, 168, 78, 0.22);
    padding: 10px 18px;
    z-index: 900;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.5);
}

.mobile-price-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-price-breakdown {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-bottom: 1px;
}

.mobile-price-breakdown span {
    color: var(--gold-light);
    font-weight: 500;
}

.mobile-price-total {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.1;
}

.mobile-price-label-inline {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
    margin-right: 4px;
}

.mobile-price-total .currency {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 400;
}

/* ── Minimal Footer ───────────────────────────────────────────── */
.footer {
    padding: 45px 20px 35px;
    text-align: center;
    background: transparent;
    border-top: 1px solid rgba(200, 168, 78, 0.1);
}

.footer-logo {
    height: 42px;
    width: auto;
    margin: 0 auto 14px;
    opacity: 0.8;
    object-fit: contain;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--gold-light);
    font-style: italic;
    margin-bottom: 6px;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* ── Responsive Breakpoints ───────────────────────────────────── */
/* Switch from desktop floating card to mobile bar when screen <= 880px */
@media (max-width: 880px) {
    .floating-price {
        display: none;
    }

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

    body {
        padding-bottom: 85px;
    }
}

@media (max-width: 480px) {
    .order-box {
        padding: 18px 14px;
    }

    .top-logo {
        height: 42px;
    }

    .order-item {
        padding: 16px 14px;
    }

    .order-item-content {
        grid-template-columns: 80px 1fr;
        gap: 12px;
    }

    .order-item-image {
        width: 80px;
        height: 80px;
    }

    .volume-selector {
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    .top-logo {
        height: 36px;
    }

    .product-title {
        font-size: 1.55rem;
    }

    .container {
        padding: 0 12px;
    }

    .order-box {
        padding: 14px 10px;
    }

    .desc-text {
        font-size: 0.85rem;
    }

    .order-item-content {
        grid-template-columns: 1fr;
    }

    .order-item-image {
        width: 100%;
        height: 140px;
    }

    .mobile-price-bar {
        padding: 8px 12px;
    }

    .mobile-price-total {
        font-size: 1.15rem;
    }
}

/* iPhone safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-price-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    @media (max-width: 880px) {
        body {
            padding-bottom: calc(85px + env(safe-area-inset-bottom));
        }
    }
}
