/*
Theme Name: Botari Marketplace
Theme URI: https://botari.net
Author: Botari Team
Author URI: https://botari.net
Description: 하이브리드 마켓플레이스 테마 (WordPress + React)
Version: 0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: botari
*/

:root {
    /* Brand Colors */
    --primary: #f8384b;
    --primary-light: #ffc6ce;
    --primary-dark: #d41f34;
    --accent: #10b981;

    /* Background Colors */
    --bg: #fff;
    --bg-light: #fafafa;

    /* Text Colors */
    --text: #000;
    --text-light: #666;
    --text-lighter: #999;
    --bt-placeholder-color: var(--text-lighter);
    --bt-placeholder-font-size: var(--bt-font-size-small);
    --bt-placeholder-font-weight: var(--bt-font-weight-normal);

    /* Border */
    --border: #e5e5e5;

    /* Gradient Colors */
    --gradient-purple-start: var(--gradient-purple-start);
    --gradient-purple-end: var(--gradient-purple-end);

    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Shadows */
    --shadow: rgba(248, 56, 75, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Typography - Font Sizes (4-step site scale) */
    --bt-font-size-small: 14px;
    --bt-font-size-body: 16px;
    --bt-font-size-title: 20px;
    --bt-font-size-display: 28px;
    --font-size-3xs: var(--bt-font-size-small);
    --font-size-2xs: var(--bt-font-size-small);
    --font-size-xs: var(--bt-font-size-small);
    --font-size-sm: var(--bt-font-size-small);
    --font-size-base: var(--bt-font-size-body);
    --font-size-lg: var(--bt-font-size-body);
    --font-size-xl: var(--bt-font-size-title);
    --font-size-2xl: var(--bt-font-size-title);
    --font-size-3xl: var(--bt-font-size-display);
    --font-size-4xl: var(--bt-font-size-display);
    --font-size-5xl: var(--bt-font-size-display);
    --font-size-6xl: var(--bt-font-size-display);

    /* Typography - Font Weights (role vars, normalized) */
    --bt-font-weight-normal: 400;
    --bt-font-weight-medium: 400;
    --bt-font-weight-semibold: 400;
    --bt-font-weight-bold: 400;
    --font-weight-light: var(--bt-font-weight-normal);
    --font-weight-normal: var(--bt-font-weight-normal);
    --font-weight-medium: var(--bt-font-weight-medium);
    --font-weight-semibold: var(--bt-font-weight-semibold);
    --font-weight-bold: var(--bt-font-weight-bold);

    /* Typography - Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.8;

    /* Spacing Scale (4px base unit) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --site-gutter: clamp(16px, 2.8vw, 40px);

    /* Button Styles */
    --btn-radius: 8px;
    --btn-padding: 10px 20px;
    --btn-padding-small: 6px 12px;
    --btn-font-size: var(--bt-font-size-small);
    --btn-font-size-small: var(--font-size-xs);
}

input::placeholder,
textarea::placeholder {
    color: var(--bt-placeholder-color);
    font-size: var(--bt-placeholder-font-size);
    font-weight: var(--bt-placeholder-font-weight);
    opacity: 1;
}

/* ============================================
   Dark Theme Support
   ============================================ */

.bt-theme-dark {
    --bg: #1a1a1a;
    --bg-light: #2a2a2a;
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-lighter: #808080;
    --border: #333;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Header Dark Theme */
.bt-theme-dark .island-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.bt-theme-dark .island-header .island-nav a {
    color: #e0e0e0;
}

.bt-theme-dark .island-header .island-nav a:hover {
    color: #ffffff;
}

.bt-theme-dark .site-title {
    color: #e0e0e0;
}

/* Header Logo SVG (다크 테마에서 색상 반전) */
.bt-theme-dark .site-logo-link svg {
    filter: invert(1) brightness(0.9);
}

/* 메뉴 버튼 */
.bt-theme-dark .mobile-menu-toggle span {
    background: #e0e0e0;
}

/* 유저 아이콘 */
.bt-theme-dark .icon-menu-btn {
    color: #e0e0e0;
}

.bt-theme-dark .icon-svg {
    stroke: #e0e0e0 !important;
}

/* Footer Dark Theme */
.bt-theme-dark .site-footer {
    background: #1a1a1a;
    color: #e0e0e0;
    border-top: 1px solid #333;
}

.bt-theme-dark .site-footer a {
    color: #e0e0e0;
}

.bt-theme-dark .site-footer a:hover {
    color: #ffffff;
}

.bt-theme-dark .site-footer h3,
.bt-theme-dark .site-footer h4 {
    color: #ffffff;
}

.bt-theme-dark .footer-info-separator {
    color: #666;
}

/* Building Blocks Components */
.bt-theme-dark .bb-section {
    background: #2a2a2a;
    color: #e0e0e0;
}

.bt-theme-dark .bb-container {
    background: #2a2a2a;
}

.bt-theme-dark .bb-text {
    color: #e0e0e0;
}

/* Cards */
.bt-theme-dark .card {
    background: #2a2a2a;
    border-color: #333;
}

.bt-theme-dark .card:hover {
    background: #333;
    border-color: #444;
}

.bt-theme-dark .card__title {
    color: #ffffff;
}

.bt-theme-dark .card__excerpt {
    color: #b0b0b0;
}

/* 프로필 섹션 */
.bt-theme-dark .seller-profile {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.bt-theme-dark .seller-name {
    color: #ffffff;
}

.bt-theme-dark .seller-bio {
    color: #b0b0b0;
}

/* 모달 */
.bt-theme-dark .messages-modal-content,
.bt-theme-dark .chatbot-window {
    background: #2a2a2a;
    border-color: #333;
}

.bt-theme-dark .messages-modal-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.bt-theme-dark .chatbot-window-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.bt-theme-dark .conversation-placeholder {
    color: #b0b0b0;
}

.bt-theme-dark input[type="text"],
.bt-theme-dark .chatbot-input {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
}

.bt-theme-dark input[type="text"]::placeholder,
.bt-theme-dark .chatbot-input::placeholder {
    color: var(--bt-placeholder-color);
}

/* Buttons */
.bt-theme-dark .btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.bt-theme-dark .btn-primary:hover {
    background: var(--primary-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    overflow-wrap: break-word;
    word-break: keep-all;
    line-break: strict;
    text-transform: lowercase;
}

body:not(.home):not(.front-page):not(.bt-theme-dark) {
    background: var(--bg);
}

body:not(.home):not(.front-page):not(.bt-theme-dark) #main-content {
    background: var(--bg);
}

body.admin-bar {
    padding-top: 64px;
}

@media (max-width: 575px) {
    body.admin-bar {
        padding-top: 56px;
    }
}

/* Header & Logo */
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 40px;
    width: auto;
    height: auto;
}

/* Navigation Menu */
#menu-primary {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu-primary li {
    margin: 0;
}

#menu-primary a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
}

