/* ========================================================================== */
/*  BASE STYLES – GLOBAL LAYOUT, TYPOGRAPHY & UTILITIES                       */
/*  This file defines the core visual language for Lorien Velmore storefront. */
/* ========================================================================== */


/* ------------------------- Global reset & box model ------------------------ */

/* Use border-box everywhere for predictable sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent horizontal scrolling on the root level */
html {
    overflow-x: hidden;
    max-width: 100%;
    scroll-behavior: smooth;
}

/* ------------------------------- Body / page ------------------------------- */

body {
    font-family: 'Playfair Display', serif;
    margin: 0;
    /* Reserve space for fixed header */
    padding-top: 120px;
    background-color: #fdfdfd;
    color: #2c2c2c;
    line-height: 1.8;

    /* Safety: no horizontal scroll on body */
    overflow-x: hidden;
    max-width: 100%;
}

/* Global heading styling */
h2,
h3 {
    font-family: 'Bodoni Moda', serif;
    text-transform: uppercase;
    font-weight: 100;
    color: #000;
    letter-spacing: 0.05em;
    margin-top: 0;
}

/* ---------------------------- Header & navigation -------------------------- */

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    height: 150px;
    z-index: 1000;
}

header h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    line-height: 1;
}

/* Main navigation row in the header */
nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* --------------------------- Header icon controls -------------------------- */

/* Shared icon behavior for header icons (cart, video, info) */
.cart-icon-container,
.video-icon-container {
    margin-top: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    color: #2c2c2c;
    transition: color 0.3s ease;
}

.cart-icon-container:hover,
.video-icon-container:hover {
    color: #b89d5f;
}

/* Info icon in the header */
.info-icon-container {
    margin-top: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2c2c2c;
    transition: color 0.3s ease;
}

.info-icon-container:hover {
    color: #b89d5f;
}

/* ----------------------- Form controls & primary button -------------------- */

button,
input,
select {
    font-family: 'Bodoni Moda', serif;
    font-size: 1rem;
    color: #2c2c2c;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px;
}

/* Primary button style */
button {
    text-transform: uppercase;
    font-weight: 700;
    background-color: #000;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.15s ease;
}

button:hover {
    background-color: #333;
    color: #b89d5f;
    transform: translateY(-1px);
}

input:focus,
select:focus {
    border-color: #b89d5f;
    outline: none;
}

/* ------------------------ Artist introduction block ------------------------ */

.artist-introduction {
    background-color: #fafafa;
    padding: 60px 120px;
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: 'Playfair Display', serif;
}

.artist-introduction h2 {
    font-family: 'Bodoni Moda', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.artist-introduction p {
    font-size: 1.2rem;
    color: #2c2c2c;
    line-height: 1.8;
    margin: 0 auto;
    text-wrap: balance;
    widows: 2;
    orphans: 2;
}

/* ----------------------- Validation & status messages ---------------------- */

/* Inline error messages below inputs */
.error-message {
    color: red;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

.error-message.active {
    display: block;
}

/* Global success / confirmation text */
.success-message {
    color: green;
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* ----------------------------- Utility helpers ----------------------------- */

/* Lock page scroll when modal is open */
html.no-scroll,
body.no-scroll {
    overflow: hidden;
    height: 100vh;
    overscroll-behavior: contain; /* aitab eriti mobiilsetes brauserites */
}


/* Small loading spinner (used e.g. inside checkout button) */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    margin-right: 8px;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* Disabled checkout button state – visually separate from active */
.submit-checkout.disabled,
.submit-checkout:disabled {
    background: #d3d3d3 !important;
    color: #a9a9a9 !important;
    border-color: #c0c0c0 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Preview image inside info modal */
.info-art-preview {
    width: 100%;
    max-width: 380px;
    display: block;
    margin: 0 auto 2rem auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


/* ========================================================================== */
/*  RESPONSIVE LAYOUT                                                         */
/*  Mobile and tablet adjustments to keep composition tight on all devices.   */
/* ========================================================================== */


/* ------------------------ Tablets & phones (≤ 768px) ----------------------- */
@media (max-width: 768px) {

    /* Body spacing & rhythm on small screens */
    body {
        padding-top: 80px;          /* header is a bit more compact on mobile */
        line-height: 1.6;
        overflow-x: hidden;
        max-width: 100%;
    }

    /* Compact fixed header for mobile */
    header {
        height: auto;
        padding: 12px 16px 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    header h1 {
        font-size: 1.8rem;
        letter-spacing: 0.08em;
    }

    nav {
        margin-top: 10px;
        gap: 14px;
    }

    .cart-icon-container,
    .video-icon-container,
    .info-icon-container {
        margin-top: 0;
        font-size: 1.3rem;
    }

    /* Artist introduction – tighter card on mobile */
    .artist-introduction {
        padding: 32px 20px;
        margin: 24px 12px 36px;
        max-width: 100%;
    }

    .artist-introduction h2 {
        font-size: 1.3rem;
    }

    .artist-introduction p {
        font-size: 1rem;
    }

    /* Modal content – behave like lightweight full-screen sheets on mobile */
    .cart-modal-content,
    .checkout-modal-content,
    .info-modal-content,
    .video-modal-content,
    .order-complete-content {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 100vh;
        border-radius: 0;
        padding: 20px 16px 32px;
        box-sizing: border-box;
    }

    /* Ensure checkout form is scrollable but not cramped */
    .checkout-form {
        max-height: none;
    }
}
