:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-badge: #0284c7;
    --dark-surface: #0f172a;
    --dark-text: #f8fafc;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    word-break: keep-all;
    margin: 0;
    padding: 0;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button {
    cursor: pointer;
    border: none;
    background: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    h2 {
        font-size: clamp(1.5rem, 4vw, 1.85rem);
    }

    h3 {
        font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    }

    h4 {
        font-size: 1.15rem;
    }

    h5 {
        font-size: 1rem;
    }

    .text-break-mobile,
    a[href^="mailto:"],
    a[href^="tel:"] {
        word-break: break-all;
        font-size: 0.95rem;
    }
}

/* ===== header ===== */
#header {
    overflow: hidden;
}

.header-section {
    background-color: var(--bg-primary);
    border-color: var(--border-color) !important;
    position: sticky;
    top: 0;
    z-index: 1020;
}

#header .search-wrapper,
.mobile-menu-overlay .search-wrapper,
.js-user-btn {
    display: none !important;
}

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

.brand-name {
    color: var(--text-primary);
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.nav-link {
    color: var(--text-primary) !important;
    font-size: 0.95rem;
    transition: color 0.2s ease-in-out;
    text-decoration: none;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent-primary) !important;
}

.search-wrapper .search-input {
    border-color: var(--border-color);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border-radius: 8px 0 0 8px;
    font-size: 0.875rem;
}

.search-wrapper .search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: none;
}

.search-wrapper .btn-search {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 0;
    color: var(--text-primary);
    border-radius: 0 8px 8px 0;
}

.search-wrapper .btn-search:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.4rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(30%, -20%);
    background-color: var(--accent-badge);
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

.wishlist-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(30%, -20%);
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

.wishlist-panel {
    position: fixed;
    top: 72px;
    right: max(1rem, calc((100vw - 1320px) / 2));
    z-index: 1060;
    width: min(390px, calc(100vw - 2rem));
    max-height: min(620px, calc(100vh - 90px));
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.wishlist-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wishlist-panel-body {
    max-height: calc(min(620px, calc(100vh - 90px)) - 73px);
    overflow-y: auto;
}

.wishlist-item-thumb {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    object-fit: contain;
    object-position: center;
    padding: 0.35rem;
    background: #f1f5f9;
    border-radius: 0.75rem;
}

.wishlist-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.js-wishlist-btn.is-active i {
    color: #ef4444 !important;
}

@media (max-width: 575.98px) {
    .wishlist-panel {
        top: 64px;
        right: 0.75rem;
        width: calc(100vw - 1.5rem);
        max-height: calc(100vh - 76px);
    }
}

.btn-menu {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.25rem;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 1050;
    display: none !important;
    opacity: 1;
    overflow-y: auto;
}

.mobile-menu-overlay.open {
    display: flex !important;
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--accent-primary);
}

@media (max-width: 767.98px) {
    .brand-name {
        font-size: 0.8rem;
    }

    .mobile-nav-link {
        font-size: 1rem;
        line-height: 1.2;
        hyphens: auto;
    }
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    word-break: keep-all;
    hyphens: auto
}

#hero .hero-tag {
    background-color: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2)
}

#hero .hero-tag-icon {
    color: var(--accent-primary);
    font-size: 0.875rem
}

#hero .hero-tag-text {
    color: var(--accent-primary);
    font-size: 0.8125rem;
    font-weight: 600
}

#hero .hero-title {
    color: var(--text-primary);
    font-size: 2.75rem;
    line-height: 1.2;
    letter-spacing: -0.03em
}

#hero .hero-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.6
}

#hero .hero-btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    border: 1px solid var(--accent-primary);
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, border-color 0.2s ease
}

#hero .hero-btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff
}

#hero .hero-btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease
}

#hero .hero-btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-muted);
    color: var(--text-primary)
}

#hero .hero-badge-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    height: 100%
}

#hero .hero-badge-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0.375rem;
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--accent-badge);
    font-size: 1.1rem;
    flex-shrink: 0
}

#hero .hero-badge-text {
    color: var(--text-primary);
    font-size: 0.875rem
}

#hero .hero-media-wrapper {
    max-width: 580px
}

#hero .hero-image-frame {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color)
}

#hero .hero-main-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block
}

#hero .hero-accent-circle {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0) 70%);
    top: -30px;
    right: -30px;
    z-index: -1;
    pointer-events: none
}

@media (max-width:767.98px) {
    #hero .hero-title {
        font-size: 1.125rem !important;
        line-height: 1.25 !important
    }

    #hero .hero-subtitle {
        font-size: 0.875rem !important;
        line-height: 1.4 !important
    }

    #hero .hero-badge-text {
        font-size: 0.8125rem !important
    }

    #hero .hero-btn-primary,
    #hero .hero-btn-secondary {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.625rem 1rem !important
    }
}