#menu-primary a:hover {
    color: var(--primary);
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--site-gutter);
}

@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }
}

#main-content {
    width: 100%;
    overflow-x: clip;
    overflow-y: visible;
}

.page-section {
    padding: 24px 0;
}

.page-section + .page-section {
    border-top: 1px solid #f1f1f3;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.section-header,
.section-heading,
.section-title,
.section-description {
    text-align: left;
}

.section-heading {
    align-items: flex-start;
    justify-content: flex-start;
}

.section-heading {
    flex: 1;
}

.section-eyebrow {
  font-size: var(--bt-font-size-small);
  letter-spacing: 0.08em;
  font-weight: var(--bt-font-weight-semibold);
  text-transform: lowercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 4px 0;
    color: var(--text);
}

.section-description {
    font-size: var(--bt-font-size-body);
    line-height: 1.5;
    color: var(--text-light);
    margin: 0;
}

.page-title {
    font-size: var(--bt-font-size-display);
}

@media (max-width: 768px) {
    .page-title {
        font-size: var(--bt-font-size-title);
    }
}

.section-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.section-body {
    margin-top: 16px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.surface-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.page-hero {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 72px 0;
}

.page-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 48px;
}

.page-hero__media {
    flex-shrink: 0;
}

.page-hero__content {
    flex: 1;
}

.page-hero__title {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin-bottom: 12px;
}

.page-hero__subtitle {
    font-size: var(--bt-font-size-body);
    color: var(--text-light);
    line-height: 1.8;
}

/* Netflix-style Hero Section */
.netflix-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #141414;
}

.netflix-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.netflix-hero__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.netflix-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.1) 100%);
}

.netflix-hero__content {
    position: relative;
    z-index: 2;
    padding: 120px 0 80px;
    width: 100%;
}

.netflix-hero__content .container {
    max-width: 650px;
    margin: 0;
    margin-left: 32px;
}

.netflix-hero__label {
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-semibold);
  text-transform: lowercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}

.netflix-hero__title {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    line-height: 1.1;
    color: white;
    margin: 0 0 24px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.netflix-hero__description {
    font-size: var(--bt-font-size-title);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    max-width: 550px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.netflix-hero__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.netflix-hero__badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-medium);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.netflix-hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.netflix-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.netflix-btn svg {
    width: 24px;
    height: 24px;
}

.netflix-btn--play {
    background: white;
    color: black;
}

.netflix-btn--play:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.05);
}

.netflix-btn--info {
    background: rgba(109, 109, 110, 0.7);
    color: white;
}

