/* =====================================================================
   merch.css
   Merchandise Module — Modern SaaS UI (Light Mode Only)
   Inspired by Stripe / Linear / Notion / Shopify / Vercel
   --------------------------------------------------------------------
   IMPORTANT: All merchandise styling lives in this file only.
   Do NOT add merch rules to any existing css file.
   ===================================================================== */

:root,
.merch-root {
    --merch-primary:        #3b82f6;
    --merch-primary-hover:  #2563eb;
    --merch-primary-soft:   rgba(59, 130, 246, 0.08);
    --merch-primary-ring:   rgba(59, 130, 246, 0.18);

    --merch-bg:             #ffffff;
    --merch-surface:        #f8fafc;
    --merch-surface-2:      #f1f5f9;
    --merch-border:         #e5e7eb;
    --merch-border-strong:  #d1d5db;

    --merch-text:           #111827;
    --merch-text-muted:     #6b7280;
    --merch-text-subtle:    #9ca3af;

    --merch-success:        #10b981;
    --merch-success-soft:   #ecfdf5;
    --merch-warning:        #f59e0b;
    --merch-warning-soft:   #fffbeb;
    --merch-danger:         #ef4444;
    --merch-danger-soft:    #fef2f2;

    --merch-shadow-xs:      0 1px 2px rgba(17, 24, 39, 0.04);
    --merch-shadow-sm:      0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
    --merch-shadow-md:      0 6px 18px rgba(17, 24, 39, 0.08), 0 2px 4px rgba(17, 24, 39, 0.04);
    --merch-shadow-lg:      0 16px 40px rgba(17, 24, 39, 0.10), 0 4px 8px rgba(17, 24, 39, 0.06);

    --merch-radius-sm:      8px;
    --merch-radius:         12px;
    --merch-radius-lg:      16px;
    --merch-radius-xl:      20px;

    --merch-space-1:        4px;
    --merch-space-2:        8px;
    --merch-space-3:        12px;
    --merch-space-4:        16px;
    --merch-space-5:        20px;
    --merch-space-6:        24px;
    --merch-space-8:        32px;
    --merch-space-10:       40px;
    --merch-space-12:       48px;

    --merch-font:           "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --merch-font-display:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --merch-transition:     180ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* =====================================================================
   LAYOUT SHELL
   ===================================================================== */
.merch-page {
    background: var(--merch-bg);
    color: var(--merch-text);
    font-family: var(--merch-font);
    min-height: calc(100vh - 80px);
    overflow-x: hidden;
    padding: var(--merch-space-8) 0 var(--merch-space-12);
}

.merch-page,
.merch-page *,
.merch-page *::before,
.merch-page *::after {
    box-sizing: border-box;
}

.merch-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--merch-space-6);
}

@media (max-width: 720px) {
    .merch-container { padding: 0 var(--merch-space-4); }
    .merch-page { padding: var(--merch-space-5) 0 var(--merch-space-10); }
}

/* =====================================================================
   HEADERS
   ===================================================================== */
.merch-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--merch-space-6);
    margin-bottom: var(--merch-space-8);
    flex-wrap: wrap;
}

.merch-page-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--merch-text);
    margin: 0 0 var(--merch-space-2);
    line-height: 1.15;
}

.merch-page-subtitle {
    color: var(--merch-text-muted);
    font-size: 15px;
    margin: 0;
}

.merch-page-actions {
    display: flex;
    gap: var(--merch-space-3);
    align-items: center;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.merch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--merch-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--merch-radius);
    border: 1px solid transparent;
    background: var(--merch-surface-2);
    color: var(--merch-text);
    cursor: pointer;
    transition: background var(--merch-transition),
                color var(--merch-transition),
                border-color var(--merch-transition),
                box-shadow var(--merch-transition),
                transform var(--merch-transition);
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
}
.merch-btn:hover {
    background: var(--merch-border);
    transform: translateY(-1px);
    box-shadow: var(--merch-shadow-sm);
}
.merch-btn:active { transform: translateY(0); }

.merch-btn-primary {
    background: var(--merch-primary);
    color: #fff;
    border-color: var(--merch-primary);
    box-shadow: var(--merch-shadow-sm);
}
.merch-btn-primary:hover {
    background: var(--merch-primary-hover);
    border-color: var(--merch-primary-hover);
    box-shadow: var(--merch-shadow-md);
}

.merch-btn-outline {
    background: transparent;
    border-color: var(--merch-border-strong);
    color: var(--merch-text);
}
.merch-btn-outline:hover {
    background: var(--merch-surface);
    border-color: var(--merch-text-muted);
}

.merch-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--merch-text-muted);
}
.merch-btn-ghost:hover {
    background: var(--merch-surface);
    color: var(--merch-text);
}

.merch-btn-danger {
    background: transparent;
    border-color: transparent;
    color: var(--merch-danger);
}
.merch-btn-danger:hover { background: var(--merch-danger-soft); }

.merch-btn-sm  { padding: 7px 12px; font-size: 13px; border-radius: var(--merch-radius-sm); }
.merch-btn-lg  { padding: 14px 22px; font-size: 15px; }
.merch-btn-block { width: 100%; }

.merch-btn[disabled],
.merch-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* =====================================================================
   FORM CONTROLS
   ===================================================================== */
