/* =========================================================
 * Global reset
 * ======================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Hide Alpine x-cloak until ready */
[x-cloak] {
    display: none !important;
}

/* =========================================================
 * Theme tokens – light blue sky
 * ======================================================= */
:root {
    --bg-body: #e0f2fe;
    /* sky-100 */
    --bg-shell: radial-gradient(circle at top, #bfdbfe 0, #e0f2fe 40%, #f9fafb 100%);

    /* QW-9: Unified glass-card design tokens */
    --glass-bg: rgba(255, 255, 255, 0.96);
    --glass-border: rgba(148, 163, 184, 0.35);
    --glass-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    --glass-blur: 18px;
    --glass-radius: 18px;

    --primary: #2563eb;
    /* blue-600 */
    --primary-hover: #1d4ed8;
    /* blue-700 */
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #22c55e;
    --warning: #f59e0b;

    --text-primary: #0f172a;
    /* slate-900 */
    --text-secondary: #475569;
    /* slate-600 */
    --text-muted: #94a3b8;
    /* slate-400 */

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition-fast: 140ms ease-out;
    --transition-med: 220ms ease-out;
    /* Typographic scale for admin/checkout */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.85rem;
    --font-size-md: 0.95rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.25rem;
}

.admin-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.admin-section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.admin-subtitle {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
}

.admin-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* =========================================================
 * Body + general layout
 * ======================================================= */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Inter", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-shell);
    min-height: 100vh;
}

/* Shared containers (landing / checkout / admin) */
.container,
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

/* App shell (admin + checkout) */
.app-shell {
    min-height: 100vh;
    background: var(--bg-shell);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* Fixed: ensures modal overlays position correctly */
}

.app-shell-inner {
    width: 100%;
    /* max-width: 1200px; 
    padding: 1.5rem 1rem 2.5rem; */
}

/* Checkout Page Container */
.checkout-page {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

/* Glass card */
/* QW-9: Unified glass-card with CSS custom properties for easy overriding */
.glass-card {
    background: var(--glass-bg);
    border-radius: var(--glass-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

/* Expired item styling (beige) */
.expired-item {
    background-color: #fef3c7 !important;
    /* Light beige (amber-100) */
    opacity: 0.8;
}

/* =========================================================
 * Typography
 * ======================================================= */
h1 {
    font-size: 1.9rem;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

p {
    margin-bottom: 0.5rem;
}

/* Branding */
.brand-header,
.login-header,
.header-brand,
.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.brand-header-text {
    display: flex;
    flex-direction: column;
}

.brand-subtitle,
.admin-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.brand-logo,
.login-logo {
    height: 40px;
    width: auto;
}

.header-logo,
.admin-logo {
    height: 32px;
    width: auto;
}

.admin-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---------------------------------------------------------
 * Success page (checkout success)
 * ------------------------------------------------------ */

.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: radial-gradient(circle at top, #bfdbfe 0, #e0f2fe 40%, #f9fafb 100%);
}

.success-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(22px);
    padding: 2.5rem 2.75rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.success-title {
    color: var(--success);
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}

.success-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 0.98rem;
}

.success-page .order-id {
    background: #f3f4f6;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.05rem;
    color: #111827;
    margin-bottom: 2rem;
    display: inline-block;
}

.success-page .success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.success-page .btn-home {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    padding: 0.9rem 2.1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.35);
    transition:
        transform var(--transition-med),
        box-shadow var(--transition-med);
}

.success-page .btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
    .success-icon {
        animation: success-bounce 0.9s ease-out;
    }
}

@keyframes success-bounce {

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

    50% {
        transform: scale(1.06);
    }
}

/* =========================================================
 * Buttons
 * ======================================================= */
button,
.btn {
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.6);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    background: #ffffff;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        opacity var(--transition-fast);
}

button:hover,
.btn:hover {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.15);
}

button:disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* Variants */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb7f);
    color: #eff6ff;
    font-weight: 600;
    border-color: rgba(37, 99, 235, 0.9);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed87f);
}

