/* ==========================================================================
   P3 DIGITAL STORE & QR CATALOG - MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
    --primary: #d97706;
    --primary-hover: #b45309;
    --primary-light: rgba(217, 119, 6, 0.12);
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.25);
    
    /* Dark Theme (Default Luxury Aesthetic) */
    --bg-main: #0f1117;
    --bg-surface: #161922;
    --bg-surface-elevated: #1e222f;
    --bg-card: rgba(26, 30, 42, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(245, 158, 11, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --badge-popular: linear-gradient(135deg, #f59e0b, #ef4444);
    --badge-new: linear-gradient(135deg, #06b6d4, #3b82f6);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 25px var(--accent-glow);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-highlight: rgba(217, 119, 6, 0.45);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --success: #047857;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
    border: none;
    outline: none;
    background: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Store Profile Bar */
.store-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: var(--transition);
}

[data-theme="dark"] .store-header {
    background: rgba(22, 25, 34, 0.94);
}

[data-theme="light"] .store-header {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.store-logo-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.store-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-info h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

[data-theme="light"] .brand-info h1 {
    color: #0f172a;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.18rem 0.6rem;
    border-radius: var(--radius-full);
}

[data-theme="light"] .status-badge {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulseDot 2s infinite;
}

[data-theme="light"] .status-dot {
    background-color: #059669;
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.5);
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--border-highlight);
    transform: translateY(-1px);
}

[data-theme="light"] .btn-icon {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-icon:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-admin-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-admin-nav:hover {
    color: var(--accent);
    border-color: var(--border-highlight);
}

/* Announcement Banner */
.announcement-bar,
.announcement-banner {
    background: rgba(245, 158, 11, 0.1);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: #b45309;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

[data-theme="dark"] .announcement-bar,
[data-theme="dark"] .announcement-banner {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.18), rgba(245, 158, 11, 0.08));
    border-color: rgba(245, 158, 11, 0.25);
    color: #fde68a;
}

[data-theme="light"] .announcement-bar,
[data-theme="light"] .announcement-banner {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* Hero & Store Quick Actions */
.store-hero {
    padding: 1.5rem 0 1rem;
}

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.hero-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    max-width: 650px;
}

.quick-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition);
}

.contact-pill:hover {
    background: var(--primary-light);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Search and Filters Bar */
.filter-wrapper {
    position: sticky;
    top: 68px;
    z-index: 40;
    background: var(--bg-main);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    position: relative;
    margin-bottom: 0.75rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background: var(--bg-surface-elevated);
}

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

.search-clear {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    font-size: 0.85rem;
    padding: 0.2rem;
}

/* Category Pills (Horizontal Scroll) */
.category-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    white-space: nowrap;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.cat-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.cat-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* Product Catalog Grid */
.catalog-section {
    padding: 1.25rem 0 3.5rem;
    flex-grow: 1;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.catalog-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(8px);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-md);
}

.product-card.out-of-stock {
    opacity: 0.65;
}

.product-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 85%;
    background-color: var(--bg-surface-elevated);
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    color: #ffffff;
    background: var(--badge-popular);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.product-badge.badge-new {
    background: var(--badge-new);
}

.stock-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #ffffff;
    z-index: 2;
}

.stock-tag.out {
    background: rgba(239, 68, 68, 0.85);
}

.product-body {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.product-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc-snippet {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent);
}

.price-riel {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.75;
    margin-left: 0.25rem;
}

.btn-view-item {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--accent);
    transition: var(--transition);
}

.product-card:hover .btn-view-item {
    background: var(--accent);
    color: #ffffff;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 1rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.empty-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.empty-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   MODAL STYLES (Product Details, Admin Login, Edit Form)
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-md);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-backdrop.open .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent);
}

/* Product Detail Modal Content */
.modal-product-img-wrap {
    position: relative;
    width: 100%;
    height: 280px;
    background: var(--bg-surface-elevated);
}

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