.merch-input,
.merch-select,
.merch-textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--merch-font);
    font-size: 14px;
    color: var(--merch-text);
    background: var(--merch-bg);
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius);
    transition: border-color var(--merch-transition), box-shadow var(--merch-transition);
    line-height: 1.4;
}
.merch-input:hover,
.merch-select:hover,
.merch-textarea:hover { border-color: var(--merch-border-strong); }
.merch-input:focus,
.merch-select:focus,
.merch-textarea:focus {
    outline: none;
    border-color: var(--merch-primary);
    box-shadow: 0 0 0 4px var(--merch-primary-ring);
}
.merch-select option {
    color: #111827;
    background: #ffffff;
}
.merch-textarea { resize: vertical; min-height: 96px; }

.merch-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--merch-text);
    margin-bottom: var(--merch-space-2);
}
.merch-hint {
    color: var(--merch-text-muted);
    font-size: 12px;
    margin-top: 6px;
}
.merch-error-text {
    color: var(--merch-danger);
    font-size: 12px;
    margin-top: 6px;
}

.merch-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--merch-space-5);
}
.merch-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .merch-form-grid { grid-template-columns: 1fr; } }

.merch-category-actions {
    display: flex;
    gap: var(--merch-space-3);
    flex-wrap: wrap;
}

.merch-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.merch-size-option {
    align-items: center;
    background: var(--merch-surface);
    border: 1px solid var(--merch-border);
    border-radius: 999px;
    color: var(--merch-text-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    transition: background var(--merch-transition), border-color var(--merch-transition), color var(--merch-transition);
}

.merch-size-option input {
    accent-color: var(--merch-primary);
    margin: 0;
}

.merch-size-option.active {
    background: var(--merch-primary-soft);
    border-color: var(--merch-primary);
    box-shadow: none;
    color: var(--merch-primary);
}

.merch-size-option.active input {
    accent-color: var(--merch-primary);
}

.merch-size-option.merch-size-option-soldout {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.46);
    color: #dc2626;
}

.merch-size-option.merch-size-option-soldout:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.62);
}

.merch-size-display {
    cursor: default;
}

.merch-size-display input {
    display: none;
}

/* =====================================================================
   TOOLBAR (search + filters + sort)
   ===================================================================== */
.merch-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--merch-space-3);
    align-items: center;
    background: var(--merch-surface);
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    padding: var(--merch-space-4);
    margin-bottom: var(--merch-space-6);
}
.merch-toolbar .merch-search {
    position: relative;
}
.merch-toolbar .merch-search svg {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--merch-text-subtle);
}
.merch-toolbar .merch-search .merch-input {
    padding-left: 38px;
    background: var(--merch-bg);
}

@media (max-width: 720px) {
    .merch-toolbar { grid-template-columns: 1fr; }
}

/* =====================================================================
   PRODUCT GRID + CARD
   ===================================================================== */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--merch-space-5);
}
@media (max-width: 1100px) { .merch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 880px)  { .merch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .merch-grid { grid-template-columns: 1fr; } }

.merch-card {
    background: var(--merch-bg);
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--merch-transition),
                box-shadow var(--merch-transition),
                border-color var(--merch-transition);
}
.merch-card:hover {
    border-color: var(--merch-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--merch-shadow-md);
}

.merch-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--merch-surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.merch-card-image img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.merch-card-image .merch-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--merch-text-subtle);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.merch-card-body {
    padding: var(--merch-space-4) var(--merch-space-4) var(--merch-space-5);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.merch-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--merch-text);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merch-card-desc {
    font-size: 13px;
    color: var(--merch-text-muted);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merch-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--merch-space-3);
    gap: var(--merch-space-3);
}

.merch-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--merch-text);
    letter-spacing: -0.01em;
}

.merch-stock {
    font-size: 12px;
    color: var(--merch-text-muted);
}
.merch-stock.low { color: var(--merch-warning); font-weight: 600; }
.merch-stock.out { color: var(--merch-danger); font-weight: 600; }

.merch-card-actions {
    padding: 0 var(--merch-space-4) var(--merch-space-4);
}

/* =====================================================================
   BADGES
   ===================================================================== */
.merch-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    background: var(--merch-surface-2);
    color: var(--merch-text-muted);
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}
.merch-badge-primary { background: var(--merch-primary-soft); color: var(--merch-primary); }
.merch-badge-success { background: var(--merch-success-soft); color: var(--merch-success); }
.merch-badge-warning { background: var(--merch-warning-soft); color: var(--merch-warning); }
.merch-badge-danger  { background: var(--merch-danger-soft);  color: var(--merch-danger); }

.merch-card-badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; gap: 6px;
}

/* =====================================================================
   DETAIL PAGE
   ===================================================================== */
.merch-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--merch-space-10);
    margin-bottom: var(--merch-space-12);
}
@media (max-width: 900px) {
    .merch-detail { grid-template-columns: 1fr; gap: var(--merch-space-6); }
}

.merch-gallery {
    display: flex; flex-direction: column;
    gap: var(--merch-space-3);
}
.merch-gallery-main {
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    background: var(--merch-surface);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.merch-gallery-main img {
    width: 100%; height: 100%; object-fit: contain; object-position: center; display: block;
}
.merch-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}
.merch-gallery-thumb {
    border: 2px solid transparent;
    border-radius: var(--merch-radius);
    background: var(--merch-surface);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--merch-transition);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.merch-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.merch-gallery-thumb:hover { border-color: var(--merch-border-strong); }
