@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Momo+Trust+Display&display=swap');

@font-face {
    font-family: 'Super Joyful';
    src: url('Super_Joyful.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


:root {
    --primary-color: #ff6f4e; /* Orange from image */
    --secondary-color: #4CAF50; /* Green from image */
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #ddd;
    --background-color: #f8f8f8;
    --card-background: #fff;
    --shadow: 0 4px 8px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background-color: var(--card-background);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Needed for absolute positioning of elements inside */
}

.logo {
    font-family: 'Super Joyful', cursive; /* Fallback to cursive if not loaded */
    font-weight: 700;
    font-size: 2.4em;
    color: var(--primary-color);
}

.trust-pilot-badge {
    margin-left: auto; /* Push to the right */
    display: flex;
    align-items: center;
}

.trust-pilot-badge img {
    height: 42px; /* Default height */
    width: auto;
    display: block;
}

.proof-image-container {
    text-align: center;
    margin: 20px 0;
    padding: 0 20px; /* Add padding for smaller screens */
}

.proof-image {
    max-width: 40%;
    height: auto;
    display: block;
    margin: 0px auto -20px auto;
    border: 4px solid #00b67a;
    border-radius: 15px;
}

.product-page {
    padding: 20px 0;
}

.product-container {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.product-images {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fdfaf7; /* Light background from image */
}

.main-image-wrapper {
    width: 100%;
    max-width: 500px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail-images img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 111, 78, 0.5);
}

.product-details {
    flex: 1;
    min-width: 350px;
    padding: 30px;
}

.product-rating-section {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.stars-display {
    color: #FFC107; /* Star color */
    font-size: 0.9em;
    margin-right: 5px;
}

.stars-display .fas {
    color: #e0e0e0; /* Default star color */
}

.stars-display .fas.filled {
    color: #FFC107; /* Filled star color */
}

.reviews-count {
    font-size: 0.9em;
    color: var(--light-text-color);
}

.product-title {
    font-size: 2em;
    font-weight: 400;
    margin-bottom: 10px; /* Adjusted margin */
    color: var(--text-color);
    font-family: "Momo Trust Display", sans-serif;
}

.promo-badge {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.product-price-section {
    margin-bottom: 20px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.product-price .current-price {
    font-size: 2.5em; /* Larger font size */
    font-weight: 400; /* Bolder */
    color: var(--primary-color); /* Primary color */
    line-height: 1; /* Adjust line height for better alignment */
    font-family: "Momo Trust Display", sans-serif;
}

.product-price .old-price {
    font-size: 1.2em; /* Larger than previous, but smaller than current */
    color: var(--light-text-color); /* Lighter grey for old price */
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 10px; /* Add some space */
    font-family: "Momo Trust Display", sans-serif;
}

.shipping-info {
    font-size: 0.9em;
    color: var(--secondary-color);
    font-weight: 500;
}

.countdown-timer {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Changed to center */
    gap: 10px;
    margin-bottom: 20px;
}

.countdown-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px; /* Added margin */
}

.timer-boxes {
    display: flex;
    gap: 10px;
    width: 100%; /* Make full width */
    justify-content: space-around; /* Distribute items */
}

.timer-box {
    background-color: var(--card-background);
    padding: 8px 12px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
    flex-grow: 1; /* Allow boxes to grow */
    min-width: 60px;
}

.timer-box span:last-child {
    display: block;
    font-size: 0.7em;
    font-weight: 400;
    color: var(--light-text-color);
}

.product-description-wrapper {
    margin-bottom: 25px;
}

.product-description {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin-bottom: 15px; /* Adjusted margin */
}

.product-description.hidden {
    display: none;
}

.show-more-button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    padding: 0;
    text-decoration: underline;
}

.show-more-button:hover {
    color: #e65a3d;
}

.product-features h2,
.product-variants h2 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-features ul {
    list-style: none;
    margin-bottom: 25px;
}

.product-features li {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-features li .fas {
    color: var(--secondary-color);
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.variant-button {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-color);
    transition: all 0.2s ease-in-out;
}

.variant-button:hover,
.variant-button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.buy-now-button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    max-width: 300px; /* Default max-width */
    margin-bottom: 30px;
    transition: background-color 0.2s ease-in-out;
}

.buy-now-button.full-width {
    max-width: 100%; /* Make it full width when this class is applied */
}

.buy-now-button:hover {
    background-color: #e65a3d;
}

.guarantees {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.guarantees div {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85em;
    color: var(--light-text-color);
    text-align: center;
}

.guarantees div .fas {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
    }

    .product-images,
    .product-details {
        min-width: unset;
        width: 100%;
    }

    .product-details {
        padding: 20px;
    }

    /* Hide desktop header elements on mobile */
    .product-header-desktop {
        display: none;
    }

    /* Show mobile header elements on mobile */
    .product-header-mobile {
        display: block; /* Or flex, depending on desired layout */
        padding: 20px; /* Add some spacing */
        margin-bottom: -25px;
    }

    .product-title {
        font-size: 1.8em;
    }

    .product-price .current-price {
        font-size: 2em; /* Adjusted for mobile */
    }

    .product-price .old-price {
        font-size: 1em; /* Adjusted for mobile */
    }

    .buy-now-button {
        max-width: 100%;
    }

    .proof-image {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0px auto -20px auto;
        border: 2px solid #00b67a;
        border-radius: 15px;
    }   
}

/* Specific styles for desktop to hide mobile header and show desktop header */
@media (min-width: 769px) {
    .product-header-mobile {
        display: none;
    }

    .product-header-desktop {
        display: block; /* Or flex */
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }

    .trust-pilot-badge img {
        height: 18px; /* Further adjust height for smaller mobile */
    }
    .logo {
        font-size: 1.5em;
    }

    .trust-pilot-badge img {
        height: 20px; /* Adjust height for mobile */
    }

    .product-title {
        font-size: 1.5em;
    }

    .product-price .current-price {
        font-size: 1.8em; /* Further adjusted for smaller mobile */
    }

    .product-price .old-price {
        font-size: 0.9em; /* Further adjusted for smaller mobile */
    }

    .guarantees {
        flex-direction: column;
        align-items: center;
    }
}

/* Trust Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: -20px !important;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #ddd;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-header .fa-lock {
    font-size: 2em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.5em;
    color: var(--text-color);
}

.modal-body p {
    font-size: 1em;
    color: var(--light-text-color);
    margin-bottom: 20px;
}

.payment-info, .shipping-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.payment-info .card-logos {
    max-width: 120px;
}

.shipping-info .fa-truck {
    font-size: 1.8em;
    color: var(--primary-color);
}

.acceptance-section {
    margin-top: 20px;
    text-align: center;
}

.checkbox-container {
    display: inline-block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 1em;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--secondary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
}

#confirm-purchase-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Modal Guarantees Styling */
.modal-guarantees {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-top: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px; /* Space between items */
}

.modal-guarantees div {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8em;
    color: var(--light-text-color);
    text-align: center;
    flex: 1; /* Distribute space equally */
    min-width: 80px; /* Minimum width for each guarantee item */
}

.modal-guarantees div .fas {
    font-size: 1.2em; /* Smaller icons for modal */
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* Payment Overlay Styles */
.payment-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Higher than modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white background */
    /* display: flex; - This will be controlled by JavaScript */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    font-family: 'Stripe Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.payment-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    max-width: 350px;
    width: 90%;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stripe-logo-wrapper {
    position: relative;
    width: 120px; /* Adjust based on desired size of stripe logo + padding for circle */
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.stripe-logo {
    width: 80px; /* Smaller to fit inside the circle area */
    height: 80px; /* Make it square */
    border-radius: 50%; /* Make it rounded */
    object-fit: contain; /* Ensure the image fits without distortion */
    background-color: #fff; /* Ensure white background for rounded logo */
    padding: 5px; /* Small padding inside the circle */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1; /* Ensure logo is above the circle */
}

.loader-circle {
    position: absolute;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #635bff; /* Stripe's primary blue */
    border-radius: 50%;
    width: 100px; /* Larger than logo to appear around it */
    height: 100px;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    /* Removed margin-bottom as it's absolutely positioned within wrapper */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.payment-text {
    font-size: 1.1em;
    color: #303238;
    font-weight: 500;
    line-height: 1.5;
    /* margin-top: 15px; - Removed as it's now inside payment-loader */
}

/* Responsive adjustments for payment overlay */
@media (max-width: 600px) {
    .payment-loader {
        padding: 20px;
        width: 95%;
    }

    .stripe-logo-wrapper {
        width: 100px; /* Increased wrapper size for mobile */
        height: 100px;
        margin-bottom: 15px; /* Adjust margin for mobile */
    }

    .stripe-logo {
        width: 70px; /* Adjusted logo size for mobile */
        height: 70px;
        padding: 3px;
    }

    .loader-circle {
        width: 80px; /* Increased circle size for mobile */
        height: 80px;
        border-width: 4px;
    }

    .payment-text {
        font-size: 1em;
    }
}
