/* ========== MAIN MODAL STYLES ========== */
.product-quick-view-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-quick-view-popup-content {
    position: relative;
    background: #fff;
    width: 1140px;
    margin: 20px auto;
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow: hidden;
}

/* Scrollbar styling */
.product-quick-view-popup-content::-webkit-scrollbar {
    width: 6px;
}
.product-quick-view-popup-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 20px 0;
}
.product-quick-view-popup-content::-webkit-scrollbar-thumb {
    background: #AA2D4B;
    border-radius: 10px;
}

/* Modal body - flex container */
.modal-body {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 100%;
    max-height: 80vh;
}

/* ========== LEFT COLUMN – IMAGE (STICKY) ========== */
.popup-product-image {
    width: 50%;
    position: relative;
    z-index: 5;
    overflow: hidden;
    padding: 10px;
    display: flex;
    align-items: flex-start;
}

.popup-product-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    position: sticky;
    top: 10px;
    border-radius: 6px;
}

/* ========== RIGHT COLUMN – PRODUCT DETAILS ========== */
.popup-product-details-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar styling for right column */
.popup-product-details-container::-webkit-scrollbar {
    width: 6px;
}
.popup-product-details-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 20px 0;
}
.popup-product-details-container::-webkit-scrollbar-thumb {
    background: #AA2D4B;
    border-radius: 10px;
}

.popup-product-details {
    display: flex;
    flex-direction: column;
	    flex: 1;               /* takes all remaining vertical space */
    padding: 20px;
	gap: 10px;
}

/* Product header (original) – kept for compatibility */
.popup-product-details .product-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.popup-product-details .product-details-header span {
    padding: 10px;
    background: #f0bfc5;
    color: #aa2d4b;
    border-radius: 5px;
}

/* Grouped quantity wrapper (for variations) */
.grouped-qty-wrapper {
    display: flex;
    width: fit-content;
    border: none;
    margin-top: 12px;
    margin-bottom: 12px;
}
.grouped-qty-wrapper button,
.quantity-wrapper button {
    border: none;
    padding: 3px 5px 7px 5px;
    font-size: 24px !important;
    font-weight: 600;
    color: #000000 !important;
    background: #00595900 !important;
    height: auto;
    line-height: 0;
    border-radius: 200px;
}
button.minus-grouped-qty {
    padding: 3px 8px 7px 8px;
}
.grouped-qty-wrapper input,
.quantity-wrapper input.qty-input {
    font-size: 15px;
    font-weight: 800;
    padding: 0 !important;
    text-align: center;
    border: none !important;
    background: transparent;
    color: #005959;
    margin-bottom: 5px;
}

/* Original product title */
.popup-product-details h2 {
    font-size: 28px;
    font-family: 'Roboto';
    color: #111;
    margin-top: 10px;
    margin-bottom: 10px;
}

.description-and-ingredients {
    color: #666666;
    font-size: 14px;
    margin: 5px 0 15px;
    font-family: 'Poppins', sans-serif;
}

/* Original price element – kept */
.popup-product-details .price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    font-family: 'Poppins';
    margin-bottom: 10px;
}

/* ========== CLOSE BUTTON ========== */
.close-popup,
.close-popup-reviews {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    background: #AA2D4B;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transition: all 0.3s ease;
    z-index: 9;
}
.close-popup:hover,
.close-popup-reviews:hover {
    background: #7f2238;
}

/* ========== VARIATIONS & ADDONS ========== */
.variation-item label.checkbox-container {
    padding: 12px;
    cursor: unset;
}
.variation-checkboxes {
    margin: 15px 0;
}
.variation-item {
    background: white;
    border: 1px solid #ececec;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
input[type="radio"]:checked,
input[type="checkbox"]:checked {
    accent-color: #aa2b4d;
}
.variation-item.selected {
    border: 2px solid #444;
}
span.variation-price {
    display: flex;
    justify-content: flex-end;
}

/* Product addons */
.product-addons-container:empty {
    margin: 0;
}

.product-addons-container {
    max-width: 600px;    
}
.product-addons-group {
    margin-bottom: 15px;
    border-radius: 6px;
}
.addon-group-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}
.product-addons-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.product-addon-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f1f1f1;
    border-radius: 4px;
}
.product-addon-checkbox {
    accent-color: #0073e6;
    transform: scale(1.2);
}
.addon-name {
    font-size: 16px;
    font-weight: 500;
    flex-grow: 1;
}
.addon-price {
    font-size: 14px;
    font-weight: bold;
    color: #aa2b4d;
}

/* ========== QUANTITY CONTROLS (ORIGINAL) ========== */
.quantity-wrapper {
    display: flex;
    align-items: center;
    border-radius: 30px;
    overflow: hidden;
    height: 42px;
    background: transparent;
    padding: 5px;
    border: 1px solid #ececec;
}
.minus-qty,
.plus-qty {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #005959;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.qty-input {
    width: 40px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    color: #005959;
    background: transparent;
    font-weight: 600;
}

