/* ==========================================================================
   Main Styles (Public)
   ========================================================================== */

:root {
    /* Colors */
    --primary: #8b5cf6;
    --primary-rgb: 139, 92, 246;
    --secondary: #6366f1;
    --white: #ffffff;

    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-surface-alt-2: #e2e8f0;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-placeholder: #94a3b8;

    --border-color: #e2e8f0;
    --border-color-hover: #c4b5fd;
    --scroll-thumb: #cbd5e1;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-base: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 50%;

    /* Transitions */
    --transition-base: all 0.2s ease;
    --transition-card: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Base Styles (Shared) */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
}

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

.page-detail .accent-text {
    color: var(--primary);
}

.page-detail .back-btn {
    transition: var(--transition-base);
}

.page-detail .back-btn:hover {
    transform: translateX(-3px);
}

/* Photo Gallery */
.page-detail .photo-main-container {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.page-detail .photo-main-img {
    max-height: 500px;
    object-fit: contain;
}

.page-detail .photo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    opacity: 0;
    transition: var(--transition-base);
    z-index: 10;
}

.page-detail .photo-main-container:hover .photo-nav-btn {
    opacity: 1;
}

.page-detail .photo-nav-btn:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.page-detail .photo-nav-btn.prev {
    left: var(--spacing-md);
}

.page-detail .photo-nav-btn.next {
    right: var(--spacing-md);
}

.page-detail .photo-counter {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-base);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

/* Thumbnail Buttons */
.page-detail .thumb-btn {
    width: 72px;
    height: 72px;
    padding: 0;
    background: var(--bg-surface-alt);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.page-detail .thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-detail .thumb-btn:hover {
    border-color: var(--border-color-hover);
    transform: scale(1.05);
}

.page-detail .thumb-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.page-detail .thumbs-container {
    overflow-x: auto;
    scrollbar-width: thin;
}

.page-detail .thumbs-container::-webkit-scrollbar {
    height: 6px;
}

.page-detail .thumbs-container::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 3px;
}

/* Info Cards */
.page-detail .info-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.page-detail .info-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.page-detail .info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.page-detail .info-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.page-detail .info-value {
    font-size: 0.875rem;
    color: var(--text-main);
    text-align: right;
}

.page-detail .info-value.price {
    font-weight: 600;
    color: var(--primary);
}

/* Placeholder Box */
.page-detail .placeholder-box {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    background: var(--bg-surface-alt);
    border-radius: var(--radius-lg);
    color: var(--text-placeholder);
}

/* Utility Classes (Scoped to Detail) */
.page-detail .sticky-top-offset {
    top: var(--spacing-lg);
}

.page-detail .photo-container-height {
    min-height: 400px;
}

.page-detail .icon-size-lg {
    font-size: 4rem;
}

.page-detail .note-line-height {
    line-height: 1.8;
}

/* ==========================================================================
   Gallery Page Styles
   ========================================================================== */

.page-gallery .header-gradient {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-gallery .card {
    transition: var(--transition-card);
    border: 1px solid rgba(0,0,0,0.08);
}

.page-gallery .card-img-top {
    aspect-ratio: 1;
    object-fit: cover;
    background-color: var(--bg-surface-alt);
}

.page-gallery .card-placeholder {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--bg-surface-alt), var(--bg-surface-alt-2));
}

.page-gallery .watch-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 500;
}

.page-gallery .btn-view {
    transition: var(--transition-base);
}

.page-gallery .btn-view.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-color: transparent;
}

.page-gallery .table-hover tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.page-gallery .list-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.page-gallery .list-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-sm);
}

.page-gallery .page-link.active-page {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
}

/* Utility Classes (Scoped to Gallery) */
.page-gallery .per-page-select-width {
    width: auto;
}

.page-gallery .icon-size-md {
    font-size: 3rem;
}

.page-gallery .icon-size-xl {
    font-size: 5rem;
}

.page-gallery .list-photo-col {
    width: 60px;
}
