/**
 * Quick View Modal - Brzi pregled proizvoda
 * Modal za prikaz brzog pregleda proizvoda sa slikama, cenom, i opcijama
 */

/* Modal Overlay */
.quick-view-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
}

.quick-view-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.quick-view-modal {
    background-color: #fff;
    border-radius: 4px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-in-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background-color: #fff;
    border: 2px solid #e4e7ed;
    border-radius: 50%;
    font-size: 20px;
    line-height: 31px;
    text-align: center;
    cursor: pointer;
    color: #293681;
    z-index: 10;
    transition: all 0.2s;
}

.quick-view-close:hover {
    background-color: #4274D9;
    border-color: #4274D9;
    color: #fff;
    transform: rotate(90deg);
}

/* Loading State */
.quick-view-loading {
    padding: 80px;
    text-align: center;
}

.quick-view-loading i {
    font-size: 48px;
    color: #4274D9;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.quick-view-error {
    padding: 80px 40px;
    text-align: center;
}

.quick-view-error i {
    font-size: 48px;
    color: #999;
    margin-bottom: 20px;
}

.quick-view-error h4 {
    color: #293681;
    margin-bottom: 10px;
}

.quick-view-error p {
    color: #666;
    margin-bottom: 20px;
}

/* Modal Content */
.quick-view-content {
    padding: 30px;
}

.quick-view-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.quick-view-col {
    padding: 0 15px;
}

.quick-view-col-left {
    flex: 0 0 45%;
    max-width: 45%;
}

.quick-view-col-right {
    flex: 0 0 55%;
    max-width: 55%;
    overflow: hidden;
}

/* Product Images */
.quick-view-images {
    position: relative;
}

.quick-view-main-image {
    position: relative;
    margin-bottom: 15px;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f8f9fa;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-main-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.quick-view-image-label {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.quick-view-image-label span {
    display: block;
    padding: 5px 15px;
    background-color: #4274D9;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 40px;
    margin-bottom: 5px;
}

.quick-view-image-label .out-of-stock {
    background-color: #999;
}

/* Thumbnail Images */
.quick-view-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.quick-view-thumbnail {
    flex: 0 0 94px;
    height: 94px;
    border: 2px solid #e4e7ed;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-thumbnail:hover,
.quick-view-thumbnail.active {
    border-color: #4274D9;
}

.quick-view-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Product Details */
.quick-view-details {
    padding-left: 15px;
    overflow: hidden;
    width: 100%;
}

.quick-view-category {
    color: #8d99ae;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.quick-view-title {
    font-size: 24px;
    font-weight: 700;
    color: #293681;
    margin: 0 0 15px 0;
    line-height: 1.3;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.quick-view-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quick-view-stars {
    color: #4274D9;
}

.quick-view-stars i {
    font-size: 14px;
    margin-right: 3px;
}

.quick-view-review-text {
    color: #8d99ae;
    font-size: 13px;
    margin-left: 8px;
}

.quick-view-price {
    margin: 20px 0;
}

.quick-view-price-current {
    font-size: 30px;
    font-weight: 700;
    color: #D10024;
    margin-right: 10px;
}

.quick-view-price-old {
    font-size: 20px;
    color: #8d99ae;
    text-decoration: line-through;
}

.quick-view-availability {
    margin-bottom: 20px;
}

.quick-view-availability-label {
    font-size: 14px;
    color: #293681;
    font-weight: 600;
}

.quick-view-availability-status {
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 3px;
    display: inline-block;
    margin-left: 10px;
}

.quick-view-availability-status.in-stock {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.quick-view-availability-status.low-stock {
    background-color: #fff3e0;
    color: #f57c00;
}

.quick-view-availability-status.out-of-stock {
    background-color: #fce4ec;
    color: #c62828;
}

/* Key Features */
.quick-view-features {
    margin: 20px 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.quick-view-features h5 {
    font-size: 14px;
    font-weight: 700;
    color: #293681;
    margin: 0 0 10px 0;
}

.quick-view-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-view-features li {
    padding: 5px 0;
    color: #555;
    font-size: 13px;
}

.quick-view-features li i {
    color: #4274D9;
    margin-right: 8px;
}

/* Description */
.quick-view-description-wrapper {
    margin: 20px 0;
}

.quick-view-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    max-height: 100px;
    overflow: hidden;
    position: relative;
    margin-bottom: 5px;
}

.quick-view-description.expanded {
    max-height: none;
}

.quick-view-read-more {
    color: #4274D9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.quick-view-read-more:hover {
    text-decoration: underline;
}

/* Quantity & Purchase Section */
.quick-view-purchase-section {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin: 25px 0;
}

/* Buy Button */
.quick-view-btn-buy {
    width: 100%;
    height: 55px;
    border: none;
    border-radius: 6px;
    background-color: #4274D9;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(66, 116, 217, 0.3);
}

.quick-view-btn-buy:hover:not(:disabled) {
    background-color: #293681;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 116, 217, 0.4);
}

.quick-view-btn-buy:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Action Buttons */
.quick-view-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.quick-view-btn {
    height: 45px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-view-btn-wishlist {
    background-color: #fff;
    color: #293681;
    border: 2px solid #e4e7ed;
}

.quick-view-btn-wishlist:hover {
    border-color: #4274D9;
    color: #4274D9;
    background-color: #e8eef8;
}

.quick-view-btn-view {
    background-color: #293681;
    color: #fff;
}

.quick-view-btn-view:hover {
    background-color: #1a1c2e;
}

/* Product Links */
.quick-view-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0 0;
    padding-top: 20px;
    border-top: 1px solid #e4e7ed;
}

.quick-view-share-label {
    font-size: 14px;
    color: #293681;
    font-weight: 600;
    margin-right: 5px;
}

.quick-view-share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #293681;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 16px;
}

.quick-view-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-view-share-facebook:hover {
    background-color: #3b5998;
    color: #fff;
}

.quick-view-share-whatsapp:hover {
    background-color: #25D366;
    color: #fff;
}

.quick-view-share-copy:hover {
    background-color: #4274D9;
    color: #fff;
}

/* Responsive */
@media (max-width: 991px) {
    .quick-view-col-left,
    .quick-view-col-right {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .quick-view-col-left {
        margin-bottom: 30px;
    }
    
    .quick-view-main-image {
        height: 350px;
    }
    
    .quick-view-title {
        font-size: 20px;
    }
    
    .quick-view-price-current {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .quick-view-content {
        padding: 20px;
    }
    
    .quick-view-modal {
        margin: 10px;
    }
    
    .quick-view-main-image {
        height: 280px;
    }
    
    .quick-view-actions {
        grid-template-columns: 1fr;
    }
    
    .quick-view-quantity-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