.merch-gallery-thumb.active { border-color: var(--merch-primary); }

.merch-detail-info { display: flex; flex-direction: column; gap: var(--merch-space-4); }
.merch-detail-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--merch-text);
    margin: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.merch-detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--merch-text);
    letter-spacing: -0.01em;
}
.merch-detail-desc {
    color: var(--merch-text);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.merch-detail-meta {
    display: flex; flex-wrap: wrap; gap: var(--merch-space-2);
}

.merch-detail-purchase-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    width: 100%;
}

.merch-detail-purchase-row .merch-btn {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.merch-ticket-link-panel {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--merch-radius-lg);
    background: rgba(255,255,255,0.03);
    padding: var(--merch-space-4);
}

.merch-ticket-event {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--merch-radius);
    background: rgba(255,255,255,0.04);
}

.merch-ticket-event__label {
    color: var(--merch-text-subtle);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.merch-ticket-event__name {
    color: var(--merch-text);
    font-size: 18px;
    font-weight: 700;
    margin-top: 6px;
}

.merch-ticket-event__date {
    color: var(--merch-text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.merch-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.merch-ticket-choice {
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--merch-radius);
    color: inherit;
    cursor: pointer;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 16px;
    text-align: left;
    transition: border-color var(--merch-transition), background var(--merch-transition), box-shadow var(--merch-transition);
    width: 100%;
}

.merch-ticket-choice:hover {
    border-color: rgba(28, 137, 240, 0.34);
    background: rgba(28, 137, 240, 0.08);
}

.merch-ticket-choice.active {
    border-color: rgba(28, 137, 240, 0.55);
    background: rgba(28, 137, 240, 0.14);
    box-shadow: 0 0 0 1px rgba(28, 137, 240, 0.24);
}

.merch-ticket-choice__main {
    min-width: 0;
}

.merch-ticket-choice__name {
    color: var(--merch-text);
    font-size: 15px;
    font-weight: 700;
}

.merch-ticket-choice__desc {
    color: var(--merch-text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.merch-ticket-choice__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.merch-ticket-choice__price {
    color: var(--merch-text);
    font-size: 18px;
    font-weight: 700;
}

.merch-ticket-choice__stock {
    color: #8ec7ff;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 560px) {
    .merch-ticket-choice {
        align-items: flex-start;
        flex-direction: column;
    }

    .merch-ticket-choice__meta {
        align-items: flex-start;
    }
}

/* =====================================================================
   QUANTITY STEPPER
   ===================================================================== */
.merch-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius);
    background: var(--merch-bg);
    overflow: hidden;
    height: 40px;
    max-width: 100%;
}
.merch-qty button {
    width: 40px; height: 100%;
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--merch-text);
    cursor: pointer;
    transition: background var(--merch-transition);
}
.merch-qty button:hover { background: var(--merch-surface); }
.merch-qty button:disabled { color: var(--merch-text-subtle); cursor: not-allowed; }
.merch-qty input {
    width: 48px;
    min-width: 0;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: 600;
    color: var(--merch-text);
    background: transparent;
    -moz-appearance: textfield;
}
.merch-qty input::-webkit-outer-spin-button,
.merch-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* =====================================================================
   ADD-ON ROW (used in ticket purchase flow)
   ===================================================================== */
.merch-addon-list { display: flex; flex-direction: column; gap: var(--merch-space-3); }

.merch-addon {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: var(--merch-space-4);
    align-items: center;
    padding: var(--merch-space-4);
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    background: var(--merch-bg);
    transition: border-color var(--merch-transition),
                box-shadow var(--merch-transition);
}
.merch-addon:hover {
    border-color: var(--merch-border-strong);
    box-shadow: var(--merch-shadow-sm);
}
.merch-addon-thumb {
    aspect-ratio: 1 / 1;
    border-radius: var(--merch-radius);
    background: var(--merch-surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.merch-addon-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.merch-addon-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.merch-addon-name { font-weight: 600; color: var(--merch-text); margin: 0; font-size: 15px; }
.merch-addon-desc {
    color: var(--merch-text-muted);
    font-size: 13px; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.merch-addon-meta {
    display: flex; align-items: center; gap: var(--merch-space-3); margin-top: 4px;
    color: var(--merch-text-muted);
    font-size: 12.5px;
}
.merch-addon-right {
    display: flex; flex-direction: column; align-items: flex-end; gap: var(--merch-space-2);
}
.merch-addon-price { font-weight: 700; color: var(--merch-text); font-size: 16px; }

.merch-package-addons-panel {
    gap: 16px;
}

.merch-package-addons-copy {
    color: var(--merch-text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 0;
}

.merch-package-addon {
    align-items: flex-start;
}

.merch-package-addon.active {
    background: linear-gradient(180deg, rgba(28, 137, 240, 0.18) 0%, rgba(28, 137, 240, 0.10) 100%);
    border-color: rgba(56, 149, 241, 0.65);
    box-shadow: 0 0 0 1px rgba(56, 149, 241, 0.22);
}

.merch-package-addon.disabled {
    opacity: 0.72;
}

.merch-package-addon-right {
    min-width: 148px;
}

.merch-package-addon-toggle {
    width: 100%;
    justify-content: center;
}

.merch-package-addon.active .merch-package-addon-toggle {
    background: rgba(56, 149, 241, 0.18);
    border-color: rgba(56, 149, 241, 0.55);
    color: #dbeafe;
}

.merch-package-addon.active .merch-package-addon-toggle:hover {
    background: rgba(56, 149, 241, 0.26);
    border-color: rgba(96, 165, 250, 0.8);
    color: #eff6ff;
}

.merch-package-addon.active .merch-addon-price,
.merch-package-addon.active .merch-addon-name {
    color: #f8fbff;
}

.merch-package-addon.active .merch-addon-desc,
.merch-package-addon.active .merch-addon-meta,
.merch-package-addon.active .merch-package-addon-help,
.merch-package-addon.active .merch-label {
    color: #d7e9ff;
}

.merch-package-addon-options {
    margin-top: 10px;
}

.merch-package-addon-choice-grid {
    gap: 8px;
}

.merch-package-addon-help {
    color: var(--merch-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.merch-package-addon-error {
    color: #f87171;
    font-size: 13px;
    margin-top: 8px;
}

.merch-package-product-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--merch-border);
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.merch-package-product-card--new {
    border-color: rgba(56, 149, 241, 0.82);
    background:
        linear-gradient(180deg, rgba(28, 137, 240, 0.16) 0%, rgba(28, 137, 240, 0.08) 100%);
    box-shadow:
        0 0 0 1px rgba(56, 149, 241, 0.28),
        0 16px 32px rgba(28, 137, 240, 0.14);
    transform: translateY(-1px);
}

.merch-package-product-card--new .merch-table-thumb {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
}

.merch-package-product-card--new .merch-badge-success {
    background: rgba(28, 137, 240, 0.20);
    border-color: rgba(96, 165, 250, 0.38);
    color: #dbeafe;
}

@media (max-width: 560px) {
    .merch-addon { grid-template-columns: 64px 1fr; }
    .merch-addon-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
    .merch-package-addon-right {
        align-items: stretch;
        gap: 10px;
        min-width: 0;
        width: 100%;
    }
    .merch-package-addon-toggle {
        width: auto;
    }
}

/* =====================================================================
   CART SUMMARY (inside checkout)
   ===================================================================== */
.merch-cart-summary {
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    background: var(--merch-bg);
    padding: var(--merch-space-5);
}
.merch-cart-summary-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--merch-text-muted);
    margin: 0 0 var(--merch-space-3);
}
.merch-cart-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--merch-space-2) 0;
    color: var(--merch-text);
    font-size: 14px;
    border-bottom: 1px dashed var(--merch-border);
}
.merch-cart-row:last-of-type { border-bottom: none; }
.merch-cart-row strong { font-weight: 600; }

.checkout-merch-summary {
    background: linear-gradient(180deg, rgba(117, 182, 255, 0.30) 0%, rgba(59, 130, 246, 0.18) 100%);
    border-color: rgba(134, 190, 255, 0.42);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.checkout-merch-summary .merch-cart-summary-title {
    color: rgba(255, 255, 255, 0.92);
}

.checkout-merch-summary .merch-cart-row {
    color: rgba(255, 255, 255, 0.94);
    border-bottom-color: rgba(255, 255, 255, 0.16);
}

.checkout-merch-summary .merch-cart-row strong {
    color: #ffffff;
}

.checkout-merch-summary .merch-cart-row span,
.checkout-merch-summary .merch-cart-row div,
.checkout-merch-summary .merch-cart-row small {
    color: inherit !important;
}

.event-merch-addon-section .event-merch-addon-header {
    align-items: center;
}

.event-merch-addon-section .event-merch-addon-heading {
    text-align: center;
    width: 100%;
}

.event-merch-addon-section .event-merch-addon-title,
.event-merch-addon-section .event-merch-addon-subtitle {
    color: #ffffff !important;
    text-align: center;
}

.event-merch-addon-section .event-merch-addon-subtitle {
    opacity: 0.94;
}

.event-merch-addon-section .merch-alert-info {
    color: #ffffff;
    border-color: rgba(134, 190, 255, 0.28);
    background: linear-gradient(180deg, rgba(117, 182, 255, 0.22) 0%, rgba(59, 130, 246, 0.14) 100%);
}

.event-merch-addon-section .merch-addon {
    background: linear-gradient(180deg, rgba(117, 182, 255, 0.30) 0%, rgba(59, 130, 246, 0.18) 100%);
    border-color: rgba(134, 190, 255, 0.42);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.event-merch-addon-section .merch-addon:hover {
    border-color: rgba(166, 208, 255, 0.58);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

.event-merch-addon-section .event-merch-addon-top,
.event-merch-addon-section .event-merch-addon-middle,
.event-merch-addon-section .event-merch-addon-bottom {
    width: 100%;
}

.event-merch-addon-section .event-merch-addon-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.event-merch-addon-section .event-merch-addon-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.event-merch-addon-section .event-merch-addon-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
}

.event-merch-addon-section .merch-addon-thumb {
    background: rgba(9, 25, 48, 0.34);
    width: 108px;
    max-width: 100%;
    margin: 0 auto;
}

.event-merch-addon-section .merch-addon-name,
.event-merch-addon-section .merch-addon-desc,
.event-merch-addon-section .merch-addon-meta,
.event-merch-addon-section .merch-addon-price {
    color: #ffffff !important;
    text-align: center;
}

.event-merch-addon-section .merch-addon-name {
    font-size: 15px;
    line-height: 1.35;
    margin: 0;
    max-width: 100%;
    word-break: break-word;
}

.event-merch-addon-section .merch-addon-desc,
.event-merch-addon-section .merch-addon-meta {
    opacity: 0.92;
}

.event-merch-addon-section .merch-addon-desc {
    margin: 0;
    max-width: 100%;
    word-break: break-word;
}

.event-merch-addon-section .merch-addon-meta {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0;
}

.event-merch-addon-section .merch-badge {
    color: #ffffff;
}

.event-merch-addon-section .merch-addon-price {
    margin-top: 0;
    font-size: 30px;
    line-height: 1;
    white-space: nowrap;
}

.event-merch-addon-section .merch-badge-warning {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(251, 191, 36, 0.46);
    color: #fff3c2;
}

.event-merch-addon-section .merch-badge-danger {
    background: rgba(239, 68, 68, 0.20);
    border-color: rgba(248, 113, 113, 0.44);
    color: #ffd7d7;
}

.event-merch-addon-section .event-merch-addon-stock {
    color: #f8fbff;
}

.event-merch-addon-section .event-merch-addon-category,
.event-merch-addon-section .event-merch-addon-separator {
    color: #d6e8ff;
}

.event-merch-addon-section .event-merch-addon-bottom {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.event-merch-addon-section .merch-qty {
    background: rgba(9, 25, 48, 0.34);
    border-color: rgba(255, 255, 255, 0.2);
}

.event-merch-addon-section .merch-qty input,
.event-merch-addon-section .merch-qty button {
    color: #ffffff;
}

.event-merch-addon-section .merch-qty button:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 560px) {
    .event-merch-addon-section .merch-addon {
        padding: 16px;
    }

    .event-merch-addon-section .event-merch-addon-visual {
        gap: 14px;
    }

    .event-merch-addon-section .merch-addon-thumb {
        width: 96px;
    }

    .event-merch-addon-section .merch-addon-price {
        font-size: 26px;
    }

    .event-merch-addon-section .event-merch-addon-bottom {
        width: 100%;
    }
}

/* =====================================================================
   DASHBOARD STATS GRID
   ===================================================================== */
.merch-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--merch-space-4);
    margin-bottom: var(--merch-space-8);
}
.merch-stat {
    background: var(--merch-bg);
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    padding: var(--merch-space-5);
    transition: box-shadow var(--merch-transition), transform var(--merch-transition);
}
.merch-stat:hover { box-shadow: var(--merch-shadow-md); transform: translateY(-1px); }
.merch-stat-label {
    color: var(--merch-text-muted);
    font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.merch-stat-value {
    font-size: 26px; font-weight: 700;
    color: var(--merch-text);
    letter-spacing: -0.02em;
}
.merch-stat-sub {
    color: var(--merch-text-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* =====================================================================
   TABLE
   ===================================================================== */
.merch-table-wrap {
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-lg);
    overflow: hidden;
    background: var(--merch-bg);
}
.merch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.merch-table thead th {
    text-align: left;
    background: var(--merch-surface);
    color: var(--merch-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--merch-border);
}
.merch-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--merch-border);
    color: var(--merch-text);
    vertical-align: middle;
}
.merch-table tbody tr:hover { background: var(--merch-surface); }
.merch-table tbody tr:last-child td { border-bottom: none; }
.merch-table-thumb {
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: contain;
    object-position: center;
    background: var(--merch-surface-2);
    overflow: hidden;
}

/* =====================================================================
   IMAGE UPLOADER
   ===================================================================== */
.merch-upload {
    border: 1.5px dashed var(--merch-border-strong);
    border-radius: var(--merch-radius-lg);
    padding: var(--merch-space-6);
    text-align: center;
    background: var(--merch-surface);
    cursor: pointer;
    transition: border-color var(--merch-transition), background var(--merch-transition);
}
.merch-upload:hover { border-color: var(--merch-primary); background: var(--merch-primary-soft); }
.merch-upload p { margin: 8px 0 0; color: var(--merch-text-muted); font-size: 13px; }
.merch-upload strong { color: var(--merch-text); display: block; font-size: 14px; }
.merch-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--merch-space-3);
    margin-top: var(--merch-space-4);
}
.merch-upload-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius);
    overflow: hidden;
    background: var(--merch-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}
