/* ============================================
   Showroom Common Styles
   ============================================ */

/* Global Reset & Base */
:root {
    --primary-color: #111;
    --accent-color: #008cffff;
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --border-color: #e5e7eb;
    --text-main: #111;
    --text-sub: #666;
    --text-muted: #999;
}

/* ============================================
   Showroom List Page Styles
   ============================================ */

/* Showroom Layout - Full Width */
.showroom-container {
    width: 100%;
    max-width: 1920px;
    margin: 0;
    padding: 60px 40px 60px 50px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: var(--text-main);
    display: flex;
    gap: 80px;
    box-sizing: border-box;
}

/* Sidebar (Left) - Sticky & Functional */
.showroom-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 40px;
    height: min-content;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section-header {
    margin-bottom: 24px;
}

.sidebar-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 24px;
}

/* Search Box - Premium Feel */
.sidebar-search-box {
    position: relative;
}

.sidebar-search-input {
    width: 100%;
    height: 52px;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 0 16px 0 48px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    background: var(--bg-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    outline: none;
    transition: all 0.2s ease;
}

.sidebar-search-input::placeholder {
    font-weight: 300;
}

.sidebar-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Filters - Clear categorization */
.sidebar-filter-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 30px;
}

.sidebar-sub-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.sidebar-sub-title:hover {
    opacity: 0.7;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Chips - Tactile & Soft */
.filter-chip {
    font-size: 0.8rem;
    color: var(--text-sub);
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 4px 10px;
    border-radius: 1520px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    font-weight: 500;
}

.filter-chip:hover {
    background: #ececec;
    color: var(--text-main);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Main Content (Right) */
.showroom-main {
    flex: 1;
    min-width: 0;
}

/* Masonry Grid */
.masonry-grid {
    column-count: 4;
    column-gap: 25px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 48px;
}

/* Card Design - Unified & Premium */
.design-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 15px;
}

.design-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #e5e7eb;
}

/* Image Wrapper */
.card-image-wrap {
    position: relative;
    width: 100%;
    border-radius: 0;
    margin-bottom: 20px;
    background: #f8f8f8;
    overflow: hidden;
    max-height: 600px;
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    object-fit: cover;
    min-height: 100%;
}

.design-card:hover .card-image {
    transform: scale(1.04);
}

/* Overlay Badge */
.img-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.card-content {
    padding: 0 20px;
}

/* Typography Hierarchy */
.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.3;
    transition: color 0.2s;
}

.design-card:hover .card-title {
    color: #222222;
}

.design-card:hover .card-desc-box {
    color: #333333;
    font-weight: 400;
}

.card-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 500;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
}

/* Description Box - Refined to blend or stand out inside card */
.card-desc-box {
    /*background: #f9fafb;
    border-radius: 10px;
    padding: 16px;*/
    font-size: 0.87rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 5px;
    font-weight: 300;
}

.desc-more {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 6px;
    font-weight: 600;
    cursor: pointer;
}

.desc-more:hover {
    text-decoration: underline;
}

.card-footer {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
    display: flex;
    justify-content: flex-end;
}

/* Selected Tags Area */
.selected-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    min-height: 0;
}

.selected-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    padding: 0px 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-tag-item:hover {
    color: var(--accent-color);
}

.selected-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.selected-tag-remove svg {
    width: 100%;
    height: 100%;
    stroke-width: 3;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 60px 0;
    margin-top: 40px;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.load-more-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn.loading {
    position: relative;
    color: transparent;
}

.load-more-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.no-more-items {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Responsive - List Page */
@media (max-width: 1500px) {
    .masonry-grid {
        column-count: 3;
    }

    .showroom-container {
        padding: 50px 24px;
        gap: 40px;
    }
}

@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 2;
    }

    .showroom-container {
        padding: 50px 24px;
        gap: 40px;
    }
}

@media (max-width: 800px) {
    .showroom-container {
        flex-direction: column;
        padding: 24px;
    }

    .showroom-sidebar {
        width: 100%;
        position: static;
        gap: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border-color);
    }

    .masonry-grid {
        column-count: 1;
    }

    .sidebar-main-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   Showroom Detail Page Styles
   ============================================ */

/* Detail Page Styles */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: 'Suit', 'Pretendard', sans-serif;
    color: #333;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 60px;
    align-items: start;
}

/* Left: Visuals & Content */
.visual-gallery {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.main-image-frame {
    width: 100%;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}

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

/* New Left Content Styles */
.left-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
    display: block;
}

