/* Merch component (MerchDisplay.razor) dark theme styles */
.merch-display-container { margin-top: 2rem; }
.merch-header { margin-bottom: 1.5rem; }
.merch-header h4 { color: rgba(217,168,50,1); margin-bottom: .5rem; }
.merch-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1.25rem; margin-bottom:2rem; }
.merch-card { background:#181818; border:1px solid rgba(217,168,50,.25); border-radius:12px; overflow:hidden; transition:.25s ease; cursor:pointer; box-shadow:0 4px 12px rgba(217,168,50,.15); display:flex; flex-direction:column; }
.merch-card:hover { transform:translateY(-4px); box-shadow:0 6px 20px rgba(217,168,50,.35); border-color:rgba(217,168,50,.6); }
.merch-image-container { position:relative; height:200px; overflow:hidden; background:#111; }
.merch-image { width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.merch-card:hover .merch-image { transform:scale(1.05); }
.merch-placeholder { display:flex; align-items:center; justify-content:center; height:100%; background:#222; color:rgba(217,168,50,.5); font-size:3rem; }
.stock-badge, .category-badge { position:absolute; top:10px; padding:4px 10px; border-radius:14px; font-size:.65rem; font-weight:600; letter-spacing:.5px; text-transform:uppercase; backdrop-filter:blur(4px); }
.stock-badge { right:10px; color:#fff; }
.low-stock { background:linear-gradient(135deg,#ff8a3d,#ff5e1f); }
.out-of-stock { background:linear-gradient(135deg,#dc3545,#a71d2a); }
.category-badge { left:10px; background:rgba(0,0,0,.55); color:rgba(217,168,50,1); border:1px solid rgba(217,168,50,.4); }
.merch-info { padding:1rem 1rem 1.25rem; display:flex; flex-direction:column; flex:1; }
.merch-title { font-size:1.05rem; font-weight:600; color:rgba(217,168,50,1); margin:0 0 .5rem; line-height:1.25; }
.merch-description { font-size:.85rem; color:#cfcfcf; margin:0 0 .75rem; line-height:1.4; flex-grow:0; }
.merch-details { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.75rem; }
.detail-tag { background:rgba(217,168,50,.15); border:1px solid rgba(217,168,50,.35); color:rgba(217,168,50,.9); padding:2px 8px; font-size:.65rem; border-radius:6px; letter-spacing:.5px; font-weight:500; }
.merch-footer { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:.75rem; }
.price { font-weight:700; color:rgba(217,168,50,1); font-size:1rem; }
.price.large { font-size:1.4rem; }
/* Modal Styles */
.merch-modal { max-width:900px; width:100%; background:#181818; border:1px solid rgba(217,168,50,.4); box-shadow:0 20px 50px rgba(0,0,0,.6),0 0 30px rgba(217,168,50,.15); }
.merch-modal-body { display:flex; flex-wrap:wrap; gap:1.5rem; }
.merch-modal-image { flex:0 0 300px; max-width:300px; background:#111; border:1px solid rgba(217,168,50,.25); border-radius:10px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.merch-modal-image img { width:100%; height:100%; object-fit:cover; }
.merch-modal-info { flex:1; min-width:220px; display:flex; flex-direction:column; }
.merch-modal-info p { color:#d8d8d8; font-size:.9rem; line-height:1.5; }
.merch-management-container {
    padding: 1rem;
}
.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}
.merch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color, #007bff);
    margin-bottom: 0.5rem;
}
.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}
.merch-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.merch-item-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1rem;
    align-items: start;
    transition: all 0.3s ease;
}
.merch-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color, #007bff);
}
.merch-item-card.inactive {
    opacity: 0.7;
    background: #f8f9fa;
}
.merch-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}
.merch-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.5rem;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}
.item-name {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}
.item-description {
    color: #666;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.detail-item {
    font-size: 0.9rem;
    color: #495057;
}
.item-stats {
    margin-top: 0.5rem;
}
.merch-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
}
.no-merch-management {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}
.no-merch-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.image-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}
.img-preview {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.image-upload-placeholder {
    padding: 2rem;
    color: #6c757d;
}
.image-upload-placeholder i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}
.image-upload-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Fix for modal click/focus issues: ensure parent containers do not block pointer events or overflow */
.studio-content-grid, .studio-card, .studio-card-body {
    overflow: visible !important;
    position: static !important;
    z-index: auto !important;
    pointer-events: auto !important;
}

/* Ensure modal is always above and clickable */
.modal.show, .modal-backdrop {
    z-index: 2000 !important;
    pointer-events: auto !important;
}

/* Disable all transitions and animations for merch management to prevent flicker */
.merch-item-card,
.merch-item-card:hover,
.merch-management-container,
.modal.show,
.modal-content,
.modal-backdrop {
    transition: none !important;
    animation: none !important;
}

    /* Remove box-shadow and border-color changes on hover */
    .merch-item-card:hover {
        box-shadow: none !important;
        border-color: #e0e0e0 !important;
    }

    /* Extra: Disable all transitions/animations for merch management components only */
    .merch-management-container *,
    .merch-management-container *:hover,
    .merch-management-container *:focus,
    .merch-management-container *:active {
        transition: none !important;
        animation: none !important;
        box-shadow: none !important;
    }

/* Modal and backdrop: no animation, always above */
.modal.show, .modal-backdrop {
    transition: none !important;
    animation: none !important;
    z-index: 3000 !important;
    pointer-events: auto !important;
}

/* MODAL FULLSCREEN FIX FOR STUDIO MANAGE MERCH PAGE */
.page .modal.show {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    z-index: 3000 !important;
    background: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
}

.page .modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2999 !important;
    background: rgba(0,0,0,0.6) !important;
    pointer-events: auto !important;
}

.page .modal-dialog {
    width: 100vw !important;
    max-width: 700px;
    margin: 0 auto !important;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page .modal-content {
    width: 100%;
    min-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    background: #181818;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width:768px){ .merch-grid { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; } .merch-modal-body { flex-direction:column; } .merch-modal-image { max-width:100%; flex:0 0 auto; height:240px; } }
@media (max-width:480px) {
    .merch-grid {
        grid-template-columns: 1fr;
    }

    .merch-info {
        padding: .85rem .85rem 1rem;
    }

    .merch-title {
        font-size: .95rem;
    }

    .price {
        font-size: .9rem;
    }
}
@media (max-width: 768px) {
    .page .modal-dialog {
        max-width: 98vw !important;
        min-height: 90vh;
    }
    .page .modal-content {
        min-height: 90vh;
        border-radius: 8px;
    }
}