.merch-upload-tile img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.merch-upload-tile.primary { border-color: var(--merch-primary); box-shadow: 0 0 0 3px var(--merch-primary-ring); }
.merch-upload-tile button {
    position: absolute; top: 6px; right: 6px;
    border: none; border-radius: 999px;
    background: rgba(17, 24, 39, 0.6);
    color: #fff;
    width: 24px; height: 24px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    transition: background var(--merch-transition);
}
.merch-upload-tile button:hover { background: rgba(17, 24, 39, 0.85); }
.merch-upload-tile .primary-flag {
    position: absolute; bottom: 6px; left: 6px;
    background: var(--merch-primary);
    color: #fff;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 3px 6px;
    border-radius: 4px;
}

/* =====================================================================
   EMPTY / LOADING / ALERTS
   ===================================================================== */
.merch-empty {
    text-align: center;
    padding: var(--merch-space-12) var(--merch-space-6);
    border: 1px dashed var(--merch-border-strong);
    border-radius: var(--merch-radius-lg);
    background: var(--merch-surface);
    color: var(--merch-text-muted);
}
.merch-empty h3 {
    color: var(--merch-text);
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}
.merch-empty p { margin: 0 0 var(--merch-space-4); font-size: 14px; }

.merch-skeleton {
    background: linear-gradient(90deg, var(--merch-surface) 25%, var(--merch-surface-2) 37%, var(--merch-surface) 63%);
    background-size: 400% 100%;
    animation: merch-shimmer 1.4s ease-in-out infinite;
    border-radius: var(--merch-radius);
}
@keyframes merch-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.merch-alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 16px;
    border-radius: var(--merch-radius);
    font-size: 14px;
    margin-bottom: var(--merch-space-4);
    line-height: 1.45;
    border: 1px solid transparent;
}
.merch-alert-info    { background: var(--merch-primary-soft); color: var(--merch-primary); border-color: var(--merch-primary-ring); }
.merch-alert-success { background: var(--merch-success-soft); color: var(--merch-success); }
.merch-alert-warning { background: var(--merch-warning-soft); color: var(--merch-warning); }
.merch-alert-danger  { background: var(--merch-danger-soft);  color: var(--merch-danger); }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */
.merch-fade-in {
    animation: merch-fade-in 240ms ease-out both;
}
@keyframes merch-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.merch-stagger > * { opacity: 0; animation: merch-fade-in 280ms ease-out forwards; }
.merch-stagger > *:nth-child(1)  { animation-delay: 20ms; }
.merch-stagger > *:nth-child(2)  { animation-delay: 60ms; }
.merch-stagger > *:nth-child(3)  { animation-delay: 100ms; }
.merch-stagger > *:nth-child(4)  { animation-delay: 140ms; }
.merch-stagger > *:nth-child(5)  { animation-delay: 180ms; }
.merch-stagger > *:nth-child(6)  { animation-delay: 220ms; }
.merch-stagger > *:nth-child(7)  { animation-delay: 260ms; }
.merch-stagger > *:nth-child(8)  { animation-delay: 300ms; }
.merch-stagger > *:nth-child(n+9){ animation-delay: 340ms; }

