/**
 * Quick View Side Panel CSS - Mobile First Design
 *
 * TO DISABLE: Set SCR_ENABLE_QUICK_VIEW to false in functions.php (line 17)
 */

/* ====================================
   PLUS BUTTON TRIGGER
   ==================================== */
.scr-quick-view-btn {
    display: inline-flex !important;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      padding: 0;
      color: #333 !important;
      text-align: center;
      border: none;
      cursor: pointer;
      font-size: 24px;
      font-weight: 500;
      text-decoration: none;
      transition: all 0.3s ease;
      -webkit-appearance: none;
      border-radius: 50%;
      line-height: 1;
      position: absolute;
      right: 0px;
}

.scr-quick-view-btn:hover {
    color: #97262c !important;
    transform: scale(1.1);
}

/* ====================================
   OVERLAY & CONTAINER
   ==================================== */
.scr-qv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    overflow: hidden;
    pointer-events: none;
}

.scr-qv-modal.active {
    pointer-events: auto;
}

.scr-qv-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.scr-qv-modal.active .scr-qv-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ====================================
   SIDE PANEL - MOBILE FIRST
   ==================================== */
.scr-qv-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 85%;
    height: 100%;
    background: #ffffff;
    z-index: 2;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.scr-qv-modal.active .scr-qv-content {
    transform: translateX(0);
}

@keyframes scr-qv-slidein {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ====================================
   CLOSE BUTTON - TOP RIGHT OF PANEL
   ==================================== */
.scr-qv-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #333333;
    color: #ffffff;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 28px;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: all 0.2s ease;
}

.scr-qv-close:hover {
    background-color: #97262c;
    transform: scale(1.1);
}

/* Loading State */
.scr-qv-loading {
    padding: 60px 20px;
    text-align: center;
    font-size: 18px;
    color: #666;
}

.scr-qv-product-content {
    padding: 15px;
}

/* ====================================
   PRODUCT CONTENT - NEW LAYOUT
   ==================================== */
.scr-qv-product {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

/* Product Name - First */
.scr-qv-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #333333;
    line-height: 1.3;
    order: 1;
}

/* Product Price - Second */
.scr-qv-price {
    margin: 0;
    order: 2;
}

.scr-qv-price .scr_onsale {
    display: inline-block;
    background-color: #97262c;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.scr-qv-price .scr_onsale i {
    margin-right: 4px;
}

.scr-qv-price .price {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    color: #97262c;
}

.scr-qv-price .price del {
    color: #999;
    font-size: 2rem;
}

.scr-qv-price p.price ins,
.scr-qv-price .price ins {
    text-decoration: none;
    color: #97262c;
}

/* Daily Deal modal — discount badge above the was/now price */
.scr-qv-daily-deal-badge {
    display: inline-block;
    background-color: #97262c;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Short Description - Third */
.scr-qv-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    order: 3;
}

.scr-qv-description p {
    margin: 0 0 8px 0;
}

.scr-qv-description p:last-child {
    margin-bottom: 0;
}

/* Product Images Container - Fourth (2 images side by side) */
.scr-qv-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    order: 4;
}
.scr-qv-images img {
    background-color: #ededed;
}

.scr-qv-images .scr-qv-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

/* Size Variations & Add to Cart - Fifth */
.scr-qv-details {
    width: 100%;
    order: 5;
}

/* ====================================
   SIZE SELECTOR IN MODAL
   ==================================== */
.scr-qv-attribute {
    margin-bottom: 20px;
}

/* Size buttons will use existing variation_radio_buttons styles */
.scr-qv-variations-form .scr_sizeoptions {
    margin-bottom: 20px;
}

.scr-qv-variations-form .scr_sizeoptions label {
    /* Mobile optimized size buttons */
    height: 45px;
    line-height: 45px;
    font-size: 18px;
    margin-bottom: 10px;
}

/* ====================================
   QUANTITY & ADD TO CART
   ==================================== */
.scr-qv-variations-form .variations_button {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0px;
}

