/* =========================================
   1. VILLA ADD-ONS GRID
   ========================================= */

.edra-addons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 34px;
    
    max-width: 1086px;
    margin: 4rem auto 0;
	width: 90%;
}





.edra-addon-item {
    position: relative;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    
    max-width: 190px;  
    transition: transform 0.3s ease;
}

.edra-addon-inner {
    width: 100%;
    height: 100%;
    position: relative;

		border-radius: 21%;
	background-color: #F8F1EE;

}

.edra-addon-base {
	width: 100%;
	height: 100%;
    text-align: center;
    padding: 15px;
    transition: opacity 0.3s ease, transform 0.3s ease;
	
	  display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
	
}

.edra-info-icon {
	position: absolute;
pointer-events: none;
top: 10%;
	right: 10%;
}

.edra-addon-icon {
    width: 50%;
    height: auto;
	max-width: 80px;
    display: block;
	aspect-ratio: 4 / 3;
	margin: 10% auto;
	flex-shrink: 0;
}

.edra-addon-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.edra-addon-title {
    margin: 0;

	min-height: 42px;
}

.edra-addon-title h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    color: #4C333A;
    font-weight: 500;
    line-height: 1.2;
}

.edra-addon-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--e-global-color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease-in;
    z-index: 2;
	border-radius: inherit;
}

.know-more-text {
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 16px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.know-more-text svg {
	display: block;
	width: 11px;
	height: 11px;
}

.edra-addon-item:hover {
   transform: scale(1.1);
}

.edra-addon-item:hover .edra-addon-hover {
    opacity: 1;
}

@media (max-width: 1080px) {
  .edra-addons-grid {
		margin-top: 3rem;
		grid-template-columns: repeat(3, 1fr);
		max-width: 640px;
		width: 80%;
		 gap: 30px;
	
	}
	
	 
}

@media (max-width: 767px) {
    .edra-addons-grid {
grid-template-columns: repeat(2, 1fr); gap: 20px;
	margin-top: 2rem;
		max-width: 410px;
		width: 90%;
			 }
}


@media (max-width: 600px) {
  .edra-addons-grid { 
		gap: 20px;
	
		width: 90%;
	}
}


/* =========================================
   2. CUSTOM MODAL POPUP
   ========================================= */

.edra-modal {
    position: fixed;
    inset: 0;
    z-index: 888888;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.edra-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.edra-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(45, 30, 35, 0.85); /* Dark burgundy overlay */
    cursor: pointer;
}

.edra-modal-dialog {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 580px;
    border-radius: 32px;
    padding: 60px 20px 50px 50px;
    z-index: 2;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);

    /* --- NEW SCROLL LOGIC --- */
    max-height: calc(100vh - 140px); /* Restricts height to viewport minus header & safe gap */
    margin-top: 70px; /* Pushes the modal down to clear the top menu bar */
    display: flex;
    flex-direction: column;
}

.edra-modal.is-open .edra-modal-dialog {
    transform: translateY(0) scale(1);
}

.edra-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 10; /* Ensures it stays above scrolling content */
}

.edra-modal-close:hover {
	background-color: transparent;
	color: #995277;
}

/* --- THE SCROLLABLE AREA --- */
.edra-modal-content {
    overflow-y: auto; /* Enables vertical scrolling */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for older iPhones */
    padding-right: 30px; /* Tiny buffer so text doesn't touch the scrollbar */
    
    /* Custom scrollbar styling (optional, looks cleaner) */
    scrollbar-width: thin;
    scrollbar-color: #F0D9D1 transparent;
}

.edra-modal-content::-webkit-scrollbar {
    width: 6px;
}
.edra-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.edra-modal-content::-webkit-scrollbar-thumb {
    background-color: #F0D9D1;
    border-radius: 10px;
}

.edra-modal-title {
    color: #4C333A;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: inherit;
}

.edra-modal-desc {
    color: #4C333A;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 35px;
    font-weight: 400;
}

.edra-modal-divider {
    height: 1px;
    background: #F0D9D1;
    width: 85%;
    margin: 0 auto 35px auto;
}

.edra-modal-question {
    color: #4C333A;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
}

.edra-modal-subquestion {
    color: #4C333A;
    font-size: 16px;
    margin-bottom: 30px;
}

.edra-modal-btn {
    display: inline-block;
    background: #E78159;
    color: #ffffff;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: background 0.3s ease, transform 0.2s ease;
    /* Ensure the button doesn't shrink when flexbox gets tight */
    flex-shrink: 0; 
}

.edra-modal-btn:hover {

    transform: scale(1.1);
	color: #FFF;
}

.edra-modal-footer {
    padding-bottom: 10px; /* Gives the button room to scale without triggering the scrollbar */
}

/* Prevents background page from scrolling when modal is open */
body.edra-modal-prevent-scroll {
    overflow: hidden;
}

/* Mobile Tweaks */
@media (max-width: 767px) {
	
	.edra-modal-content {
    overflow-y: auto; /* Enables vertical scrolling */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for older iPhones */
    padding-right: 10px;
	}
    .edra-modal-dialog {
        padding: 40px 15px 30px 25px; /* Reduced top padding slightly for more reading room */
        max-height: calc(100vh - 100px); 
        margin-top: 80px; 
    }
    
    .edra-modal-subquestion {
        margin-bottom: 20px;
    }
    
    .edra-modal-divider,
    .edra-modal-desc {
        margin-bottom: 25px;
    }
}