/* =====================================================================
   ACCESSIBILITY HELPERS
   ===================================================================== */
.merch-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--merch-primary); outline-offset: 2px; border-radius: 6px; }

/* =====================================================================
   STORE PAGE ALIGNMENT WITH EVENTS PAGE
   ===================================================================== */
.merch-dark-page {
    --merch-primary:        #1c89f0;
    --merch-primary-hover:  #1875cf;
    --merch-primary-soft:   rgba(28, 137, 240, 0.16);
    --merch-primary-ring:   rgba(28, 137, 240, 0.22);

    --merch-bg:             #050505;
    --merch-surface:        #1d1d1d;
    --merch-surface-2:      #2a2a2a;
    --merch-border:         rgba(255,255,255,0.1);
    --merch-border-strong:  rgba(255,255,255,0.16);

    --merch-text:           #ffffff;
    --merch-text-muted:     #c9d3e3;
    --merch-text-subtle:    #8b95a7;

    --merch-success-soft:   rgba(16, 185, 129, 0.14);
    --merch-warning-soft:   rgba(245, 158, 11, 0.16);
    --merch-danger-soft:    rgba(239, 68, 68, 0.16);

    background:
        radial-gradient(circle at top left, rgba(28, 137, 240, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(28, 137, 240, 0.08), transparent 30%),
        #050505;
}

.merch-dark-page .merch-container {
    position: relative;
    z-index: 1;
}

.merch-dark-page .merch-btn-outline,
.merch-dark-page .merch-btn-ghost {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.14);
    color: #f5f7fb;
}

