@charset "utf-8";

/*
  STIZ Custom Styles
  Based on Tailwind CSS (CDN version being used in HTML)

  ── 디자인 시스템 통합 (2026-07-09) ──
  아래 @import 두 개로 디자인 핸드오프 _ds/tokens/*.css 및 컴포넌트 클래스가 로드됨.
  기존 :root와 클래스는 그대로 유지되어 하위 호환 안전.
  신규 페이지·컴포넌트는 tokens.css / components.css의 정의를 사용할 것.
*/

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

/* Cafe24 Logic Override */
body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --stiz-black: #111111;
    --stiz-white: #ffffff;
    --stiz-blue: #2563eb;
    --stiz-blue-700: #1d4ed8;
    --stiz-red: #e63946;
    --stiz-red-600: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --surface-page: #ffffff;
    --surface-muted: #f7f7f7;
    --surface-strong: #111111;
    --surface-blue: #eff6ff;
    --border: #e5e7eb;
    --font-sans: "Pretendard", "Pretendard Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --container-max: 1280px;
    --container-pad: 24px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --shadow-soft: 0 18px 45px rgba(17, 17, 17, 0.08);
}

.material-symbols-outlined {
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

.stiz-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.stiz-section {
    padding-block: 96px;
}

.stiz-section.compact {
    padding-block: 64px;
}

.stiz-eyebrow {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

.stiz-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-page);
    overflow: hidden;
}

.stiz-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--stiz-black);
    border-radius: 6px;
    background: var(--stiz-black);
    color: var(--stiz-white);
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.stiz-btn:hover {
    background: var(--gray-800);
    border-color: var(--gray-800);
}

.stiz-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.stiz-btn.secondary {
    background: var(--stiz-white);
    color: var(--stiz-black);
}

.stiz-btn.secondary:hover {
    background: var(--gray-100);
    border-color: var(--stiz-black);
}

.stiz-btn.blue {
    background: var(--stiz-blue);
    border-color: var(--stiz-blue);
}

.stiz-btn.blue:hover {
    background: var(--stiz-blue-700);
    border-color: var(--stiz-blue-700);
}

.stiz-chip {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--stiz-white);
    color: var(--gray-700);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.stiz-chip:hover,
.stiz-chip.is-active {
    border-color: var(--stiz-black);
    background: var(--stiz-black);
    color: var(--stiz-white);
}

.stiz-product-card {
    position: relative;
    display: block;
    color: var(--stiz-black);
}

.stiz-product-card:hover .stiz-product-image img {
    transform: scale(1.045);
}

.stiz-product-image {
    position: relative;
    aspect-ratio: 3 / 4;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
}

.stiz-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms ease;
}

.stiz-product-meta {
    padding-top: 12px;
}

.stiz-product-name {
    color: var(--stiz-black);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.stiz-product-price {
    color: var(--stiz-black);
    font-size: 14px;
    font-weight: 700;
}

.stiz-bleed-dark {
    background: var(--stiz-black);
    color: var(--stiz-white);
}

.stiz-muted-band {
    background: var(--surface-muted);
}

.stiz-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 32px;
    align-items: start;
}

.stiz-request-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.stiz-summary-panel {
    position: sticky;
    top: 96px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    padding: 24px;
}

.stiz-summary-panel.white {
    background: var(--surface-page);
}

.stiz-form-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-page);
    padding: 24px;
}

.stiz-form-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--stiz-black);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
}

.stiz-form-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--stiz-white);
    color: var(--stiz-black);
    padding: 11px 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.stiz-form-input:focus {
    outline: none;
    border-color: var(--stiz-black);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.stiz-form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-800);
    font-size: 13px;
    font-weight: 800;
}

.stiz-line-item {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.stiz-line-item:first-child {
    padding-top: 0;
}

.stiz-line-item:last-child {
    border-bottom: 0;
}

.stiz-line-item-image {
    width: 90px;
    height: 116px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
}

.stiz-line-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stiz-upload-dropzone {
    display: flex;
    min-height: 160px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    padding: 28px 18px;
    text-align: center;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.stiz-upload-dropzone:hover {
    border-color: var(--stiz-black);
    background: var(--stiz-white);
}

.stiz-notice-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    padding: 16px;
}

.stiz-notice-panel.important {
    border-color: color-mix(in srgb, var(--stiz-red) 55%, var(--stiz-white));
    background: color-mix(in srgb, var(--stiz-red) 6%, var(--stiz-white));
}

.stiz-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 8px;
    color: var(--gray-600);
    font-size: 14px;
}

.stiz-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 18px;
    color: var(--stiz-black);
    font-weight: 900;
}

.stiz-scrollbar-hide {
    scrollbar-width: none;
}

.stiz-scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* 선택된 탭/필터는 어디서나 흰 글자로 고정해 대비를 확보한다. */
.is-active,
.is-active *,
.selected,
.selected *,
[data-selected="true"],
[data-selected="true"] *,
[aria-selected="true"],
[aria-selected="true"] * {
    color: var(--stiz-white) !important;
}

/* ⚠️ 위 규칙의 예외 — 헤더 내비의 활성 항목(.is-active)은 흰 헤더 위에 있어 검정이어야 한다.
   2026-08-19 실측: 페가수스 MD 페이지에서 활성 메뉴 글자가 흰색이 되어 사라졌다(31개 페이지 공통).
   메인(page-main) 투명 헤더일 때만 흰색으로 되돌린다. */
.stiz-header .stiz-nav-item.is-active {
    color: var(--stiz-black) !important;
}
body.page-main .stiz-header:not(.is-scrolled) .stiz-nav-item.is-active {
    color: var(--stiz-white) !important;
}

@media (max-width: 767px) {
    :root {
        --container-pad: 16px;
    }

    .stiz-section {
        padding-block: 64px;
    }

    .stiz-checkout-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .stiz-request-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .stiz-summary-panel {
        position: static;
    }

    .stiz-form-card {
        padding: 20px;
    }

    .stiz-line-item {
        gap: 12px;
    }

    .stiz-line-item-image {
        width: 78px;
        height: 102px;
    }
}

/* Mega Menu Animations */
.group:hover .group-hover\:block {
    display: block;
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Utility Class Extensions (that might be missed by CDN or needing high specificity) */
.text-brand-black { color: var(--stiz-black); }
.bg-brand-black { background-color: var(--stiz-black); }
.text-brand-gray { color: var(--gray-500); }
