/*
 * SOLD Strip and Effects Styles for Art Gallery
 * File: sold-styles.css
 * Description: External stylesheet for marking sold gallery items
 */

/* ===============================
   SOLD STRIP AND EFFECTS STYLES
   =============================== */

/* Gallery Item Wrapper for SOLD effects */
.gallery-item-wrapper {
    position: relative;
    transition: all 0.3s ease;
}

.gallery-item-wrapper.sold-item {
    /* Remove image filters - only affect text areas */
}

/* SOLD Strip Styling - default in gallery */
.sold-strip {
    position: absolute;
    top: 20px;
    right: -15px; /* iese putin in afara in galerie */
    background: linear-gradient(135deg, #dc2626, #b91c1c, #991b1b);
    color: white;
    padding: 8px 25px;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-align: center;
    z-index: 10;
    transform: rotate(15deg);
    box-shadow: 
        0 4px 15px rgba(220, 38, 38, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    animation: soldPulse 2s infinite alternate;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Alternative ribbon-style SOLD strip */
.sold-strip::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #991b1b;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.sold-strip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 8px solid #991b1b;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* SOLD Strip Animation */
@keyframes soldPulse {
    0% { 
        box-shadow: 
            0 4px 15px rgba(220, 38, 38, 0.4),
            0 0 0 2px rgba(255, 255, 255, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    100% { 
        box-shadow: 
            0 6px 20px rgba(220, 38, 38, 0.6),
            0 0 0 3px rgba(255, 255, 255, 1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* SOLD Image Effect - REMOVED (keeping images normal) */
.sold-image {
    /* Image remains normal - no filters applied */
}

/* SOLD Button Styling */
.sold-button {
    background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
    color: #fff !important;
    cursor: not-allowed !important;
    border: 2px solid #4b5563 !important;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none !important;
}

.sold-button:hover {
    background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ===============================
   MODAL PROTECTION - HIDE SOLD STRIPS
   =============================== */

/* Ensure modal images don't have sold effects */
.modal img,
#myModal img,
.modal-content img {
    filter: none !important;
    opacity: 1 !important;
}

/* Hide all sold-strip elements when modal is open - MULTIPLE SELECTORS FOR SAFETY */
body.modal-open .sold-strip,
html[style*="overflow: hidden"] .sold-strip,
.modal .sold-strip,
#myModal .sold-strip,
.modal-content .sold-strip {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Additional protection for any modal containers */
[id*="modal"] .sold-strip,
[class*="modal"] .sold-strip {
    display: none !important;
}

/* Dark Theme Support */
[data-theme="dark"] .sold-strip {
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c);
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .sold-strip::before {
    border-left-color: #b91c1c;
}

[data-theme="dark"] .sold-strip::after {
    border-right-color: #b91c1c;
}

[data-theme="dark"] .gallery-item-wrapper.sold-item {
    /* Remove dark theme image filters */
}

[data-theme="dark"] .gallery-item-wrapper.sold-item .text-box-gallery {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .gallery-item-wrapper.sold-item .price {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Hover Effects for SOLD Items */
.gallery-item-wrapper.sold-item:hover {
    /* Remove image hover effects - only keep strip animation */
}

.gallery-item-wrapper.sold-item:hover .sold-strip {
    animation-duration: 1s;
    transform: rotate(15deg) scale(1.05);
}

/* Mobile Responsive SOLD Strip */
@media (max-width: 768px) {
    .sold-strip {
        font-size: 0.9rem;
        padding: 6px 20px;
        right: -10px;
        top: 15px;
        letter-spacing: 1px;
    }
    
    /* Extra protection for mobile modals */
    .modal .sold-strip,
    #myModal .sold-strip,
    body.modal-open .sold-strip {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .sold-strip {
        font-size: 0.8rem;
        padding: 5px 15px;
        right: -8px;
        top: 10px;
        letter-spacing: 0.5px;
    }
}

/* Additional Sold Item Effects - Focus on Text Areas Only */
.gallery-item-wrapper.sold-item .gallery-caption {
    opacity: 0.7;
    font-style: italic;
}

.gallery-item-wrapper.sold-item .text-box-gallery {
    position: relative;
    opacity: 0.8;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    padding: 10px;
    border: 2px solid rgba(220, 38, 38, 0.2);
}

.gallery-item-wrapper.sold-item .text-box-gallery h3 {
    text-decoration: line-through;
    opacity: 0.6;
    color: #666;
}

.gallery-item-wrapper.sold-item .price {
    position: relative;
    background: rgba(220, 38, 38, 0.15);
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Notification for SOLD items */
.sold-notification {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.sold-notification::before {
    content: '⚠️';
}