:root {
    --bg-color: #ffffff;
    --container-bg-color: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-link: #0066cc;
    --border-color: #d2d2d7;
    --button-bg: #0071e3;
    --button-bg-hover: #0077ed;
    --border-radius-card: 18px;
    --border-radius-button: 980px; /* Pill shape */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.overflow-hidden {
    overflow: hidden;
}

.font-lexend {
    font-family: 'Lexend', sans-serif;
}

/* Skip to Content Link - Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--button-bg);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #c5c5c7; border-radius: 10px; border: 2px solid var(--bg-color); }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Page Transition Feedback */
#content {
    transition: opacity 0.2s ease-in-out;
}
#page-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none; /* Hidden by default */
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}
#page-loader.visible {
    display: block;
    opacity: 1;
}
.loader-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}


/* General Content Container */
.content-section {
    background-color: transparent;
    padding: 2rem 1rem 4rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .content-section {
        padding: 3rem 2rem 5rem;
        margin-bottom: 4rem;
    }
}
@media (min-width: 1024px) {
    .content-section {
        padding: 4rem 3rem 6rem;
        margin-bottom: 5rem;
    }
}

/* Remove margin from the last section to even out top/bottom spacing */
.content-section:last-child {
    margin-bottom: 0;
}

/* First section has less top padding */
.content-section:first-of-type {
    padding-top: 1rem;
}
@media (min-width: 768px) {
    .content-section:first-of-type {
        padding-top: 2rem;
    }
}
@media (min-width: 1024px) {
    .content-section:first-of-type {
        padding-top: 3rem;
    }
}


/* Typography */
.section-headline {
    font-family: 'Lexend', sans-serif;
    font-size: 2rem; /* 32px */
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}
@media (min-width: 768px) {
    .section-headline {
        font-size: 2.5rem; /* 40px */
    }
}
@media (min-width: 1024px) {
    .section-headline {
        font-size: 3rem; /* 48px */
    }
}
.section-subheadline {
    font-size: 1.125rem; /* 18px */
    font-weight: 400;
    text-align: center;
    color: var(--text-secondary);
    max-width: 60ch;
    margin: 0 auto 3rem auto;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}
@media (min-width: 768px) {
    .section-subheadline {
        font-size: 1.375rem; /* 22px */
        margin-bottom: 4rem;
    }
}
@media (min-width: 1024px) {
    .section-subheadline {
        font-size: 1.5rem; /* 24px */
    }
}

/* Fade in animation */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-apple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius-button);
    background-color: var(--button-bg);
    color: #fff;
    font-weight: 500;
    font-size: 17px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}
.btn-apple:hover:not([disabled]) {
    background-color: var(--button-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.35);
}
.btn-apple:active:not([disabled]) {
    transform: translateY(0);
}
.btn-apple[disabled] {
    background-color: #adadad;
    cursor: not-allowed;
    box-shadow: none;
}

/* Product Card */
.product-card {
    background-color: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.1);
}
.product-card-image-container {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-card-image-container {
    transform: scale(1.05);
}
.product-card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
@media (min-width: 768px) {
    .product-card {
        padding: 3rem 2.5rem;
    }
    .product-card-image-container {
        height: 280px;
    }
}

/* Navigation */
.app-nav {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}
@media (min-width: 768px) {
    .app-nav {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.75rem 0;
    }
}

.nav-link, #products-dropdown a, #mobile-products-dropdown a {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    border-radius: var(--border-radius-button);
}
.nav-link:hover, #products-dropdown a:hover, #mobile-products-dropdown a:hover {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.06);
}
.active-link, .nav-link[aria-current="page"], a.active-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.04);
}

/* Modal and Slider */
.modal-container {
    transition: opacity 0.3s ease-in-out;
}
.modal-content {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
#product-detail-modal > div, #promotion-detail-modal > div {
    border-radius: var(--border-radius-card);
}
#modal-image-slider, #banner-slider {
    background-color: #f5f5f7;
    touch-action: pan-y; /* Allow vertical scroll, handle horizontal scroll in JS */
    overscroll-behavior-x: contain;
}
.slider-item {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}

/* Banner wrapper improvements */
#banner-wrapper {
    margin-bottom: 3rem !important;
    box-shadow: none !important;
    border-radius: 28px !important;
    overflow: hidden;
}
@media (min-width: 768px) {
    #banner-wrapper {
        margin-bottom: 4rem !important;
    }
}

/* Hide banner controls by default, show on hover */
#banner-prev, #banner-next {
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#banner-wrapper:hover #banner-prev,
#banner-wrapper:hover #banner-next {
    opacity: 1;
}
#banner-prev:hover, #banner-next:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Minimal dot indicators */
#banner-slider-dots .dot {
    background-color: rgba(255, 255, 255, 0.5);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#banner-slider-dots .dot.active {
    background-color: rgba(255, 255, 255, 0.95);
    width: 24px;
    border-radius: 4px;
}

/* Form Elements */
#contact-form input, #contact-form select, #contact-form textarea {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}
#contact-form input:focus, #contact-form select:focus, #contact-form textarea:focus {
    outline: none;
    border-color: var(--button-bg);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
    background-color: #ffffff;
}
#contact-form-product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: var(--border-radius-card);
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 1rem;
    overflow: hidden;
}
#contact-form-product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Form Validation Styles */
.input-error {
    border-color: #dc2626 !important; /* red-600 */
}