/* ========== ADD TO CART BUTTON (ORIGINAL) ========== */
.add-to-cart-popup {
    width: 100%;
    height: auto;
    background: #AA2D4B !important;
    color: white;
    border: none;
    border-radius: 43px !important;
    font-size: 16px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 15px 30px;
    font-family: 'Poppins', sans-serif;
    white-space: inherit !important;
}
.add-to-cart-popup:hover {
    background: #7f2238 !important;
    color: white !important;
}
.add-to-cart-popup:disabled {
    cursor: wait !important;
}

/* Original add-to-cart container – HIDDEN (we use new layout) */
.add-to-cart-container {
    display: none !important;
}

/* ========== NEW LAYOUT ELEMENTS (ADDED, NOT MODIFYING EXISTING) ========== */
/* Product header meta */

.product-name-stock {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}
.product-name-stock h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 0;
    font-family: 'Roboto';
}
.stock-status-badge {
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 15px;
}
.stock-status-badge.in-stock {
    background: #d4edda;
    color: #155724;
}
.stock-status-badge.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* Product rating and brand */
.product-rating-brand {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.product-rating-stars {
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-rating-stars i {
    color: #333;
    font-size: 16px;
}
.rating-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-top: 2px;
}
.product-brand-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* Product price with discount */

.price-comparison {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}
.current-price {
    font-size: 28px;
    color: #111;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}
.discount-percentage {
    background: #fbc6c6;
    color: #ec4341;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
}

/* Quantity with "Add to Cart" label */
.quantity-addtocart-wrapper {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;        /* Stretches to full width of the positioned container */
  box-sizing: border-box; /* Ensures padding/border are included in the width */
   /* Your other styles */
  background-color: #f7f4f4;
  z-index: 10;
  padding-top: 15px;
  padding-bottom: 15px;
  border-top: 1px solid #eee;
	border-radius: 10px 10px 0px 0px;
}

.quantity-addtocart-wrapper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

.quantity-with-label {
    display: flex;
    align-items: center;
    gap: 20px;
	padding: 0px 10px;
}
.quantity-with-label .quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 50px;
}
.quantity-with-label .minus-qty,
.quantity-with-label .plus-qty {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ececec !important;
    border: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}
.quantity-with-label .minus-qty:hover,
.quantity-with-label .plus-qty:hover {
    background: #f0f0f0;
}
.quantity-with-label .qty-input {
    width: 50px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    color: #333;
    background: transparent;
    font-weight: 600;
    padding: 0;
}
.add-to-cart-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Product additional info (category, ingredients) */
.product-additional-info {
	padding-top:5px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.info-line {
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
}
.info-title {
    font-weight: 600;
    color: #333;
}
.info-detail {
    color: #666;
    flex: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
	.product-quick-view-popup-content{
		width: 90%;
		max-height: 80vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		position: relative;
		padding-bottom: 70px; /* Space for fixed quantity wrapper */
	}
    .modal-body {
        flex-direction: column;
		max-height: none;
		flex: 1;
		overflow-y: auto;
		overflow-x: hidden;
    }
    .popup-product-image,
    .popup-product-details-container {
        width: 100%;
    }
    .popup-product-image {
        padding: 10px;
        position: relative !important;
        top: auto;
		flex-shrink: 0;
    }
	.popup-product-image img{
		height: auto !important;
		width: 94%;
		position: relative;
		top: auto;
		object-fit: contain;
	}
	.popup-product-details-container {
		max-height: none;
		overflow-y: visible;
	}
    .popup-product-details {
        padding: 10px;
		padding-bottom: 10px;
    }
    .product-name-stock {
        flex-direction: row;
        align-items: flex-start;
justify-content: space-between;
        gap: 10px;
    }
	.product-name-stock h2{
	  font-size: 22px	
	}
    .stock-status-badge {
        margin-left: 0;
        align-self: flex-start;
		font-size: 12px;
		padding: 8px;
    }
	.product-rating-brand{
		justify-content: space-between;
	}
	.product-rating-stars{
		gap:5px;
	}
	.product-rating-stars i {
		font-size: 12px;
	}
	.product-brand-name, .discount-percentage,.stock-status-badge{
		font-size:12px;
		padding: 4px;
	}
    .addon-group-title {
        margin-top: 0;
    }
    .product-title {
        font-size: 24px;
    }
	.price-comparison{
		gap: 10px;
		justify-content: space-between;
	}
    .current-price, .original-price {
        font-size: 14px;
    }
	.popup-product-details .description {
		font-size: 14px;
	}
	.quantity-wrapper{
		padding: 0 10px;
	}
	/* Fixed to bottom of modal on mobile */
	.quantity-addtocart-wrapper{
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 10px;
		margin: 0;
		width: 100%;
		border-radius: 0;
		box-sizing: border-box;
	}
	.quantity-addtocart-wrapper::before {
		display: none;
	}
	.quantity-with-label {
        flex-direction: row;
        gap: 15px;
    }
    .quantity-with-label .quantity-controls {
        width: 100%;
        justify-content: center;
    }
	.quantity-with-label .minus-qty, .quantity-with-label .plus-qty{
		height: 30px; width: 30px;
	}
	
    .add-to-cart-popup  {
		padding: 10px;    }
    .add-to-cart-popup span {
       font-size: 14px;
    }
}

/* ========== MISCELLANEOUS ========== */
.popup-custom-field {
    margin: 15px 0;
}
.popup-custom-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.popup-custom-field input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.popup-custom-field input[type="text"]:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}