.netflix-btn--info:hover {
    background: rgba(109, 109, 110, 0.5);
}

.netflix-hero__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
    z-index: 1;
}

@media (max-width: 1024px) {
    .netflix-hero__title {
        font-size: var(--bt-font-size-display);
    }

    .netflix-hero__description {
        font-size: var(--bt-font-size-body);
    }
}

@media (max-width: 768px) {
    .netflix-hero {
        min-height: 70vh;
    }

    .netflix-hero__content {
        padding: 100px 0 60px;
    }

    .netflix-hero__content .container {
        margin-left: 16px;
        margin-right: 16px;
    }

    .netflix-hero__title {
        font-size: var(--bt-font-size-display);
    }

    .netflix-hero__description {
        font-size: var(--bt-font-size-body);
    }

    .netflix-btn {
        padding: 12px 24px;
        font-size: var(--bt-font-size-body);
    }

    .netflix-hero__overlay {
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.8) 100%);
    }
}

@media (max-width: 768px) {
    .page-section {
        padding: 14px 0;
    }

    .page-section + .page-section {
        padding-top: 30px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: var(--bt-font-size-body);
        margin-bottom: 2px;
    }

    .section-description {
        font-size: var(--bt-font-size-body);
    }

    .section-body {
        margin-top: 8px;
    }

    .page-hero__inner {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .page-hero__content {
        width: 100%;
    }
}

.btn {
    display: inline-block;
    padding: var(--btn-padding);
    border-radius: var(--btn-radius);
    font-size: var(--btn-font-size);
    font-weight: var(--bt-font-weight-medium);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--primary);
    transition: all 0.2s ease;
}

.btn-small {
    padding: var(--btn-padding-small);
    font-size: var(--btn-font-size-small);
}

.btn-primary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 20px;
}

.card:hover {
    border-color: var(--text-light);
}

/* ============================================
   Hixfield Layout (Hixfield Top Choice Style)
   ============================================ */

/* Hixfield Grid - Horizontal scrolling list */
.card-grid.layout-hixfield {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding: 4px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
}

/* Hide scrollbar but keep functionality */
.card-grid.layout-hixfield::-webkit-scrollbar {
    display: none;
}

.card-grid.layout-hixfield {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hixfield Card - Square card with minimal overlay */
.layout-hixfield .card {
    position: relative;
    flex: 0 0 240px;
    width: 240px;
    height: 240px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.layout-hixfield .card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Full background image */
.layout-hixfield .card__thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.layout-hixfield .card:hover .card__thumbnail {
    transform: scale(1.05);
}

.layout-hixfield .card__thumbnail--placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--bt-font-size-display);
    opacity: 0.6;
}

/* Subtle gradient overlay - only at bottom */
.layout-hixfield .card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Content overlay at bottom */
.layout-hixfield .card__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    z-index: 2;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.layout-hixfield .card__type {
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-semibold);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  margin: 0;
  opacity: 0.85;
  line-height: 1;
}

.layout-hixfield .card__title {
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    line-height: 1.3;
    margin: 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-hixfield .card__excerpt {
    display: none;
}

.layout-hixfield .card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.layout-hixfield .card__price {
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.layout-hixfield .card__price--free {
    color: rgba(255, 255, 255, 0.95);
}

.layout-hixfield .card__price--locked {
    color: rgba(255, 255, 255, 0.95);
}

.layout-hixfield .card__cta {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .layout-hixfield .card {
        flex: 0 0 200px;
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .card-grid.layout-hixfield {
        gap: 8px;
    }

    .layout-hixfield .card {
        flex: 0 0 160px;
        width: 160px;
        height: 160px;
        border-radius: 6px;
    }

    .layout-hixfield .card__body {
        padding: 10px;
        gap: 3px;
    }

    .layout-hixfield .card__type {
        font-size: var(--bt-font-size-small);
    }

    .layout-hixfield .card__title {
        font-size: var(--bt-font-size-small);
    }

    .layout-hixfield .card__price {
        font-size: var(--bt-font-size-small);
    }
}

/* ============================================
   Messaging System Styles
   ============================================ */

#messaging-panel {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

#messaging-panel-header {
    padding: 16px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

#messaging-panel-title {
    font-weight: var(--bt-font-weight-semibold);
    font-size: var(--bt-font-size-body);
}

#seller-online-status {
    font-size: var(--bt-font-size-small);
    opacity: 0.9;
}

#close-messaging-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: var(--bt-font-size-title);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#close-messaging-btn:hover {
    opacity: 0.8;
}

#messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
}

#messages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message-own {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.message-other {
    align-self: flex-start;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px 12px 12px 0;
}

.message-content {
    font-size: var(--bt-font-size-small);
    line-height: 1.4;
}