/* ===== about_store ===== */
.about-section {
    background-color: var(--bg-secondary, #f8fafc);
    width: 100%;
}

.about-card {
    background-color: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    width: 100%;
}

.about-badge {
    background-color: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.about-badge-text {
    color: var(--accent-badge, #0284c7);
    font-size: 0.875rem;
}

.about-icon-accent {
    color: var(--accent-badge, #0284c7);
    font-size: 1rem;
}

.about-heading {
    color: var(--text-primary, #0f172a);
    font-size: 2rem;
    line-height: 1.25;
    hyphens: auto;
}

.about-text {
    color: var(--text-primary, #0f172a);
    font-size: 1.05rem;
    line-height: 1.75;
    hyphens: auto;
}

.feature-icon {
    color: var(--accent-primary, #2563eb);
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.feature-title {
    color: var(--text-primary, #0f172a);
    font-size: 1rem;
    line-height: 1.3;
}

.feature-desc {
    color: var(--text-muted, #64748b);
    font-size: 0.8125rem;
}

@media (max-width: 767.98px) {
    .about-heading {
        font-size: 1rem;
        line-height: 1.2;
    }

    .about-text {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .feature-title {
        font-size: 0.875rem;
        line-height: 1.2;
    }
}

/* ===== popular_categories ===== */
#categories {
    width: 100%;
    position: relative;
}

#categories .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#categories .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
}

#categories .js-category-modal-trigger {
    transition: background-color 0.2s ease;
}

#categories .js-category-modal-trigger:hover {
    background-color: var(--accent-hover) !important;
}

#categories .btn-close:focus {
    box-shadow: none;
    outline: none;
}

@media (max-width: 767.98px) {
    #categories h2 {
        font-size: 1rem !important;
        line-height: 1.25;
        hyphens: auto;
    }

    #categories h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
        hyphens: auto;
    }
}

/* ===== popular_products_section ===== */
#popular-products .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#popular-products .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

#popular-products .productAddBtn {
    transition: background-color 0.2s ease;
}

#popular-products .productAddBtn:hover {
    background-color: var(--accent-hover) !important;
}

#popular-products .js-wishlist-btn:hover {
    background-color: #f1f5f9 !important;
}

#popular-products .js-wishlist-btn.is-active i {
    color: #ef4444 !important;
}

#popular-products .btn-outline-primary:hover {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
}

#popular-products .btn-outline-primary:hover i {
    color: #ffffff !important;
}

@media (max-width: 767.98px) {
    #popular-products h2 {
        font-size: 1rem;
        line-height: 1.25;
        hyphens: auto;
    }

    #popular-products h3 {
        font-size: 0.875rem;
        line-height: 1.2;
        hyphens: auto;
    }
}

/* ===== main_catalog ===== */
.catalog-section {
    position: relative;
    width: 100%
}

.catalog-img {
    height: 220px;
    object-fit: cover;
    transition: transform .3s ease
}

#popular-products .ratio img,
#catalog .catalog-img,
#new-arrivals .card .position-relative.overflow-hidden > img {
    object-fit: contain !important;
    object-position: center !important;
    background-color: #f1f5f9;
    padding: 0.75rem;
}

.catalog-img:hover {
    transform: scale(1.03)
}

.nav-pills .nav-link {
    color: var(--text-primary);
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: .875rem;
    white-space: nowrap;
    transition: all .2s ease
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
    color: #fff !important;
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important
}

.js-product-grid.list-view .js-product-item {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important
}

.js-product-grid.list-view .card {
    flex-direction: row !important;
    align-items: center
}

.js-product-grid.list-view .position-relative:first-child {
    width: 220px;
    flex-shrink: 0
}

.js-product-grid.list-view .catalog-img {
    height: 100% !important;
    min-height: 180px
}

@media(max-width:767.98px) {
    h2 {
        font-size: 1rem !important;
        line-height: 1.2;
        hyphens: auto
    }

    h3 {
        font-size: .875rem !important;
        line-height: 1.2;
        hyphens: auto
    }

    .js-product-grid.list-view .card {
        flex-direction: column !important
    }

    .js-product-grid.list-view .position-relative:first-child {
        width: 100%
    }
}

/* ===== store_benefits ===== */
#benefits {
    overflow: hidden;
}

#benefits .benefits-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    width: 100%;
}

#benefits .benefits-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary) !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.08) !important;
}

#benefits .benefits-main-heading {
    font-size: 1.85rem;
    line-height: 1.3;
    hyphens: auto;
    word-break: keep-all;
}

#benefits .benefits-sub-desc {
    font-size: 1rem;
    line-height: 1.5;
    hyphens: auto;
    word-break: keep-all;
}

#benefits .benefits-card-title {
    font-size: 1.15rem;
    line-height: 1.35;
    hyphens: auto;
    word-break: keep-all;
}

#benefits .benefits-card-text {
    font-size: 0.95rem;
    hyphens: auto;
    word-break: keep-all;
}

@media (max-width: 767.98px) {
    #benefits .benefits-main-heading {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    #benefits .benefits-sub-desc {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }

    #benefits .benefits-card-title {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }

    #benefits .benefits-card-text {
        font-size: 0.8rem !important;
        line-height: 1.4;
    }

    #benefits .benefits-card {
        padding: 1.25rem !important;
    }

    #benefits .benefits-icon-wrap {
        width: 44px !important;
        height: 44px !important;
    }

    #benefits .benefits-icon-wrap i {
        font-size: 1.35rem !important;
    }
}

