/* public/css/quick-view-modal.css (Updated & Professional) */

/* --- Base Modal Container --- */
.quick-view-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content-quick {
    position: relative;
    background: #131313; /* Darker background similar to page */
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInModal 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    left: 20px; /* For RTL layout */
    background: rgba(44, 44, 44, 0.7);
    border: 1px solid #444;
    color: #ccc;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal-close-btn:hover {
    background: #5e8099;
    color: #000;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

/* --- Reusing and Adapting product-show.css styles --- */
/* Scoping all styles from product page to the modal body */

.modal-body .product-main-section {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
}

/* --- Image Gallery --- */
.modal-body .product-images {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.modal-body .product-images img {
    width: 100%;
    border-radius: 10px;
    display: none;
}

.modal-body .product-images img.active {
    display: block;
}

.modal-body .gallery-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.modal-body .gallery-controls .gallery-btn {
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    pointer-events: all;
    transition: background-color 0.2s;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-body .gallery-controls .gallery-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* --- Product Options Panel --- */
.modal-body .product-options {
    flex: 1;
    min-width: 300px;
    background: none; /* No extra background needed */
    padding: 20px;
}

.modal-body .product-options h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ebebeb;
}

.modal-body .product-price {
    font-size: 1.8rem;
    color: #5e8099;
    margin: 20px 0;
    font-weight: bold;
}

.modal-body .product-options h3 {
    margin-top: 20px;
    font-size: 1.1rem;
    color: #ccc;
}

/* --- Size & Quantity (Identical to product-show.css) --- */
.modal-body .size-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.modal-body .size-selection label {
    padding: 10px 20px;
    color: #ebebeb;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-body .size-selection input[type="radio"] {
    display: none;
}

.modal-body .size-selection input[type="radio"]:checked+label {
  background: #5e809910;
  border: 1px solid #5e8099;
  color: #5e8099;
  box-shadow: 0 4px 15px #5e809920;
    font-weight: bold;
    border-color: #5e8099;
}

.modal-body .number-input {
    display: flex;
    align-items: center;
    margin: 10px 0 25px;
}

.modal-body .number-input .quantity {
    width: 50px;
    height: 45px;
    text-align: center;
    border: 1px solid #555;
    background: #222;
    color: #ebebeb;
    font-size: 1.2rem;
    padding: 5px;
}
.modal-body .number-input .quantity::-webkit-outer-spin-button,
.modal-body .number-input .quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-body .number-input .quantity-btn {
    width: 45px;
    height: 45px;
    background: #444;
    color: #ebebeb;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

/* --- Action Buttons --- */
.modal-body .add-to-cart-modal,
.modal-body .add-to-favorite-modal {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.2s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-body .add-to-cart-modal {
  background: #5e809910;
  border: 1px solid #5e8099;
  color: #5e8099;
  box-shadow: 0 4px 15px #5e809920;
}
.modal-body .add-to-cart-modal:hover {
    background-color: #5e8099;
    color: #000;
    box-shadow: 0 4px 15px #5e809940;
}
.modal-body .add-to-cart-modal:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.modal-body .add-to-favorite-modal {
    background-color: #333;
    color: #ebebeb;
}
.modal-body .add-to-favorite-modal .text-active { display: none; }
.modal-body .add-to-favorite-modal.active .favorite-icon { color: #e74c3c; }
.modal-body .add-to-favorite-modal.active .text-default { display: none; }
.modal-body .add-to-favorite-modal.active .text-active { display: inline; }


/* --- Bottom Link --- */
.modal-body .full-details-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}
.modal-body .full-details-link:hover {
    color: #5e8099;
}
.modal-body .full-details-link i {
    margin-left: 8px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .modal-content-quick {
        max-width: 100%;
        max-height: 85vh;
        height: 100%;
        border-radius: 0;
    }
    .modal-body{
        padding: 0;
    }
    .modal-body .product-main-section {
        flex-direction: column;
    }
    .modal-body .product-options h2 {
        font-size: 1.8rem;
    }
    .modal-body .product-price {
        font-size: 1.6rem;
    }
}