.message-time {
    font-size: var(--bt-font-size-small);
    opacity: 0.7;
    margin-top: 4px;
}

#message-input-container {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: white;
    display: flex;
    gap: 8px;
}

#message-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: var(--bt-font-size-small);
    font-family: inherit;
    resize: none;
}

#message-input:focus {
    outline: none;
    border-color: var(--primary);
}

#send-message-btn {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: var(--bt-font-weight-medium);
    cursor: pointer;
    font-size: var(--bt-font-size-small);
}

#send-message-btn:hover {
    opacity: 0.9;
}

#messaging-status {
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-normal);
}

@media (max-width: 480px) {
    #messaging-panel {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
    }
}

/* ============================================
   Permission Request Modal
   ============================================ */

#permission-request-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
}
#permission-request-modal.is-visible {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999998;
}

#permission-request-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    z-index: 999999;
}

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

.permission-progress {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #fff5f6;
    border-color: var(--primary);
}

.progress-step.completed {
    background: #f0fdf4;
    border-color: #10b981;
}

.progress-step.error {
    background: #fef2f2;
    border-color: #ef4444;
}

.step-icon {
    font-size: var(--bt-font-size-title);
}

.step-text {
    flex: 1;
    font-weight: var(--bt-font-weight-semibold);
    color: #111827;
}

.step-status {
    font-size: var(--bt-font-size-small);
    color: #6b7280;
}

.progress-step.active .step-status {
    color: var(--primary);
}

.progress-step.completed .step-status {
    color: #10b981;
}

.progress-step.error .step-status {
    color: #ef4444;
}

/* ============================================
   Messages Modal
   ============================================ */

.conversation-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 4px;
}

.conversation-item:hover {
    background: #f9fafb;
}

.conversation-item.active {
    background: #fff5f6;
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--bt-font-size-body);
    flex-shrink: 0;
    overflow: hidden;
}

.conversation-avatar-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.conversation-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-bold);
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: var(--bt-font-weight-semibold);
    font-size: var(--bt-font-size-small);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.conversation-preview {
    font-size: var(--bt-font-size-small);
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: var(--bt-font-size-small);
    color: var(--text-light);
    margin-top: 4px;
}

.unread-badge {
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-bold);
}

.message-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.message-item.message-own {
    align-items: flex-end;
}

.message-item.message-other {
    align-items: flex-start;
}

.message-content {
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 70%;
    word-wrap: break-word;
    font-size: var(--bt-font-size-small);
    line-height: 1.5;
}

.message-item.message-own .message-content {
    background: var(--primary);
    color: white;
}

.message-time {
    font-size: var(--bt-font-size-small);
    color: var(--text-light);
    margin-top: 4px;
    padding: 0 4px;
}

@media (max-width: 768px) {
    #conversations-list {
        width: 100%;
        border-right: none;
    }

    #conversation-detail {
        display: none;
    }

    #conversation-detail.active {
        display: flex;
    }

    #conversations-list.hidden {
        display: none;
    }
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #fafafa;
}

.login-container {
    width: 100%;
    max-width: 360px;
}

.login-box {
    background: transparent;
    padding: 0;
}

.login-logo {
    text-align: center;
    margin-bottom: 48px;
}

.login-logo img,
.login-logo .custom-logo,
.login-logo .custom-logo-link img {
    max-height: 32px !important;
    width: auto !important;
}

.login-logo h1 {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-semibold);
    margin: 0;
    letter-spacing: -0.02em;
}

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
}

.tab-btn {
    flex: 1;
    padding: 14px 0;
    background: none;
    border: none;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-medium);
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    letter-spacing: 0.02em;
}

.tab-btn:hover {
    color: #666;
}

.tab-btn.active {
    color: #111;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #111;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group label {
  display: block;
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-medium);
  margin-bottom: 8px;
  color: #888;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

.form-group input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    font-size: var(--bt-font-size-body);
    background: transparent;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-bottom-color: #111;
}

.form-group input::placeholder {
    color: var(--bt-placeholder-color);
    font-size: var(--bt-placeholder-font-size);
    font-weight: var(--bt-placeholder-font-weight);
    opacity: 1;
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: var(--bt-font-size-small);
    color: #aaa;
}

.form-group-checkbox {
    margin-bottom: 32px;
}

.form-group-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--bt-font-size-small);
    color: #666;
    cursor: pointer;
    line-height: 1.5;
}

.form-group-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-top: 2px;
    accent-color: #111;
}

.form-group-checkbox a {
    color: #111;
    text-decoration: underline;
}

.login-page .btn-full {
  width: 100%;
  padding: 16px;
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-medium);
  background: #111;
  color: #fff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.3s;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.login-page .btn-full:hover {
    background: #333;
}

