body.gg-modal-open {
    overflow: hidden;
}

.gg-modal .button-alt {
    background-color: transparent;
    border: 2px solid #000;
    color: #000;
}

.gg-modal .button-alt:hover {
    background-color: #000;
    color: #fff;
}

/* Modal styles */
.gg-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
}

.gg-modal-content {
    position: absolute;
    background-color: #fff;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s;
    display: flex;
    flex-direction: column;
}

.gg-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    position: relative;
    z-index: 1000;
}

.gg-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.gg-close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.gg-close-modal:hover {
    color: #000;
}

.gg-modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Layout for preview and customization */
.gg-modal-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
}

.gg-preview-container {
    flex: 4;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    align-items: center;
    border-right: 1px solid #ddd;
}

.gg-customization-container {
    flex: 2;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.gg-customization-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}

.gg-customization-fields {
    margin-bottom: 20px;
}

/* Customization fields styling */
.gg-customization-field {
    margin-bottom: 15px;
}

.gg-customization-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.gg-customization-field input,
.gg-customization-field textarea,
.gg-customization-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gg-customization-field input.error,
.gg-customization-field textarea.error,
.gg-customization-field select.error {
    border-color: #e53e3e;
}

/* Thumbnails */
.gg-preview-thumbnails {
    display: flex;
    width: 100%;   
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
}

.gg-preview-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    object-fit: cover;
    transition: border-color 0.2s ease;
}

.gg-preview-thumbnail:hover {
    border-color: #666;
}

.gg-preview-thumbnail.active {
    border-color: #2c3e50;
}

.gg-preview-slider {
    position: relative;
    width: 100%;
    flex: 1;
    background-color: #f7f7f7;
    height: calc(100vh - 200px); /* Account for header, thumbnails, and some padding */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Slides */
.gg-preview-slides {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gg-preview-slide {
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.gg-preview-slide img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.gg-customized-slide {
    position: relative;
    height: 100%;
    width: 100%;
}

.gg-customized-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 99;
    padding: 12% 10% 15% 10%; /* Adjusted padding to match template sections */
    box-sizing: border-box;
}

.gg-birthday-person {
    font-size: clamp(16px, 3vw, 21px);
    top: 10%;
}

.gg-birthday-person::before {
    content: "To: ";
    display: inline-block;
    font-size: 1em;
    margin-right: 5px;
    font-weight: bold;
}

.gg-personal-message {
    font-size: clamp(14px, 2.5vw, 18px);
    line-height: 1.4;
    top: 36%;
}

.gg-from-name {
    font-size: clamp(16px, 3vw, 21px);
    top: 69%;
}

.gg-from-name::before {
    content: "From: ";
    display: inline-block;
    font-size: 1em;
    margin-right: 5px;
    font-weight: bold;
}

/* Remove background and border styling */
.gg-birthday-person,
.gg-personal-message,
.gg-from-name {
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 0 4rem;
    color: #000;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff; /* White outline for better readability */
}

/* Navigation buttons */
.gg-preview-prev,
.gg-preview-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    width: 50px;
    height: 50px;
    text-align: center;
    z-index: 100;
}

.gg-preview-prev {
    left: 20px;
}

.gg-preview-next {
    right: 20px;
}

.gg-preview-prev:hover,
.gg-preview-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Product info */
.gg-preview-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.gg-preview-price {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #333;
}

/* Buttons */
.gg-preview-button {
    margin-top: 10px;
}

.gg-back-button,
.gg-checkout-button {
    padding: 12px 24px;
    margin-left: 10px;
    font-size: 16px;
}

.gg-checkout-button {
    background-color: #2c3e50;
    color: white;
}

.gg-checkout-button:hover {
    background-color: #1a2530;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive layout */
@media (max-width: 768px) {
    .gg-modal-layout {
        flex-direction: column;
    }
    
    .gg-preview-container {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .gg-preview-slider {
        height: 60vh;
    }
    
    .gg-preview-slide img {
        max-height: 60vh;
    }
    
    .gg-customization-container {
        padding: 15px;
    }
    
    .gg-preview-thumbnails {
        padding: 10px;
    }
    
    .gg-preview-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .gg-preview-prev,
    .gg-preview-next {
        width: 40px;
        height: 40px;
        padding: 10px;
    }
    
    .gg-preview-prev {
        left: 10px;
    }
    
    .gg-preview-next {
        right: 10px;
    }
    
    .gg-modal-header {
        padding: 10px;
    }
    
    .gg-back-button,
    .gg-checkout-button {
        margin: 0 5px;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .gg-customized-overlay {
        padding: 10% 5% 12% 5%;
    }
    
    .gg-personal-message {
        width: 95%;
    }
    
    .gg-birthday-person,
    .gg-from-name {
    }
} 