.scr-qv-variations-form .quantity {
    width: 100%;
}
.quickview_add_to_cart_button{
    margin: 0px !important;
    height: 36px !important;
    line-height: 0px !important;
    font-size: 1.6rem;
}
.quickview_add_to_cart_button:disabled[disabled]{
    cursor: not-allowed;
    opacity: .5;
}

/* Custom Quantity Wrapper - Matches mini-cart style */
.scr-qv-qty {
    display: flex;
    align-items: center;
    height: 38px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.scr-qv-qty .custom-qty-btn {
    background-color: #333333;
    color: #ffffff;
    border: none;
    width: 32px;
    height: 43px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.scr-qv-qty .custom-qty-btn:hover {
    background-color: #97262c;
}

.scr-qv-qty .custom-qty-btn:active {
    background-color: #7a1f25;
}

.scr-qv-qty-input {
    flex: 1;
    border: none !important;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    background-color: #fff;
    outline: none;
    -moz-appearance: textfield;
    height: 45px !important;
    padding: 0 !important;
}

.scr-qv-qty-input::-webkit-outer-spin-button,
.scr-qv-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.scr-qv-variations-form .single_add_to_cart_button {
    width: 100%;
    padding: 16px 24px !important;
    background-color: #97262c;
    color: #ffffff;
    border: none;
    font-size: 18px !important;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: auto !important;
    margin-top: 0 !important;
}

.scr-qv-variations-form .single_add_to_cart_button:hover {
    background-color: #7a1f25;
}

.scr-qv-variations-form .single_add_to_cart_button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* ====================================
   FULL DETAILS LINK
   ==================================== */
.scr-qv-full-details {
    display: inline-block;
    margin-top: 20px;
    color: #333333;
    text-decoration: underline;
    font-size: 16px;
    padding: 10px 0;
}

.scr-qv-full-details:hover {
    color: #97262c;
}

/* ====================================
   VARIATION INFO
   ==================================== */
.scr-qv-variations-form .single_variation {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.scr-qv-variations-form .single_variation .woocommerce-variation-price {
    font-size: 20px;
    font-weight: 600;
    color: #97262c;
    margin-bottom: 8px;
}

.scr-qv-variations-form .single_variation .woocommerce-variation-availability {
    font-size: 14px;
    color: #666;
}

/* ====================================
   TABLET & DESKTOP BREAKPOINT
   ==================================== */
@media (min-width: 768px) {
    .scr-qv-content {
        max-width: 500px;
        width: 500px;
    }

    .scr-qv-product {
        gap: 20px;
    }

    .scr-qv-title {
        font-size: 26px;
    }

    .scr-qv-price p.price {
        font-size: 26px;
    }

    .scr-qv-price p.price del {
        font-size: 22px;
    }

    .scr-qv-description {
        font-size: 15px;
    }

    .scr-qv-images {
        gap: 12px;
    }

    .scr-qv-variations-form .variations_button {
        flex-direction: row;
        align-items: center;
    }

    .scr-qv-variations-form .quantity {
        width: 100px;
        flex-shrink: 0;
    }

    .scr-qv-variations-form .single_add_to_cart_button {
        flex: 1;
    }

}
@media only screen and (max-width: 767px) {
    .scr-qv-variations-form .scr_sizeoptions {
        margin-bottom: 0px !important;
    }
}

/* ====================================
   LARGE DESKTOP
   ==================================== */
@media (min-width: 1024px) {
    .scr-qv-content {
        max-width: 550px;
        width: 550px;
    }
}

/* ====================================
   PREVENT BODY SCROLL WHEN MODAL OPEN
   ==================================== */
body.scr-qv-modal-open {
    overflow: hidden;
}

/* ====================================
   WOOCOMMERCE NOTICES IN MODAL
   ==================================== */
.scr-qv-product-content .woocommerce-message,
.scr-qv-product-content .woocommerce-error {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.scr-qv-product-content .woocommerce-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scr-qv-product-content .woocommerce-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