.form-links {
    text-align: center;
    margin-top: 24px;
}

.form-links a {
    font-size: var(--bt-font-size-small);
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.form-links a:hover {
    color: #111;
}

.form-message {
    margin-top: 20px;
    padding: 14px;
    border-radius: 0;
    font-size: var(--bt-font-size-small);
    display: none;
    border-left: 3px solid;
}

.form-message.success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.social-login {
    margin-top: 24px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 16px;
    font-size: var(--bt-font-size-small);
    color: var(--text-light);
}

@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }
}


/* ============================================
   Messenger-Style Comments
   ============================================ */

.messenger-style {
    margin-top: 40px;
}

/* 댓글 목록 컨테이너 */
.comments-list-container {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    max-height: 600px;
    overflow-y: auto;
}

/* 댓글 목록 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list > li {
    margin-bottom: 16px;
}

.comment-list > li:last-child {
    margin-bottom: 0;
}

/* 댓글 말풍선 래퍼 */
.comment-bubble-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    width: 100%;
}

/* 내 댓글 정렬 */
.comment-mine .comment-bubble-wrapper {
    flex-direction: row;
    justify-content: flex-end;
}

.comment-others .comment-bubble-wrapper {
    flex-direction: row;
    justify-content: flex-start;
}

/* 아바타 */
.comment-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.comment-avatar img {
    display: block;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
    background: var(--border);
}

.comment-avatar-fallback {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border);
}

/* 댓글 말풍선 */
.comment-bubble {
    max-width: 65%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 남의 댓글 (왼쪽) */
.comment-bubble.others {
    background: white;
    color: var(--text);
    border-bottom-left-radius: 4px;
}

/* 내 댓글 (오른쪽) */
.comment-bubble.mine {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: 0;
}

/* 댓글 작성자 이름 */
.comment-author-name {
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    color: var(--text-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-bubble.mine .comment-author-name {
    color: rgba(255, 255, 255, 0.85);
}

/* 판매자 배지 */
.author-badge {
    display: inline-block;
    background: var(--text);
    color: white;
    font-size: var(--bt-font-size-small);
    padding: 2px 8px;
    border-radius: var(--btn-radius);
    font-weight: var(--bt-font-weight-semibold);
}

/* 댓글 내용 */
.comment-content {
    font-size: var(--bt-font-size-body);
    line-height: 1.5;
}

.comment-content p {
    margin: 0;
}

/* 내 댓글 내용 색상 */
.comment-bubble.mine .comment-content {
    color: white;
}

/* 댓글 메타 (시간, 수정) */
.comment-meta {
    font-size: var(--bt-font-size-small);
    color: #888;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-bubble.mine .comment-meta {
    color: rgba(255, 255, 255, 0.8);
}

.comment-separator {
    margin: 0 4px;
}

.comment-meta a {
    color: inherit;
    text-decoration: none;
}

.comment-meta a:hover {
    text-decoration: underline;
}

/* 댓글 입력 폼 */
#commentform {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comment-form-field {
    margin-bottom: 16px;
}

#comment,
#comment-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--btn-radius);
    font-size: var(--bt-font-size-body);
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

#comment:focus,
#comment-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--shadow);
}

#comment::placeholder,
#comment-input::placeholder {
    color: var(--bt-placeholder-color);
    font-size: var(--bt-placeholder-font-size);
    font-weight: var(--bt-placeholder-font-weight);
    opacity: 1;
}

.submit-button {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    padding: 12px 32px;
    border-radius: var(--btn-radius);
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
    cursor: pointer;
    min-height: 40px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.submit-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--shadow);
}

.submit-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* 댓글 없음 메시지 */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: var(--bt-font-size-body);
}

/* 댓글 네비게이션 */
.comment-navigation {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

.comment-navigation a {
    color: var(--primary);
    text-decoration: none;
    font-size: var(--bt-font-size-small);
}

.comment-navigation a:hover {
    text-decoration: underline;
}

/* 반응형 디자인 (모바일) */
@media (max-width: 768px) {
    .comment-bubble {
        max-width: 80%;
    }

    .comment-avatar img {
        width: 40px;
        height: 40px;
    }

    .comment-avatar,
    .comment-avatar-fallback {
        width: 40px;
        height: 40px;
    }

    .comments-list-container {
        padding: 16px;
        max-height: 450px;
    }

    #commentform {
        padding: 16px;
    }

    #comment,
    #comment-input {
        min-height: 60px;
        font-size: var(--bt-font-size-small);
    }
}

/* 스크롤바 스타일 (webkit) */
.comments-list-container::-webkit-scrollbar {
    width: 8px;
}

.comments-list-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.comments-list-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.comments-list-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ========================================
   Product Detail Page Styles
   ======================================== */