.merch-dark-page .merch-btn-outline:hover,
.merch-dark-page .merch-btn-ghost:hover {
    background: rgba(28, 137, 240, 0.12);
    border-color: rgba(28, 137, 240, 0.3);
    color: #fff;
}

.merch-dark-page .merch-btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
}

.merch-dark-page .merch-input,
.merch-dark-page .merch-select,
.merch-dark-page .merch-textarea,
.merch-dark-page .merch-qty {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

.merch-dark-page .merch-qty input,
.merch-dark-page .merch-qty button {
    color: #fff;
}

.merch-dark-page .merch-qty button:hover {
    background: rgba(255,255,255,0.06);
}

.merch-dark-page .merch-badge {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    color: #dbe7f6;
}

.merch-dark-page .merch-badge-warning {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.28);
    color: #ffd27d;
}

.merch-dark-page .merch-badge-danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.28);
    color: #ff9b9b;
}

.merch-dark-page .merch-gallery-main,
.merch-dark-page .merch-gallery-thumb,
.merch-dark-page .merch-cart-summary,
.merch-dark-page .merch-empty {
    background: #1d1d1d;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.merch-dark-page .merch-gallery-thumb:hover {
    border-color: rgba(255,255,255,0.24);
}

.merch-dark-page .merch-gallery-thumb.active {
    border-color: #1c89f0;
    box-shadow: 0 0 0 2px rgba(28, 137, 240, 0.18);
}

.merch-dark-page .merch-empty {
    background: rgba(255,255,255,0.03);
}

.merch-dark-page .merch-alert-info {
    background: rgba(28, 137, 240, 0.12);
    border-color: rgba(28, 137, 240, 0.24);
    color: #8ec7ff;
}