.form-error-container {
    min-height: 1.25rem; /* Reserve space for one line of error text */
    margin-top: 0.25rem;
    color: #dc2626; /* red-600 */
    font-size: 0.875rem; /* 14px */
}

/* New Scroll-to-Top Button Styles */
#scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}
#scroll-to-top-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden;
}

/* Product Labels Container */
.product-card-labels {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 28px;
    flex-wrap: wrap;
}

/* Base style for all labels */
.product-label {
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-align: center;
    white-space: nowrap; /* Prevent text from wrapping inside a label */
    flex-shrink: 1; /* Allow labels to shrink if needed */
}

/* Style for 'DISCONTINUED' label */
.label-discontinued {
    background-color: #4b5563; /* gray-600 */
    font-size: 0.8rem; /* 12.8px */
    padding: 0.3rem 0.8rem;
    flex-shrink: 0; /* Don't allow this label to shrink */
}

/* Style for promotion labels */
.label-rental, .label-purchase, .label-new {
    font-size: 0.75rem; /* 12px */
    padding: 0.3rem 0.75rem;
    text-transform: uppercase; /* Makes it look more like a tag */
}

.label-rental {
    background-color: #2563eb; /* blue-600 */
}

.label-purchase {
    background-color: #16a34a; /* green-600 */
}

.label-new {
    background-color: #ef4444; /* red-500 */
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Scroll-triggered animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for grid items */
.product-card.fade-in:nth-child(1) { transition-delay: 0s; }
.product-card.fade-in:nth-child(2) { transition-delay: 0.1s; }
.product-card.fade-in:nth-child(3) { transition-delay: 0.2s; }
.product-card.fade-in:nth-child(4) { transition-delay: 0.3s; }
.product-card.fade-in:nth-child(5) { transition-delay: 0.4s; }
.product-card.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* Footer improvements */
footer {
    background-color: #f5f5f7 !important;
    padding: 1.5rem 1.5rem !important;
}
@media (min-width: 768px) {
    footer {
        padding: 1.75rem 1.5rem !important;
    }
}
footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}
footer nav {
    margin: 0;
}
footer nav a.nav-link {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
}
footer nav a.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

/* Product card text improvements */
.product-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.product-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Link improvements */
a {
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main content padding adjustments */
main {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}
@media (min-width: 768px) {
    main {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* Navigation Logo */
.app-nav img[alt*="Logo"] {
    height: 2.5rem;
    transition: transform 0.2s ease;
}
@media (min-width: 768px) {
    .app-nav img[alt*="Logo"] {
        height: 2.75rem;
    }
}
.app-nav a:hover img[alt*="Logo"] {
    transform: scale(1.05);
}

/* Products Dropdown Enhancement */
#products-dropdown {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    pointer-events: none;
}

#products-dropdown.dropdown-open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
}

#products-dropdown a {
    font-size: 15px;
}

/* Mobile Menu Enhancement - Overlay Style */
#mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin: 0.5rem;
    border-radius: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    z-index: 1000;
}

#mobile-menu.menu-open {
    max-height: 600px;
    opacity: 1;
    transform: scaleY(1);
}

/* Submenu animation */
#mobile-products-dropdown {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

#mobile-products-dropdown.submenu-open {
    max-height: 300px;
    opacity: 1;
    transform: scaleY(1);
}

/* Mobile products dropdown button icon rotation */
#mobile-products-dropdown-btn svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

#mobile-products-dropdown-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Mobile menu button icon smooth rotation */
#mobile-menu-button svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

#mobile-menu-button[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

/* Navigation container needs relative positioning for overlay */
.app-nav {
    position: relative;
}

/* Force disable pinch-to-zoom on all browsers including iOS */
* {
    touch-action: pan-x pan-y;
}

body {
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
}

/* Prevent double-tap zoom */
button, a, input, select, textarea {
    touch-action: manipulation;
}

/* Contact Form Improvements */
#contact-form {
    max-width: 100%;
}

#contact-form label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

#contact-form input, #contact-form select, #contact-form textarea {
    font-family: inherit;
}

#contact-form-product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s ease;
}

#contact-form-product-image {
    border-radius: 8px;
}

/* Contact info section */
.contact-info-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Contact links */
#content a[href^="tel:"],
#content a[href^="mailto:"],
#content a[href^="https://wa.me"],
#content a[href^="http://pf.kakao"],
#content a[href^="https://www.facebook"],
#content a[href^="https://www.instagram"] {
    color: var(--text-link) !important;
    text-decoration: none;
}

#content a[href^="tel:"]:hover,
#content a[href^="mailto:"]:hover,
#content a[href^="https://wa.me"]:hover,
#content a[href^="http://pf.kakao"]:hover,
#content a[href^="https://www.facebook"]:hover,
#content a[href^="https://www.instagram"]:hover {
    text-decoration: underline;
    color: var(--button-bg) !important;
}

/* Map container */
#map {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Contact section headings */
#content h3 {
    margin-bottom: 2rem;
}

#content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* reCAPTCHA text */
#contact-form + p {
    color: var(--text-secondary);
}

#contact-form + p a {
    color: var(--text-link) !important;
}

#contact-form + p a:hover {
    text-decoration: underline;
}

/* Form field groups */
.form-field-group {
    margin-bottom: 0;
}