/* ===== workspace_promo ===== */
#promo {
    width: 100%;
}

.promo-image-container img {
    transition: transform 0.4s ease;
}

.promo-image-container:hover img {
    transform: scale(1.02);
}

@media (max-width: 767.98px) {
    #promo h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    .promo-image-container img {
        height: 260px !important;
    }
}

/* ===== new_catalog_items ===== */
#new-arrivals {
    width: 100%;
    position: relative;
}

#new-arrivals .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-color: var(--border-color) !important;
}

#new-arrivals .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
}

#new-arrivals .productAddBtn {
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

#new-arrivals .productAddBtn:hover {
    background-color: var(--accent-hover) !important;
}

#new-arrivals .productAddBtn:active {
    transform: scale(0.98);
}

@media (max-width: 767.98px) {
    #new-arrivals h2 {
        font-size: 1rem !important;
        line-height: 1.25;
        hyphens: auto;
    }

    #new-arrivals h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
        hyphens: auto;
    }
}

/* ===== special_offer_banner ===== */
#special-offer .btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

#special-offer h2 {
    hyphens: auto;
}

@media (max-width: 767.98px) {
    #special-offer h2 {
        font-size: 1rem;
        line-height: 1.25;
    }

    #special-offer p {
        font-size: 0.875rem;
    }

    #special-offer img {
        height: 240px !important;
    }
}

/* ===== order_workflow ===== */
#order-process {
    overflow: hidden;
}

#order-process .js-step-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

#order-process .js-step-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.12);
}

@media (max-width: 767.98px) {
    #order-process h2 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    #order-process h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }
}

/* ===== faq_accordion ===== */
#faq {
    overflow: hidden;
}

#faq .accordion-button:not(.collapsed) {
    background-color: #eff6ff !important;
    color: var(--accent-primary) !important;
    box-shadow: none;
}

#faq .accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

#faq .accordion-button::after {
    filter: invert(20%) sepia(20%) saturate(1000%) hue-rotate(185deg);
    transition: transform 0.25s ease-in-out;
}

#faq .accordion-item {
    border: 1px solid var(--border-color) !important;
}

@media (max-width: 767.98px) {
    #faq h2 {
        font-size: 1rem !important;
        line-height: 1.25;
        hyphens: auto;
    }

    #faq h3 button {
        font-size: 0.875rem !important;
        line-height: 1.25;
        hyphens: auto;
    }

    #faq p {
        font-size: 0.875rem !important;
    }

    #faq .accordion-body {
        font-size: 0.875rem !important;
        padding: 1rem;
    }
}

/* ===== contact_feedback ===== */
.contact-section {
    overflow: hidden;
    hyphens: auto;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.contact-input:focus,
.contact-textarea:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15) !important;
    background-color: var(--bg-primary) !important;
}

.js-submit-btn:hover {
    background-color: var(--accent-hover) !important;
}

@media (max-width: 767.98px) {
    .contact-section h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    .contact-section h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }

    .contact-section h4 {
        font-size: 0.8125rem !important;
        line-height: 1.2 !important;
    }
}

/* ===== footer ===== */
#footer {
    overflow: hidden;
    background-color: var(--dark-surface);
    color: var(--dark-text);
    width: 100%
}

#footer .footer-brand {
    color: var(--dark-text);
    letter-spacing: -0.02em
}

#footer .footer-desc {
    color: #cbd5e1;
    font-size: 0.9375rem;
    line-height: 1.6
}

#footer .footer-heading {
    color: var(--dark-text);
    letter-spacing: 0.05em
}

#footer .footer-contact-text {
    color: #cbd5e1;
    font-size: 0.9375rem;
    word-break: break-all
}

#footer .footer-icon {
    color: var(--accent-primary);
    font-size: 1rem
}

#footer .footer-contact-link {
    color: #cbd5e1;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.2s ease
}

#footer .footer-contact-link:hover,
#footer .footer-contact-link:focus {
    color: var(--accent-hover);
    text-decoration: underline
}

#footer .footer-nav-link {
    color: #cbd5e1;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block
}

#footer .footer-nav-link:hover,
#footer .footer-nav-link:focus {
    color: #ffffff;
    transform: translateX(2px)
}

#footer .footer-bottom {
    border-color: rgba(226, 232, 240, 0.15) !important
}

#footer .footer-copyright {
    color: #94a3b8;
    font-size: 0.875rem
}

#footer .footer-subtext {
    color: #94a3b8;
    font-size: 0.8125rem
}

@media (max-width:767.98px) {
    #footer h2.footer-brand {
        font-size: 1rem;
        line-height: 1.25;
        hyphens: auto
    }

    #footer h3.footer-heading {
        font-size: 0.875rem;
        line-height: 1.2;
        hyphens: auto
    }
}