.btn-ghost {
    border-color: transparent;
    color: var(--text-secondary);
    box-shadow: none;
    background: transparent;
    text-decoration: none !important;
}

.btn-ghost:hover {
    background: rgba(191, 219, 254, 0.3);
    border-color: rgba(148, 163, 184, 0.4);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-danger {
    background: var(--danger);
    color: #fef2f2;
    border-color: rgba(248, 113, 113, 0.85);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
}

.icon-svg {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2;
    vertical-align: -0.15em;
}

/* Secondary button - softer appearance */
.secondary-button,
.btn-secondary {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f07f);
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.2);
    font-weight: 500;
}

.secondary-button:hover,
.btn-secondary:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e17f);
    border-color: rgba(100, 116, 139, 0.6);
    box-shadow: 0 6px 16px rgba(148, 163, 184, 0.3);
}

.full-width {
    width: 100%;
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* small pill badge */
.pill-badge {
    min-width: 1.3rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =========================================================
 * Inputs / forms
 * ======================================================= */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.95rem;
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Hide ugly number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input:focus,
select:focus,
textarea:focus,
.product-search-input:focus,
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
    background: #ffffff;
}

textarea.textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.checkbox-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Modern checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

/* Grid */
.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Messages */
.error-message,
.warning-message {
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.warning-message {
    background: #fef3c7;
    border: 1px solid #facc15;
    color: #92400e;
}

/* =========================================================
 * Admin panel layout
 * ======================================================= */
.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header */
.admin-header {
    width: 100%;
    padding: 1.15rem 1.75rem;
    margin: 1.5rem 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 10;
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.9) 50%, transparent 100%);
}

.admin-header-left {
    flex: 1;
}

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

.admin-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* small subtitle under hero-like header */
.admin-header h1 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.2;
}

.admin-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

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

/* Nav */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-nav::-webkit-scrollbar {
    display: none;
}

.admin-nav button {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.admin-nav button.active {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.75);
    color: var(--primary);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

/* Admin layout – sidebar + main (desktop) */
.admin-layout {
    width: 100%;
}

.admin-sidebar {
    margin-bottom: 1rem;
}

.admin-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Content */
.admin-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-content {
    padding: 1.2rem 1.4rem 1.3rem;
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(191, 219, 254, 0.9);
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.3);
}

.stat-card h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

/* Login screen */
.login-screen {
    max-width: 420px;
    margin: 3.5rem auto 0;
    padding: 1.75rem 1.5rem 1.5rem;
}

/* =========================================================
 * FB edited panel
 * ======================================================= */
.fb-edited-panel {
    padding: 0.9rem 1.2rem 1.1rem;
}

.fb-edited-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.fb-edited-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.fb-edited-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.fb-edited-item {
    padding: 0.6rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.7);
    background: #ffffff;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.fb-edited-item header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.fb-edited-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------------------------------------------------------
 * Admin tables
 * ------------------------------------------------------ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.admin-table th,
.admin-table td {
    padding: 0.4rem 0.5rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    word-break: break-word;
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------
 * Card headers (admin sections)
 * ------------------------------------------------------ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .admin-layout {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        column-gap: 1.75rem;
        align-items: flex-start;
    }

    .admin-sidebar {
        position: sticky;
        top: 1rem;
        align-self: flex-start;
    }
}

.fb-edited-message {
    margin-bottom: 0.25rem;
}

.fb-edited-previous {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* =========================================================
 * Tables
 * ======================================================= */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: #f9fafb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: auto;
}

.data-table th,
.data-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.data-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: #eff6ff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Cell actions - unified alignment */
.cell-actions {
    /* display: flex; */
    align-items: center;
    justify-content: center;
    /* Center horizontally */
    gap: 0.5rem;
    height: 100%;
    min-height: 2.5rem;
}

.cell-actions .btn-sm {
    white-space: nowrap;
    color: var(--text-secondary);
    /* Less colorful */
    opacity: 0.8;
}