.modal-product-body {
    padding: 1.5rem;
}

.modal-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.modal-product-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.modal-product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
}

.modal-product-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-product-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.order-action-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.btn-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: var(--transition);
}

.btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary-action:hover {
    border-color: var(--border-highlight);
    background: var(--primary-light);
}

/* ==========================================================================
   ADMIN DASHBOARD STYLES
   ========================================================================== */

.admin-view {
    display: none;
    padding: 1.5rem 0 4rem;
}

.admin-view.active {
    display: block;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-title-wrap h2 {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-title-wrap p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-nav-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-tab {
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
}

.admin-tab.active {
    background: var(--primary-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* Metrics / Stat Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.metric-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.metric-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.2rem;
}

.metric-sub {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.25rem;
}

/* Analytics Chart / Top Views */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.bar-label {
    width: 130px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.bar-track {
    flex-grow: 1;
    height: 10px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.bar-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 30px;
    text-align: right;
}

/* Product Management Table / Grid */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-product-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.admin-product-row:hover {
    border-color: var(--border-highlight);
}

.admin-prod-thumb {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
}

.admin-prod-info {
    flex-grow: 1;
    min-width: 0;
}

.admin-prod-name {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-prod-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.admin-prod-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.image-preview-box {
    width: 100%;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0.5rem;
    background: var(--bg-surface-elevated);
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* QR Code Studio */
.qr-studio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .qr-studio-grid {
        grid-template-columns: 320px 1fr;
    }
}

.qr-card-preview {
    background: #ffffff;
    color: #0f172a;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-card-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.qr-card-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.qr-code-target {
    padding: 0.85rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: inline-block;
    margin-bottom: 1rem;
}

.qr-card-footer {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.03em;
}

/* Footer */
.store-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 860px) {
    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr;
    }
}

/* Category Manager Items */
.cat-manager-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    gap: 0.75rem;
    transition: var(--transition);
}

.cat-manager-item:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-surface-elevated);
}

.cat-manager-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}

.cat-manager-count {
    font-size: 0.72rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    white-space: nowrap;
}

.cat-manager-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 600;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.success {
    border-left: 4px solid var(--success);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   FESTIVAL PROMO CARD (PCHUM BEN & MOON FESTIVAL)
   ========================================================================== */
.festival-promo-card {
    margin: 1.2rem 0;
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(234, 179, 8, 0.12);
    position: relative;
    overflow: hidden;
}

.festival-promo-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.25), transparent 70%);
    pointer-events: none;
}

.festival-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.festival-tag {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #d97706, #eab308);
    color: #000;
    letter-spacing: 0.02em;
}

.festival-subtag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.festival-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .festival-content-grid {
        grid-template-columns: 240px 1fr;
    }
}

.festival-poster-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(234, 179, 8, 0.4);
    transition: var(--transition);
    max-height: 340px;
    background: #000;
}

.festival-poster-wrap:hover {
    transform: scale(1.02);
    border-color: #facc15;
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.25);
}

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

.poster-tap-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: #fbbf24;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    padding: 0.35rem;
    backdrop-filter: blur(4px);
}

.festival-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, #ffffff, #fef08a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.festival-slogan {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.85rem;
    font-style: italic;
}

.festival-gifts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gift-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gift-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.festival-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.btn-join-member {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(56, 189, 248, 0.4);
    width: 100%;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-join-member:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    color: #ffffff;
}

.modal-promo-box {
    max-width: 500px;
    padding: 1rem;
    background: #0f172a;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.modal-promo-img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    display: block;
}

/* ==========================================================================
   PRINT STYLES FOR TABLE STANDEE / QR FLYER
   ========================================================================== */

@media print {
    body * {
        visibility: hidden;
    }
    
    #printableStandee, #printableStandee * {
        visibility: visible;
    }
    
    #printableStandee {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 2cm;
    }
    
    .print-hide {
        display: none !important;
    }
}
