:root {
    --primary-background: #F6F3EC;
    --primary-accent: #6B4438;
    --secondary-accent: #A7C8DF;
    --contrast-dark: #292D2C;
    --card-background: #FFFDF9;
    --sub-accent: #D9BC9D;
    --border-color: #EAE5DB;
    --text-primary: #292D2C;
    --text-secondary: #6B4438;
    --text-muted: #7A766F;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--primary-background);
    color: var(--text-primary);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: inherit;
}

h1 {
    font-size: clamp(1.875rem, 4vw, 3.75rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

h4 {
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
}

h5,
h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.3s ease-in-out;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 3px;
}

.cookie-consent-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(41, 45, 44, 0.08);
    z-index: 9999;
    padding: 1.25rem 1rem;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cookie-consent-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    text-align: center;
}

.cookie-consent-policy-link {
    color: var(--primary-accent);
    font-weight: 500;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 42px;
    text-align: center;
}

.cookie-btn-primary {
    background-color: var(--primary-accent);
    color: #FFFFFF;
}

.cookie-btn-primary:hover {
    opacity: 0.92;
}

.cookie-btn-secondary {
    background-color: var(--primary-background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.cookie-btn-secondary:hover {
    background-color: var(--border-color);
}

.cookie-consent-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(41, 45, 44, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-consent-modal-window {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.cookie-consent-modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-consent-modal-title {
    font-size: 1.125rem;
    margin: 0;
    color: var(--text-primary);
}

.cookie-consent-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-consent-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.cookie-consent-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-consent-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-accent);
    cursor: pointer;
}

.cookie-consent-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

@media (min-width: 640px) {
    .cookie-consent-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .cookie-consent-text {
        text-align: left;
    }

    .cookie-consent-actions {
        flex-direction: row;
        width: auto;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.375rem;
        line-height: 1.35;
    }

    h3 {
        font-size: 1.125rem;
        line-height: 1.4;
    }

    h4,
    h5,
    h6 {
        font-size: 1rem;
        line-height: 1.4;
    }

    a[href^="mailto:"],
    a[href^="tel:"],
    .break-words-mobile {
        word-break: break-all;
        font-size: 0.9375rem;
    }
}

/* ===== header_section ===== */
#header {
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 400px;
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
}

#hero h1,
#hero h2,
#hero h3,
#hero p {
    hyphens: auto;
}

#hero img {
    width: 100%;
    height: 100%;
    max-height: 500px;
}

/* ===== catalog_section ===== */
#catalog {
    overflow: hidden;
}

#catalog .js-product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#catalog .js-product-card:hover {
    transform: translateY(-3px);
}

#catalog .js-cat-filter.active {
    background-color: var(--primary-accent);
    color: #ffffff;
    border-color: var(--primary-accent);
}

/* ===== spaces_section ===== */
#spaces {
    overflow: hidden;
}





/* ===== mood_section ===== */
#mood {
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    hyphens: auto;
}

#mood a,
#mood button {
    -webkit-tap-highlight-color: transparent;
}

/* ===== materials_section ===== */
#materials {
    width: 100%;
    box-sizing: border-box;
}

#materials .js-material-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#materials .js-material-card:hover {
    transform: translateY(-3px);
}

/* ===== size_guide_section ===== */
#guide {
    overflow: hidden;
}

#guide .js-tab-btn.active {
    background-color: #6B4438;
    color: #FFFFFF;
}

#guide .js-tab-btn:not(.active) {
    background-color: transparent;
    color: #292D2C;
}

/* ===== faq_section ===== */
#faq {
    background-color: var(--primary-background, #F6F3EC);
    color: var(--text-primary, #292D2C);
}

#faq .js-faq-trigger[aria-expanded="true"] .js-faq-icon {
    transform: rotate(45deg);
}

/* ===== contact_section ===== */
#contact {
    overflow: hidden;
}

#contact input::placeholder,
#contact textarea::placeholder {
    color: #7A766F;
}

#contact select option {
    background-color: #292D2C;
    color: #F6F3EC;
}

#contact input:focus,
#contact textarea:focus,
#contact select:focus {
    border-color: #D9BC9D;
    outline: none;
}

.js-toast.is-visible {
    transform: translateY(0);
}

/* ===== footer_section ===== */
#footer {
    hyphens: auto;
}

#footer a {
    transition: color 0.2s ease-in-out;
}

/* Filled controls retain readable text in every interaction state. */
:is(a, button)[class~="bg-[#6B4438]"]:is(:hover, :focus-visible),
.cookie-btn-primary:is(:hover, :focus-visible),
#catalog .js-cat-filter.active:is(:hover, :focus-visible),
#guide .js-tab-btn.active:is(:hover, :focus-visible) {
    background-color: #53342b;
    color: #fffdf9;
    opacity: 1;
}

:is(a, button)[class~="bg-[#6B4438]"]:is(:hover, :focus-visible) :is(span, i) {
    color: inherit;
}

/* Keep the whole photograph visible so hotspot coordinates track the furniture. */
#spaces .js-hotspot:first-of-type,
#spaces .js-hotspot {
    z-index: 1;
}

#spaces .relative:has(> .js-hotspot) {
    height: auto;
    aspect-ratio: 3 / 2;
}

#spaces .relative:has(> .js-hotspot) > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.js-hotspot-tooltip.showroom-popover {
    position: fixed;
    z-index: 100;
    bottom: auto;
    margin: 0;
    transform: none;
    width: min(15rem, calc(100vw - 24px));
    min-width: 0;
    max-height: calc(100dvh - 24px);
    transition: none;
}

.js-hotspot-tooltip.showroom-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--arrow-left, 50%);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fffdf9;
}

.js-hotspot-tooltip.showroom-popover.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #fffdf9;
}

.cookie-consent-modal-overlay {
    overscroll-behavior: contain;
}

.cookie-consent-modal-window {
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}