.cell-actions .btn-sm:hover {
    opacity: 1;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.cell-actions .btn-danger {
    color: var(--danger);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.cell-actions .btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-hover);
}

/* Toolbar nad tabulkou (orders search) */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Search input (orders) */
.search-input {
    width: 100%;
    max-width: 320px;
    padding: 0.45rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.85rem;
    background: #ffffff;
    color: var(--text-primary);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

/* Pagination */
.pagination-controls {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.pagination-info {
    color: var(--text-secondary);
}

/* Empty state */
.empty-state {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Badges - moved to later section (v2.31.0 cleanup: avoid redundancy) */
/* .badge-success is defined later in the file with background styling */

.badge-danger {
    color: #b91c1c;
}

/* Warning banner */
.banner-warning {
    background: #fef3c7;
    border: 1px solid #facc15;
    border-radius: var(--radius-md);
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: #92400e;
    margin-bottom: 0.8rem;
}

/* Problem orders - moved to later section (v2.31.0 cleanup: avoid redundancy) */
/* .problem-order and .problem-badge are defined later with CSS variables */

.problem-order td {
    border-bottom-color: #fecaca;
}

/* =========================================================
 * Modals
 * ======================================================= */
.modal-overlay,
.modal-backdrop,
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Fixed: ensure modals appear above tables */
    padding: 1rem;
}

/* Delete media modal needs even higher z-index (v2.13.1) */
[x-show="showDeleteMediaModal"] .modal-overlay {
    z-index: 10001;
}

[x-show="showDeleteMediaModal"] .modal-content {
    z-index: 10002;
}

.modal-content {
    z-index: 50;
    /* Original z-index from .modal-overlay, .modal-backdrop */
    overflow-y: auto;
}

.modal.glass-modal {
    width: 100%;
    max-width: 80vw;
    background: #ffffff;
    border-radius: calc(var(--radius-lg) + 2px);
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    padding: 1.3rem 1.4rem 1.1rem;
    color: var(--text-primary);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-wide {
    max-width: 80vw;
}

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

.close-btn {
    background: transparent;
    border-color: transparent;
    font-size: 1.3rem;
    padding: 0.15rem 0.5rem;
}

.modal-body {
    margin-top: 0.4rem;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
    /* leaves room for header/footer */
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.modal-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Order detail layout */
.order-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-group {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.info-group h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding-bottom: 0.4rem;
}

.info-group p {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .order-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Modal actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

/* =========================================================
 * Upload zones / product media
 * ======================================================= */
.media-upload-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.upload-zone {
    border-radius: var(--radius-md);
    border: 1px dashed rgba(148, 163, 184, 0.9);
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    transition:
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #eff6ff;
    transform: translateY(-0.5px);
}

.upload-zone.drag-over {
    border-color: var(--primary);
    background: #dbeafe;
}

.upload-label {
    cursor: pointer;
    font-size: 0.8rem;
}

.upload-progress {
    color: #1d4ed8;
    font-size: 0.75rem;
    font-style: italic;
}

.upload-error {
    color: #b91c1c;
    font-size: 0.75rem;
}

/* Thumbnails */
.product-thumbnail-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.product-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.3);
}

.no-thumbnail {
    font-size: 1.8rem;
    opacity: 0.5;
}

.media-count-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Media upload section (below table) */
.media-upload-section {
    padding: 1rem 1.2rem;
    background: #f9fafb;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(148, 163, 184, 0.6);
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.upload-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(191, 219, 254, 0.9);
    overflow: hidden;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.upload-card:hover {
    border-color: var(--primary);
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.upload-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem 1rem;
    cursor: pointer;
    min-height: 140px;
}

.upload-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
}

.upload-text strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.upload-text small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.media-count {
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Problem order styling */
.problem-order {
    background: rgba(251, 191, 36, 0.08);
}

.problem-order td {
    color: var(--text-primary);
}

.problem-badge {
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    background: rgba(251, 191, 36, 0.12);
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
}

/* Inactive product row styling */
.inactive-row {
    opacity: 0.5;
    background: rgba(148, 163, 184, 0.08);
}

.inactive-row td {
    color: var(--text-muted);
}

.upload-progress-bar {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: #1d4ed8;
    text-align: center;
}

.upload-error-msg {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: #b91c1c;
    text-align: center;
}

/* Media gallery modal */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.media-gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.6);
    transition:
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.media-gallery-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.media-primary {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.gallery-image,
.gallery-video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Media gallery items - polished layout with consistent aspect ratio */
.media-item-container {
    position: relative !important;
    display: block;
    aspect-ratio: 1 / 1;
    /* Consistent square aspect for all media */
    background: #f1f5f9;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
    /* Default for images */
    transition: all var(--transition-med);
    border: 2px solid rgba(148, 163, 184, 0.2);
    isolation: isolate;
}

/* Video containers get normal cursor (have controls) */
.media-item-container:has(video) {
    cursor: default;
}

.media-item-container:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 20;
}

.media-overlay:hover {
    opacity: 1 !important;
}

/* Media delete overlay (v2.13.0) */
.media-delete-overlay {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 25;
}

.media-item-container:hover .media-delete-overlay {
    opacity: 1;
}

/* Sort indicators (v2.13.0) */
.data-table th[style*="cursor: pointer"] {
    position: relative;
    user-select: none;
    transition: background-color 0.2s ease;
}

.data-table th[style*="cursor: pointer"]:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.data-table th span[x-show] {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Hover effect for filterable buttons (active/inactive/all) */
.filter-buttons button {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Filter buttons hover (v2.13.1) */
.filter-buttons button:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Drag & Drop for variant management (v2.13.1) */
.data-table tr[draggable="true"] {
    transition: opacity 0.2s, background-color 0.2s;
}

.data-table tr[draggable="true"]:hover {
    background: rgba(99, 102, 241, 0.05);
}

.data-table tr.drag-over {
    background: rgba(99, 102, 241, 0.15);
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.drop-zone-standalone {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    padding: 1.5rem 1rem;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    border-right: 3px dashed var(--primary-color);
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 100;
}

.drop-zone-standalone.active {
    opacity: 1;
    pointer-events: all;
}

.gallery-item-actions {
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.gallery-item-actions .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

/* Old upload zones - thumbs */
.product-detail-media {
    margin-top: 0.25rem;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.thumb-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.thumb-small {
    display: block;
    width: 100%;
    height: 70px;
    object-fit: cover;
}

.thumb-primary {
    border-color: var(--primary);
}

.thumb-primary-btn {
    border: none;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
    color: #e5e7eb;
    font-size: 0.7rem;
    padding: 0.25rem 0.3rem;
    text-align: left;
}

/* =========================================================
 * Settings
 * ======================================================= */
.settings-tab {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* .settings-card moved to later section (v2.31.0 cleanup: avoid redundancy) */

.settings-card h3 {
    margin-bottom: 0.5rem;
}

.settings-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-message {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #16a34a;
}

.settings-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* =========================================================
 * Toast notifications
 * ======================================================= */
.toast-stack {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.6rem;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 4px solid var(--text-muted);
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    font-size: 0.9rem;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* Alpine transition base styles */
    transition: all 0.3s ease-out;
    transform-origin: bottom right;
}

/* Alpine.js transition states */
.toast-enter-start,
.toast-leave-end {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
}

.toast-enter-end,
.toast-leave-start {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-success {
    border-left-color: #16a34a;
    color: #14532d;
}

.toast-error {
    border-left-color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.toast-warning {
    border-left-color: #ca8a04;
    background: #fffbeb;
    border-color: #fde68a;
    color: #854d0e;
}

.toast-info {
    border-left-color: #2563eb;
}

/* =========================================================
 * Checkout styling – světlejší, kompatibilní
 * ======================================================= */

/* Cart section */
.cart-section {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.customer-section,
.pickup-section {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Cart items */
.cart-item {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    /* Center vertically with thumbnail */
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.9);
    margin-bottom: 0.5rem;
}

.product-media {
    flex-shrink: 0;
}

.cart-item .product-thumbnail {
    width: 80px;
    height: 80px;
}

/* Item details - allow text to shrink */
.item-details {
    flex: 1;
    min-width: 0;
    /* Allow truncation */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-details .item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.item-controls {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
    /* Don't shrink controls */
}

.item-controls button {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #f9fafb;
    font-size: 0.8rem;
}

.item-total {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.item-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.remove-btn {
    color: #b91c1c;
    font-weight: 600;
}

/* Cart summary */
.cart-summary {
    margin-top: 1rem;
    padding: 0.85rem 0.9rem;
    background: #f9fafb;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}

.summary-line.total {
    font-weight: 600;
    font-size: 1rem;
    border-top: 2px solid rgba(148, 163, 184, 0.8);
    margin-top: 0.5rem;
    padding-top: 0.6rem;
}

/* Pay button */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cookie banner */
.cookie-banner {
    margin: 0 0 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.cookie-banner p {
    margin: 0;
    flex: 1 1 auto;
}

.cookie-button {
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    border: none;
    background: #2563eb;
    color: #eff6ff;
    cursor: pointer;
    font-size: 0.8rem;
}

.cookie-button:hover {
    background: #1d4ed8;
}

.cookie-link {
    font-size: 0.8rem;
    text-decoration: underline;
    color: var(--text-secondary);
}

/* Legal footer */
.checkout-footer-legal {
    margin-top: 1.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.checkout-footer-legal .legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkout-footer-legal .legal-links a {
    color: var(--primary);
    text-decoration: underline;
}

.checkout-footer-legal .legal-links a:hover {
    color: #1d4ed8;
}

/* Wishlist button */
.wishlist-btn {
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.wishlist-btn:hover {
    background: #eff6ff;
    color: var(--text-primary);
}

/* Product grid (landing / upsell) */
.product-grid-section {
    margin-top: 2rem;
}

.product-grid-controls {
    margin-bottom: 0.75rem;
}

.product-search-input {
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.2rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-primary);
}

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

.product-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(191, 219, 254, 0.9);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(148, 163, 184, 0.25);
}

.product-card-media {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f9fafb;
}

.product-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-title {
    font-size: 0.95rem;
    margin: 0;
}

.product-card-price {
    font-weight: 600;
    margin: 0.25rem 0;
}

.product-card-vat {
    margin: 0 0 0.35rem 0;
    color: #4b5563;
    font-size: 0.8rem;
}

.product-card-stock {
    font-size: 0.8rem;
    color: #16a34a;
}

.product-card-stock.stock-out {
    color: #b91c1c;
}

.product-card-btn {
    margin-top: 0.15rem;
    width: 100%;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #1d4ed8;
    border-radius: var(--radius-md);
    padding: 0.6rem 0.75rem;
    cursor: pointer;
}

.product-card-btn:hover {
    background: rgba(59, 130, 246, 0.14);
}

/* =========================================================
 * Responsive tweaks
 * ======================================================= */
@media (max-width: 768px) {
    .app-shell {
        /*padding: 1rem 0.75rem 2rem;*/
    }

    .app-shell-inner {
        /*padding: 1.25rem 0.85rem 2rem;*/
    }

    .checkout-page,
    .login-screen {
        padding: 1.25rem 1.1rem;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-inline: 1.25rem;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .toast-stack {
        right: 0.75rem;
        left: 0.75rem;
        align-items: stretch;
    }
}

/* Mobile cart layout - under 520px */
@media (max-width: 520px) {
    .cart-item {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    /* Row 1: Thumbnail | Details (název/dostupnost/cena stacked) */
    .cart-item .product-media {
        flex: 0 0 auto;
    }

    .cart-item .item-details {
        flex: 1;
        /* Details stay stacked vertically next to thumbnail */
    }

    /* Row 2: Controls | Total price (forces wrap to new line) */
    .cart-item .item-controls {
        flex: 1 0 100%;
        /* Force to new line */
        max-width: fit-content;
    }

    .cart-item .item-total {
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* Product grid single column */
    .product-grid {
        grid-template-columns: 1fr !important;
    }
}

/* VAT summary styling */
.summary-vat {
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: right;
    margin-top: -0.25rem;
    margin-bottom: 0.5rem;
}

/* .text-muted moved to later section (v2.31.0 cleanup: avoid redundancy) */

.text-success {
    color: #22c55e;
}

.summary-total {
    border-top: 2px solid #2563eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

/* =========================================================
 * Product Modal & Lightbox (Checkout)
 * ======================================================= */
.lightbox-container {
    margin-bottom: 1.5rem;
}

.lightbox-main {
    position: relative;
    width: 100%;
    max-height: 500px;
    background: #f1f5f9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    color: white;
    border: none;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.lightbox-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.lightbox-thumb:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.lightbox-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.product-modal-info {
    margin-top: 1rem;
}

.product-modal-price {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.product-modal-stock {
    font-size: 0.9rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.product-modal-stock.stock-out {
    color: var(--danger);
}

.product-modal-description {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-modal-actions .btn-primary,
.product-modal-actions .btn-secondary {
    width: 100%;
    justify-content: center;
}

.modal-close {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 50%;
    width: 44px;
    /* QW-5: WCAG 2.1 Level AA minimum (was 36px) */
    height: 44px;
    /* QW-5: WCAG 2.1 Level AA minimum (was 36px) */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all var(--transition-fast);
    /* QW-5: Better visibility and touch feedback */
    backdrop-filter: blur(8px);
    touch-action: manipulation;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* ============================================================================
   Variant Selector (v2.12.0)
   ============================================================================ */

.variant-selector {
    margin: 1.5rem 0;
}

.variant-selector label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.variant-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.variant-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: var(--radius-md);
    background: white;
    color: #1f2937 !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.variant-btn:hover:not(:disabled):not(.variant-btn-out-of-stock) {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Active/Selected variant - distinct blue */
.variant-btn-active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    /* color: white; */
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 1);
}

/* Out of stock - muted red background, no line-through on text */
.variant-btn-out-of-stock {
    background: #fee;
    border-color: #fcc;
    color: #c66;
    opacity: 0.8;
    cursor: not-allowed;
}

.variant-btn-out-of-stock:hover {
    background: #fdd;
    border-color: #fbb;
    transform: none;
    box-shadow: none;
}

/* Out of stock AND active - red with stronger border */
.variant-btn-out-of-stock.variant-btn-active {
    background: #fcc;
    border-color: #f99;
    color: #a44;
    font-weight: 600;
}

@media (min-width: 768px) {
    .product-modal-actions {
        flex-direction: row;
    }

    .product-modal-actions .btn-primary,
    .product-modal-actions .btn-secondary {
        width: auto;
        flex: 1;
    }
}

/* Wishlist warning text (v2.13.2) */
.wishlist-warning {
    display: block;
    color: #ef4444;
    text-align: center !important;
    width: 100%;
    margin-top: 0.5rem;
}

/* Customer section inputs spacing (v2.15.1) */
.customer-section input {
    margin-bottom: 0.75rem;
}

.customer-section input:last-of-type {
    margin-bottom: 0;
}

/* Wishlist email input (v2.15.1) */
.wishlist-email-input {
    text-align: center;
    width: 100%;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.wishlist-email-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* Drag and Drop for variant management (v2.13.2) */
.drag-handle {
    cursor: grab;
    transition: opacity 0.2s;
}

.drag-handle:active {
    cursor: grabbing;
}

.drop-zone-left {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    padding: 1rem 0.5rem;
    background: #fef3c7;
    border: 2px dashed #f59e0b;
    border-left: none;
    border-radius: 0 8px 8px 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 100;
}

.drop-zone-left.active {
    opacity: 1;
    pointer-events: all;
}

.drop-zone-left:hover {
    background: #fde68a;
    border-color: #d97706;
}

.drop-zone-standalone {
    padding: 1rem;
    margin: 0.5rem 0;
    background: #f3f4f6;
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.drop-zone-standalone.active {
    opacity: 1;
    pointer-events: all;
}

.drop-zone-standalone:hover {
    background: #e5e7eb;
    border-color: #6b7280;
    color: #374151;
}

/* Dragging row styling */
tr.dragging {
    opacity: 0.5;
}

.drag-over {
    background: #dbeafe !important;
    border: 2px solid #3b82f6 !important;
}

/* ============================================================================
   Unified Settings Modal (v2.15.1)
   ============================================================================ */

.settings-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.settings-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Override/Enhance existing glass-modal for settings */
.modal.glass-modal {
    background: rgba(255, 255, 255, 0.98);
    /* Slightly more opaque for readability */
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-group {
    background: #f9fafb;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #f3f4f6;
}

.settings-group h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

/* v2.20.1: Compact config modal styles */
.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.form-group.compact {
    margin-bottom: 0;
}

.form-group.compact label {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.fee-display {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.2rem 0;
}

.config-modal .settings-section {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.config-modal .settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.config-modal .settings-section-title {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.config-modal .settings-group {
    margin-bottom: 0.5rem;
}

.config-modal .settings-group h4 {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.config-modal .form-group {
    margin-bottom: 0.4rem;
}

.config-modal .form-group label {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.config-modal .form-group input,
.config-modal .form-group select,
.config-modal .form-group textarea {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
}

.config-modal .form-hint {
    font-size: 0.65rem;
    margin-top: 0.15rem;
}

.config-modal .checkbox-label {
    font-size: 0.8rem;
}

.config-modal .checkbox-label input {
    width: 14px;
    height: 14px;
}

@media (max-width: 900px) {
    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    cursor: pointer;
}

@media (max-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Platform Config (v2.11.0 - read-only section)
   ============================================================================ */

.platform-readonly {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.platform-readonly input[disabled],
.platform-readonly select[disabled] {
    background-color: #e2e8f0 !important;
    cursor: not-allowed;
    opacity: 0.9;
    color: #475569;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.platform-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-muted {
    background-color: #f1f5f9 !important;
}

/* ============================================================================
   v2.20.0: Payment Method Selector
   ============================================================================ */

.payment-method-section {
    padding: 1.25rem 1.5rem;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(148, 163, 184, 0.4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: #ffffff;
}

.payment-option:hover {
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(59, 130, 246, 0.03);
}

.payment-option-active {
    border-color: var(--primary) !important;
    background: rgba(59, 130, 246, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.payment-option-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    accent-color: var(--primary);
}

.payment-option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.payment-info strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.payment-info small {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* QR Payment Display */
.qr-payment-section {
    animation: fadeIn 0.3s ease-out;
}

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

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

.qr-payment-details p {
    margin-bottom: 0.5rem;
}

.qr-payment-details p:last-child {
    margin-bottom: 0;
}

#qr-code-container img,
#qr-code-container canvas {
    max-width: 200px;
    height: auto;
}

/* ============================================================================
   v2.20.0: Fee Status Banners
   ============================================================================ */

.fee-banner-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #92400e;
}

.fee-banner-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #b91c1c;
}

/* ============================================================================
   v2.23.7: Tracking Number Styles
   ============================================================================ */

.tracking-link {
    color: var(--color-primary, #3b82f6);
    text-decoration: none;
    font-family: monospace;
}

.tracking-link:hover {
    text-decoration: underline;
}

.tracking-link-bold {
    font-weight: bold;
}

.text-muted {
    color: #9ca3af;
}

/* Manual tracking form container */
.manual-tracking-form {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md, 0.5rem);
    border: 1px dashed rgba(148, 163, 184, 0.4);
}

/* Warning text for missing tracking */
.tracking-warning {
    color: #e67e22;
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

/* Flex row for tracking input + button */
.tracking-form-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tracking-form-row input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    min-width: 0;
    /* Prevent overflow in flex */
}