.product-detail-page {
    padding: 40px 20px;
}

.product-detail-page .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.product-hero {
    margin-bottom: 60px;
}

.product-hero-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: start;
}

.product-icon-section {
    position: sticky;
    top: 100px;
}

.product-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-icon-placeholder {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    color: white;
}

.product-meta-sidebar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.product-price {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.product-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: var(--bt-font-size-small);
    color: #666;
}

.stat-icon {
    font-size: var(--bt-font-size-body);
}

.product-title {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    line-height: 1.2;
    margin-bottom: 16px;
}

.product-author {
    font-size: var(--bt-font-size-body);
    color: #666;
    margin-bottom: 24px;
}

.product-excerpt {
    font-size: var(--bt-font-size-body);
    line-height: 1.6;
    color: #374151;
    margin-bottom: 32px;
}

.product-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.btn-large {
    padding: 16px 32px;
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background: #f9fafb;
}

.product-screenshots {
    margin-bottom: 60px;
}

.screenshot-gallery {
    max-width: 900px;
    margin: 0 auto;
}

.screenshot-main {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.screenshot-main img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.screenshot-thumb {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    border: 3px solid transparent;
}

.screenshot-thumb:hover,
.screenshot-thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

.screenshot-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.product-type-content {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
}

.product-type-content h2 {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    font-size: var(--bt-font-size-body);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.file-includes {
    margin-top: 24px;
}

.file-includes h3 {
    font-size: var(--bt-font-size-title);
    margin-bottom: 16px;
}

.file-includes ul {
    list-style: none;
    padding: 0;
}

.file-includes li {
    padding: 10px 0;
    font-size: var(--bt-font-size-body);
    border-bottom: 1px solid #e5e7eb;
}

.file-includes li:last-child {
    border-bottom: none;
}

.product-tabs {
    margin-bottom: 60px;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 32px;
    gap: 32px;
}

.tab-link {
    padding: 16px 0;
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-link:hover {
    color: var(--primary);
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-count {
    font-size: var(--bt-font-size-small);
    color: #9ca3af;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.product-description {
    font-size: var(--bt-font-size-body);
    line-height: 1.8;
    color: #374151;
}

.product-description h2 {
    font-size: var(--bt-font-size-display);
    margin-top: 32px;
    margin-bottom: 16px;
}

.product-description h3 {
    font-size: var(--bt-font-size-title);
    margin-top: 24px;
    margin-bottom: 12px;
}

.product-description p {
    margin-bottom: 16px;
}

.product-description ul,
.product-description ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: var(--bt-font-size-body);
}

.seller-card {
    display: flex;
    gap: 24px;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
}

.seller-avatar {
    flex-shrink: 0;
}

.seller-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.seller-info h3 {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin-bottom: 8px;
}

.seller-meta {
    font-size: var(--bt-font-size-small);
    color: #6b7280;
    margin-bottom: 12px;
}

.seller-bio {
    font-size: var(--bt-font-size-body);
    color: #374151;
    line-height: 1.6;
    margin-bottom: 20px;
}

.seller-other-products h3 {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card-mini {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-card-mini a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-mini img,
.product-placeholder {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-placeholder {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.product-card-mini h4 {
    padding: 12px 16px 8px;
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-semibold);
}

.mini-price {
    padding: 0 16px 12px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-bold);
    color: var(--primary);
}

@media (max-width: 768px) {
    .product-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-icon-section {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .product-title {
        font-size: var(--bt-font-size-display);
    }

    .product-cta-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .tabs-nav {
        gap: 16px;
    }

    .tab-link {
        font-size: var(--bt-font-size-body);
        padding: 12px 0;
    }

    .seller-card {
        flex-direction: column;
        text-align: center;
    }

    .seller-avatar {
        margin: 0 auto;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: var(--bt-font-size-title);
    }

    .product-type-content {
        padding: 24px 20px;
    }

    .screenshot-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article 템플릿 스타일 */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-body {
    font-size: var(--bt-font-size-body);
    line-height: 1.8;
    color: #1f2937;
}

.article-body h1 {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin: 40px 0 20px;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

.article-body h2 {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-semibold);
    margin: 32px 0 16px;
    color: #1f2937;
}

.article-body h3 {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-semibold);
    margin: 24px 0 12px;
    color: #374151;
}

.article-body p {
    margin: 16px 0;
}

.article-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
    transition: all 0.2s;
}

.article-body a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.article-body strong {
    font-weight: var(--bt-font-weight-bold);
    color: #111827;
}

.article-body em {
    font-style: italic;
}

.article-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: var(--bt-font-size-small);
    color: #dc2626;
}

.article-body pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: var(--bt-font-size-small);
}

/* 블로그 포스트 템플릿 */
.article-template-blog .article-body {
    font-family: Georgia, serif;
}

.article-template-blog .article-body h1 {
    text-align: center;
    border-bottom: none;
    font-size: var(--bt-font-size-display);
}

.article-template-blog .article-body h2 {
    font-style: italic;
    color: var(--primary);
}

/* 튜토리얼 템플릿 */
.article-template-tutorial .article-body h2::before {
    content: " ";
    margin-right: 8px;
}

.article-template-tutorial .article-body h3::before {
    content: "▶ ";
    margin-right: 8px;
    color: var(--primary);
}

/* 리뷰 템플릿 */
.article-template-review .article-body h2::before {
    content: "⭐ ";
    margin-right: 8px;
}

/* 인터뷰 템플릿 */
.article-template-interview .article-body h2 {
    background: #fff5f6;
    padding: 12px 16px;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}

.article-template-interview .article-body h3 {
    color: var(--primary);
    font-style: italic;
}

/* 레시피 템플릿 */
.article-template-recipe .article-body h2::before {
    content: " ";
    margin-right: 8px;
}

.article-template-recipe .article-body h3 {
    background: #fef3c7;
    padding: 8px 12px;
    border-radius: 6px;
    color: #92400e;
}

/* ===========================
   App Store 스타일 제품 페이지
   =========================== */

.appstore-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.appstore-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.appstore-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.app-icon-large {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    background: white;
    flex-shrink: 0;
}

.appstore-info {
    flex: 1;
    padding-top: 10px;
}

.appstore-info h1 {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 8px 0;
    color: white;
}

.app-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.app-type-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-semibold);
    backdrop-filter: blur(10px);
}

.app-author {
    font-size: var(--bt-font-size-body);
    opacity: 0.9;
}

.app-author a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
}