.section-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    text-align: justify;
    word-break: break-all;
}

.usage-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.usage-item {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f9f9f9;
}

.usage-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Right: Info - Sticky */
.info-section {
    padding-top: 0;
    position: sticky;
    top: 40px;
}

.detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-badge {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    background: #f0f0f0;
    color: #666;
}

.detail-badge.primary {
    background: #111;
    color: #fff;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
    color: #111;
    word-break: keep-all;
}

.info-box {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 24px 24px 10px 24px;
    margin-bottom: 30px;
}

.info-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    font-weight: 600;
}

.check-icon {
    color: #107fffff;
    font-weight: bold;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.res-tag {
    font-size: 0.8rem;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 20px;
    color: #555;
}

/* Sticky Bottom Actions (Desktop default) */
.action-group {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.request-btn {
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 12px;
}

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

.sub-actions {
    display: flex;
    gap: 10px;
}

.sub-btn {
    flex: 1;
    padding: 14px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
}

.sub-btn:hover {
    background: #f9f9f9;
    border-color: #bbb;
}

/* Trust Points */
.trust-points {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.tp-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tp-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

.tp-desc {
    font-size: 0.8rem;
    color: #888;
}

/* Designer Credit */
.designer-credit {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 24px;
    padding: 10px 0;
    border-radius: 24px;
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

.designer-credit-icon {
    flex-shrink: 0;
    color: #bbb;
}

.designer-credit-label {
    flex-shrink: 0;
    font-weight: 400;
    color: #aaa;
}

.designer-credit-name {
    font-weight: 700;
    color: #555;
}

.designer-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.designer-link:hover .designer-credit-name {
    color: #333;
    text-decoration: underline;
}

/* AI Usage Analysis Section */
.ai-usage-section .section-title {
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    padding-left: 4px;
}

.ai-sparkle {
    position: absolute;
    top: -10px;
    left: -2px;
    font-size: 0.7rem;
    color: #FF3232;
}

.ai-red {
    color: #FF3232;
    font-weight: 800;
}

.ai-usage-box {
    background: #faf5f0;
    border-radius: 16px;
    padding: 20px 25px;
    margin-top: 8px;
}

.ai-usage-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-usage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    padding: 5px 0;
}

.ai-usage-item+.ai-usage-item {
    border-top: none;
}

.ai-check {
    color: #FF3232;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: bold;
}

/* Mobile Sticky Bar */
.mobile-detail-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    align-items: center;
    gap: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #eee;
}

.m-sticky-info {
    flex: 1;
}

.m-sticky-title {
    font-size: 0.9rem;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-sticky-btn {
    background: #111;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Mobile Responsive - Detail Page */
@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .info-section {
        position: static;
    }
}

@media (max-width: 600px) {
    .detail-container {
        padding: 20px 16px;
        padding-bottom: 100px;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .action-group {
        display: none;
    }

    .mobile-detail-sticky {
        display: flex;
    }

    .sub-actions {
        flex-wrap: wrap;
    }
}

/* ============================================
   Wishlist & Share Styles
   ============================================ */

/* Wishlist Heart Button */
.wish-btn {
    transition: all 0.2s ease;
}

.wish-btn .wish-heart {
    font-size: 1.1em;
    transition: transform 0.3s ease;
    display: inline-block;
}

.wish-btn.active {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff5f5;
}

.wish-btn.active .wish-heart {
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Card Wishlist Overlay */
.card-wish-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ccc;
    z-index: 3;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.card-wish-btn:hover {
    transform: scale(1.1);
    background: #fff;
}

.card-wish-btn.active {
    color: #e74c3c;
    background: #fff;
}

/* Kakao Share Button */
.kakao-share-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sub Actions Layout */
.sub-actions {
    display: flex;
    gap: 8px;
}

.sub-actions .sub-btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 12px 8px;
    white-space: nowrap;
}

/* Toast Message */
.toast-message {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Empty Result State
   ============================================ */
.empty-result-wrap {
    column-span: all;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    animation: emptyFadeIn 0.5s ease;
}

.empty-result-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.35;
}

.empty-result-title {
    font-size: 18px;
    font-weight: 600;
    color: #444;
    margin: 0 0 12px;
}

.empty-result-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.7;
    margin: 0;
}

@keyframes emptyFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Reset Button */
.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.filter-reset-btn:hover {
    background: var(--surface-color);
    color: var(--text-main);
    border-color: #ccc;
}

.filter-reset-btn svg {
    width: 14px;
    height: 14px;
}