/* Product Modal Styles */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.product-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main modal content - use viewport width for better sizing */
.modal-content {
    background: #111;
    border: 2px solid #8B0000;
    width: 90vw;
    max-width: 1200px;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    margin: auto;
    box-sizing: border-box;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.modal-close:hover {
    background: #8B0000;
    border-color: #8B0000;
}

/* Left column - image */
.modal-image {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-image .placeholder {
    font-size: 6rem;
    color: #333;
}

/* Right column - details */
.modal-details {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-title {
    font-size: 1.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.3;
    padding-right: 3rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-price {
    font-size: 1.8rem;
    color: #8B0000;
    font-weight: bold;
    letter-spacing: 2px;
}

.modal-description {
    line-height: 1.7;
    color: #ccc;
    font-size: 1rem;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 1.2rem 0;
    max-height: 180px;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stock-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff00;
    flex-shrink: 0;
}

.stock-indicator.out-of-stock {
    background: #ff0000;
}

.modal-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-quantity label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #444;
    background: #000;
}

.quantity-btn {
    background: #222;
    border: none;
    color: #fff;
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-size: 1.3rem;
    transition: background 0.3s;
    min-width: 45px;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background: #8B0000;
}

.quantity-display {
    padding: 0.8rem 1.2rem;
    font-size: 1.3rem;
    min-width: 60px;
    text-align: center;
    background: #000;
    border: none;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.modal-add-to-cart {
    flex: 1;
    padding: 1.1rem 2rem;
    background: #8B0000;
    color: #fff;
    border: 2px solid #8B0000;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.modal-add-to-cart:hover:not(:disabled) {
    background: #fff;
    color: #8B0000;
}

.modal-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-additional-info {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        flex-direction: column;
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        gap: 1.5rem;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-title {
        font-size: 1.4rem;
        padding-right: 2.5rem;
    }
    
    .modal-price {
        font-size: 1.4rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Make merch items clickable */
.merch-item {
    cursor: pointer;
    transition: transform 0.3s;
}

.merch-item:hover {
    transform: translateY(-5px);
}

.merch-item .btn {
    pointer-events: auto;
}