.app-author a:hover {
    border-bottom-color: white;
}

.app-description {
    font-size: var(--bt-font-size-body);
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
}

/* 구매 박스 */
.appstore-purchase-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-balance {
    font-size: var(--bt-font-size-body);
    opacity: 0.9;
}

.balance-amount {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-bold);
    margin-left: 8px;
}

.product-price {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
}

/* 구매/플레이 버튼 */
.btn-appstore-buy,
.btn-appstore-play {
    width: 100%;
    padding: 18px 28px;
    border-radius: 12px;
    border: none;
    font-size: var(--bt-font-size-body);
    font-weight: var(--bt-font-weight-bold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-appstore-buy {
    background: white;
    color: var(--primary);
}

.btn-appstore-buy:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-appstore-buy:active {
    transform: translateY(0);
}

.btn-appstore-play {
    background: var(--accent);
    color: white;
}

.btn-appstore-play:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    font-size: var(--bt-font-size-title);
}

.btn-text {
    font-size: var(--bt-font-size-body);
}

/* 로그인 필요 메시지 */
.login-required {
    text-align: center;
    padding: 20px;
}

.login-required p {
    margin: 0 0 16px 0;
    font-size: var(--bt-font-size-body);
    opacity: 0.9;
}

.btn-login {
    background: white;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: var(--bt-font-weight-semibold);
    font-size: var(--bt-font-size-body);
    display: inline-block;
    transition: all 0.2s;
}

.btn-login:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* 제품 상세 섹션 */
.product-details {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

.product-details h2 {
    font-size: var(--bt-font-size-display);
    font-weight: var(--bt-font-weight-bold);
    margin: 0 0 24px 0;
    color: #111827;
}

.product-details .description {
    font-size: var(--bt-font-size-body);
    line-height: 1.8;
    color: #374151;
    margin-bottom: 40px;
}

/* 반응형 */
@media (max-width: 768px) {
    .appstore-hero {
        padding: 40px 0;
    }

    .appstore-header {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .app-icon-large {
        width: 120px;
        height: 120px;
    }

    .appstore-info h1 {
        font-size: var(--bt-font-size-display);
    }

    .app-meta {
        flex-direction: column;
        gap: 8px;
    }

    .product-price {
        font-size: var(--bt-font-size-title);
    }

    .btn-appstore-buy,
    .btn-appstore-play {
        font-size: var(--bt-font-size-body);
        padding: 16px 24px;
    }
}

/* ============================================
   Login Page V2 - Step-by-step Minimal Design
   ============================================ */

.login-page-v2 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 40px 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 48px 40px;
}

/* Logo */
.login-page-v2 .login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-page-v2 .login-logo a {
    display: inline-block;
    text-decoration: none;
}

.login-page-v2 .login-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

/* Form Container */
.login-form-container {
    position: relative;
}

/* Steps */
.login-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.login-step.active {
    display: block;
}

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

/* Titles */
.login-title {
    font-size: var(--bt-font-size-title);
    font-weight: var(--bt-font-weight-semibold);
    color: #111;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: var(--bt-font-size-small);
    color: #888;
    margin: 0 0 40px 0;
}

/* Input Group */
.login-page-v2 .input-group {
    margin-bottom: 24px;
    position: relative;
}

.login-page-v2 .input-group input {
    width: 100%;
    padding: 16px 0;
    font-size: var(--bt-font-size-body);
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    outline: none;
    transition: border-color 0.3s;
}

.login-page-v2 .input-group input:focus {
    border-bottom-color: #111;
}

.login-page-v2 .input-group input::placeholder {
    color: var(--bt-placeholder-color);
    font-size: var(--bt-placeholder-font-size);
    font-weight: var(--bt-placeholder-font-weight);
    opacity: 1;
}

.login-page-v2 .input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #111;
    transition: width 0.3s;
}

.login-page-v2 .input-group input:focus ~ .input-line {
    width: 100%;
}

.login-page-v2 .input-hint {
    display: block;
    margin-top: 8px;
    font-size: var(--bt-font-size-small);
    color: #aaa;
}

/* Buttons */
.login-btn {
    width: 100%;
    padding: 16px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-medium);
    background: #111;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    letter-spacing: 0.02em;
    margin-top: 16px;
}