.merch-dark-page .merch-size-option.active,
.event-merch-addon-section .merch-size-option.active {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.92);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.merch-dark-page .merch-size-option.active input,
.event-merch-addon-section .merch-size-option.active input {
    accent-color: #22c55e;
}

.merch-dark-page .merch-size-option.merch-size-option-soldout,
.event-merch-addon-section .merch-size-option.merch-size-option-soldout {
    background: rgba(127, 29, 29, 0.26);
    border-color: rgba(248, 113, 113, 0.72);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

.merch-dark-page .merch-size-option.merch-size-option-soldout:hover,
.event-merch-addon-section .merch-size-option.merch-size-option-soldout:hover {
    background: rgba(127, 29, 29, 0.34);
    border-color: rgba(252, 165, 165, 0.9);
    color: #fecaca;
}

.merch-detail-shell {
    align-items: start;
}

.merch-detail-shell--package-background {
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.68), rgba(5, 5, 5, 0.9)),
        var(--merch-package-background-image) center/cover no-repeat;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.merch-detail-shell--package-background::before {
    background:
        radial-gradient(circle at top right, rgba(28, 137, 240, 0.14), transparent 32%),
        radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.1), transparent 28%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.merch-detail-shell--package-background > * {
    position: relative;
    z-index: 1;
}

.merch-store-page--package-background {
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0.9)),
        var(--merch-package-background-image) center/cover no-repeat;
}

.merch-store-page--package-background .merch-container {
    padding-bottom: 24px;
    padding-top: 8px;
}

.merch-dark-page .merch-detail-info {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.merch-dark-page .merch-detail-desc {
    color: #d7e0ee;
}

.merch-dark-page .merch-cart-row {
    border-bottom-color: rgba(255,255,255,0.08);
}

.merch-cart-page .merch-cart-summary {
    min-height: 100%;
}

.merch-cart-page .merch-page-header {
    margin-bottom: 40px;
}

.merch-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
    gap: 28px;
}

.merch-editor-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.merch-editor-sidebar {
    height: fit-content;
    position: sticky;
    top: 96px;
}

.merch-popup-page {
    min-height: 100vh;
    padding-top: var(--merch-space-6);
}

.merch-popup-container {
    max-width: 1180px;
}

.merch-popup-shell {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--merch-border);
    border-radius: var(--merch-radius-xl);
    background:
        radial-gradient(circle at top right, rgba(28, 137, 240, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    box-shadow: var(--merch-shadow);
}

.merch-popup-shell__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.merch-popup-shell__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--merch-primary);
}

.merch-popup-shell__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.merch-popup-shell__owner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(28, 137, 240, 0.2);
    background: rgba(28, 137, 240, 0.08);
}

.merch-popup-shell__owner strong {
    font-size: 15px;
}

.merch-popup-shell__owner span:last-child {
    flex: 1 1 260px;
    color: var(--merch-text-muted);
    font-size: 13px;
}

.merch-page-background-editor {
    border-top: 1px solid var(--merch-border);
    margin-top: 20px;
    padding-top: 20px;
}

.merch-page-background-editor__title {
    color: var(--merch-text);
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px;
}