.login-btn:hover {
    background: #333;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-btn-secondary {
    width: 100%;
    padding: 16px;
    font-size: var(--bt-font-size-small);
    font-weight: var(--bt-font-weight-medium);
    background: transparent;
    color: #111;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    letter-spacing: 0.02em;
}

.login-btn-secondary:hover {
    border-color: #111;
    background: #fafafa;
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.login-divider span {
    padding: 0 16px;
    font-size: var(--bt-font-size-small);
    color: #aaa;
}

/* Back Button */
.back-btn {
    background: none;
    border: none;
    font-size: var(--bt-font-size-small);
    color: #888;
    cursor: pointer;
    padding: 0;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #111;
}

/* Remember Me */
.remember-me {
    margin: 20px 0 8px 0;
}

.remember-me label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--bt-font-size-small);
    color: #666;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #111;
}

/* Forgot Link */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    font-size: var(--bt-font-size-small);
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #111;
}

/* Terms Check */
.terms-check {
    margin: 24px 0 8px 0;
}

.terms-check label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--bt-font-size-small);
    color: #666;
    cursor: pointer;
    line-height: 1.5;
}

.terms-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #111;
}

.terms-check a {
    color: #111;
    text-decoration: underline;
}

/* Message */
.login-message {
    display: none;
    margin-top: 24px;
    padding: 14px 16px;
    font-size: var(--bt-font-size-small);
    border-radius: 4px;
}

.login-message.error {
    background: #fef2f2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
}

.login-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border-left: 3px solid #16a34a;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-page-v2 {
        padding: 20px 16px;
        background: #fff;
    }

    .login-wrapper {
        max-width: 100%;
        border: none;
        border-radius: 0;
        padding: 32px 24px;
    }

    .login-page-v2 .login-logo {
        margin-bottom: 36px;
    }

    .login-title {
        font-size: var(--bt-font-size-title);
    }
}

/* Permission Modal Benefits */
.permission-benefits {
    text-align: left;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0 24px;
}
.permission-benefits .benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.permission-benefits .benefit-item:last-child {
    margin-bottom: 0;
}
.permission-benefits .benefit-icon {
    font-size: var(--bt-font-size-body);
}
.permission-benefits .benefit-text {
    color: #333;
}
.permission-benefits .benefit-text small {
    color: #999;
}

/* CTA override: keep purchase/play actions black */
.pd-cta__btn--purchase,
.pd-cta__btn--play {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

.pd-cta__btn--purchase:hover,
.pd-cta__btn--play:hover {
  background: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
}

/* 404 */
.bt-404-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px var(--site-gutter, 20px);
  background: #fff;
}

.bt-404 {
  width: min(100%, 520px);
  text-align: center;
}

.bt-404__eyebrow {
  margin: 0 0 8px;
  color: var(--primary, #f8384b);
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-bold);
  letter-spacing: 0.12em;
}

.bt-404__title {
  margin: 0 0 12px;
  color: var(--text, #111);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.12;
}

.bt-404__description {
  margin: 0 auto 24px;
  max-width: 420px;
  color: var(--text-light, #666);
  font-size: var(--bt-font-size-body);
  line-height: 1.7;
}

.bt-404__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.bt-404__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px;
  background: #fff;
  color: var(--text, #111);
  font-size: var(--bt-font-size-small);
  font-weight: var(--bt-font-weight-bold);
  text-decoration: none;
}

.bt-404__button--primary {
  border-color: #111;
  background: #111;
  color: #fff;
}