.merch-page-background-editor__copy {
    color: var(--merch-text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 14px;
}

.merch-page-background-editor__help {
    color: var(--merch-text-muted);
    font-size: 12px;
    line-height: 1.6;
    margin-top: 8px;
}

.merch-page-background-editor__preview {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.merch-page-background-editor__preview img {
    aspect-ratio: 16 / 10;
    background: var(--merch-surface);
    border: 1px solid var(--merch-border);
    border-radius: 16px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.merch-page-background-editor__empty {
    background: rgba(255,255,255,0.03);
    border: 1px dashed var(--merch-border);
    border-radius: 16px;
    color: var(--merch-text-muted);
    font-size: 13px;
    margin-top: 14px;
    padding: 18px 16px;
    text-align: center;
}

body.merch-package-popup .mobile-menu-toggle,
body.merch-package-popup .nav {
    display: none !important;
}

body.merch-package-popup .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    background: var(--merch-bg);
}

body.merch-package-popup .main-content main {
    max-width: none !important;
    margin: 0 !important;
    text-align: left !important;
}

.merch-store-page {
    min-height: calc(100vh - 80px);
}

.merch-store-title h2 {
    color: #fff;
}

.merch-store-subtitle {
    color: #ccc;
    font-size: 15px;
    margin: 18px auto 0;
    max-width: 720px;
}

.merch-store-cart-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.merch-store-cart-copy {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.merch-store-cart-button,
.merch-store-cart-cta {
    width: 100%;
    justify-content: center;
}

.merch-store-toolbar {
    background-color: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 18px;
}

.merch-store-count {
    color: #fff;
    font-weight: 500;
}

.merch-store-current-filter {
    color: #a8bedc;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
}

.merch-store-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.merch-store-card:hover {
    border-color: rgba(28, 137, 240, 0.45);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    transform: translateY(-3px);
}

.merch-store-image-shell {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    min-height: 240px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.merch-store-image-shell a,
.merch-store-image-shell img {
    display: block;
    width: 100%;
    height: 100%;
}

.merch-store-image-shell img {
    min-height: 240px;
    object-fit: contain;
    object-position: center;
}

.merch-store-no-image {
    align-items: center;
    color: #8b95a7;
    display: flex;
    font-size: 13px;
    height: 240px;
    justify-content: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.merch-store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    left: 14px;
    position: absolute;
    top: 14px;
    z-index: 1;
}

.merch-store-page .merch-badge {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255,255,255,0.12);
    color: #f5f7fb;
}

.merch-store-page .merch-badge-warning {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.3);
    color: #ffd27d;
}

.merch-store-page .merch-badge-danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ff9696;
}

.merch-store-page .merch-store-category-badge {
    background: rgba(28, 137, 240, 0.18);
    border-color: rgba(28, 137, 240, 0.3);
    color: #8ec7ff;
}

.merch-store-card-body h4 {
    margin-bottom: 8px;
}

.merch-store-card-body .star-div span {
    color: #1c89f0;
    font-size: 20px;
    font-weight: 700;
}

.merch-store-stock-line {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.merch-store-description {
    color: #ccc;
    line-height: 1.7;
    margin: 0 auto 18px;
    max-width: 560px;
}

.merch-store-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.merch-store-add-btn {
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    transition: all 0.3s ease-in-out;
}

.merch-store-add-btn:hover:not(:disabled) {
    background: rgba(28, 137, 240, 0.16);
    border-color: rgba(28, 137, 240, 0.4);
    transform: translateY(-2px);
}

.merch-store-add-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.merch-store-empty {
    padding: 70px 30px;
    text-align: center;
}

.merch-store-empty h4 {
    color: #fff;
    margin: 18px 0 10px;
}

.merch-store-empty p {
    color: #ccc;
    margin: 0;
}

.merch-store-empty-icon {
    color: #1c89f0;
    font-size: 44px;
}

.merch-store-skeleton {
    overflow: hidden;
}

.merch-store-skeleton-image {
    min-height: 240px;
    width: 100%;
}

.merch-store-skeleton-line {
    height: 16px;
    margin-bottom: 14px;
    width: 100%;
}

.merch-store-skeleton-line--title {
    height: 28px;
    margin-top: 24px;
    width: 68%;
}

.merch-store-skeleton-line--price {
    width: 32%;
}

.merch-store-skeleton-line--short {
    width: 54%;
}

@media (max-width: 991px) {
    .merch-store-current-filter {
        white-space: normal;
    }

    .merch-store-image-shell,
    .merch-store-image-shell img,
    .merch-store-no-image,
    .merch-store-skeleton-image {
        min-height: 220px;
    }
}

@media (max-width: 767px) {
    .merch-store-toolbar {
        padding: 14px;
    }

    .merch-store-actions {
        flex-direction: column;
    }

    .merch-store-add-btn,
    .merch-store-actions .view-details-btn {
        width: 100%;
    }

    .merch-dark-page .merch-detail-info {
        padding: 22px;
    }

    .merch-detail-shell--package-background {
        border-radius: 20px;
        padding: 18px;
    }

    .merch-store-page--package-background .merch-container {
        padding-bottom: 18px;
    }

    .merch-detail-title {
        font-size: 24px;
    }

    .merch-detail-price {
        font-size: 22px;
    }

    .merch-ticket-link-panel {
        padding: 16px;
    }

    .merch-detail-purchase-row {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .merch-detail-purchase-row .merch-qty {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .merch-detail-purchase-row .merch-qty input {
        flex: 1 1 auto;
        width: auto;
    }

    .merch-detail-purchase-row .merch-btn {
        justify-content: center;
        text-align: center;
        white-space: normal;
        width: 100%;
        font-size: 12px;
        line-height: 1.25;
    }
}

/* Touch targets >= 44 px on small screens */
@media (max-width: 560px) {
    .merch-btn   { min-height: 44px; }
    .merch-qty   { height: 44px; }
    .merch-qty input { width: 56px; }
    .merch-qty button { width: 44px; }

    .merch-dark-page .merch-detail-info {
        padding: 18px;
    }

    .merch-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .merch-gallery-main {
        border-radius: 14px;
    }

    .merch-detail-shell--package-background {
        border-radius: 16px;
        padding: 12px;
    }

    .merch-store-page--package-background {
        background-position: center top;
    }

    .merch-store-page--package-background .merch-container {
        padding-bottom: 14px;
        padding-top: 6px;
    }

    .merch-ticket-choice {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .merch-ticket-choice__meta {
        align-items: flex-start;
        width: 100%;
    }

    .merch-ticket-choice__price {
        font-size: 16px;
    }

    .merch-alert {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 1024px) {
    .merch-editor-layout {
        grid-template-columns: 1fr;
    }

    .merch-editor-sidebar {
        position: static;
        top: auto;
    }

    .merch-popup-shell {
        padding: 20px;
    }

    .merch-popup-shell__top {
        flex-direction: column;
    }

    .merch-popup-shell__actions {
        width: 100%;
        justify-content: stretch;
    }

    .merch-popup-shell__actions .merch-btn {
        flex: 1 1 180px;
    }
}

@media (max-width: 768px) {
    .merch-popup-page {
        padding-top: 12px;
    }

    .merch-popup-shell {
        padding: 16px;
        margin-bottom: 18px;
    }

    .merch-popup-shell__owner {
        align-items: flex-start;
    }

    .merch-popup-shell__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .merch-popup-shell__actions .merch-btn {
        width: 100%;
    }
}
