@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

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

:root {
    --background-color: var(--primary-color);
    --text-color: rgba(255, 255, 255, 0.9);
    --card-background-color: var(--tertiary-color);
    --box-shadow-color: rgba(0, 0, 0, 0.5);
    --icon-color: white;
    --border-color: rgba(255, 255, 255, 0.2);
    --secondary-text-color: rgba(163, 174, 208, 1);
    --icon-container-bg-color: var(--primary-color);
    --icon-color: white;
    --select-background: rgba(81, 88, 255, 0);
    --select-text-color: white;
    --select-focus-background: var(--secondary-color);
    --cart-modal-background: var(--secondary-color);
    --cart-content-background: var(--tertiary-color);
    --cart-content-text-color: white;
    --cart-item-actions-background: rgba(255, 255, 255, 0.2);
    --cart-item-actions-text-color: white;
    --cart-item-actions-span-background: rgba(255, 255, 255, 0.2);
}

body.light-mode {
    --background-color: #E2E8F0;
    --text-color: #333333;
    --card-background-color: #ffffff;
    --box-shadow-color: #cccccc;
    --icon-color: #333333;
    --border-color: #cccccc;
    --secondary-text-color: #666666;
    --icon-container-bg-color: white;
    --icon-color: #333333;
    --select-background: white;
    --select-text-color: #333333;
    --select-focus-background: #E2E8F0;
    --cart-modal-background: white;
    --cart-content-background: white;
    --cart-content-text-color: #333333;
    --cart-item-actions-background: #E2E8F0;
    --cart-item-actions-text-color: #333333;
    --cart-item-actions-span-background: white;
}

body {
    font-family: "Poppins", sans-serif !important;
    font-size: 14px;
    background-color: var(--primary-color) !important;
    color: var(--text-color);
    line-height: 1.5;
}

input, button {
    font-family: "Poppins", sans-serif !important;
}

/* Navbar */
.navbar {
    display: flex;
    padding: 30px 150px;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 998;
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: padding 0.3s ease;
}

.logo {
    margin-left: 100px;
    height: 55px;
}

#logo {
    height: 100%;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    font-size: 26px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    height: 45px;
}

.icon:hover {
    color: rgba(81, 88, 255, 1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
}

/* Mobile styles */
@media (max-width: 768px) {
    .navbar {
        padding: 20px !important;
        justify-content: center;
        align-items: center;
    }

    .navbar h1 {
        font-size: 24px;
    }

    .logo {
        margin-left: 0;
        flex: 1;
        text-align: center;
    }

    .icon {
        position: absolute;
        right: 30px;
        font-size: 22px;
        height: 30px;
    }
}

/* Navbar End */

/* Title Section */
.title-section {
    height: 400px;
    position: relative;
    padding: 0px 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
}

.title-section::before,
.title-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1.5s ease-in-out;
    z-index: -2;
}

.add-ons-bg::after {
    background-image: url('/static/img/add-ons.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.upgrades-bg::after {
    background-image: url('/static/img/upgrades.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.experiences-bg::after {
    background-image: url('/static/img/experiences.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.title-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.title .greeting {
    font-size: 50px;
    font-weight: bold;
}

.back-button {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    border: 2px solid white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth transitions */
    margin-top: 25px;
    font-size: 16px;
    font-weight: bold;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.back-arrow {
    margin-right: 12px;
    font-size: 24px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .title-section {
        padding: 20px 40px;
    }

    .title .greeting {
        font-size: 35px;
    }
    
    .back-button {
        margin-top: 20px;
        font-size: 15px;
    }

    .back-arrow {
        font-size: 19px;
    }
}
/* Title Section End */

/* Main */
.main {
    padding: 70px 100px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.main h1 {
    font-weight: bold;
}

.products {
    display: flex;
    flex-direction: row;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    color: black;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px var(--box-shadow-color);
    transition: transform 0.3s ease;
    flex: 1 1 calc(33.333% - 25px);
    min-width: calc(33.333% - 25px);
    max-width: calc(33.333% - 25px);
}

.product-item .title {
    font-weight: bold;
    font-size: 18px;
}

.product-image-container {
    position: relative;
    margin: 15px 0;
}

.discount-label {
    position: absolute;
    background-color: var(--tertiary-color);
    color: white;
    display: flex;
    align-items: center;
    padding: 13px 20px;
    border-top-left-radius: 5px;
    border-bottom-right-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
    gap: 7px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
}

.discount-label.hidden {
    display: none;
}

.product-image {
    border-radius: 10px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.discount-container {
    display: flex;
    justify-content: flex-end;
    font-size: 13px;
    align-items: center;
    /* margin-bottom: 12px; */
}

.discount-container.hidden {
    display: none !important;
}

.discount {
    background-color: var(--tertiary-color);
    color: white;
    padding: 3px 5px;
    font-size: 13px;
    font-weight: bold;
}

.duration {
    display: flex;
    gap: 5px;
}

.duration i {
    font-size: 18px;
    color: black;
}

.product-item .description {
    font-size: 15px;
}

#notes {
    margin-top: 15px;
}

.product-item .description ul {
    margin-left: 20px;
}

.products .bottom {
    padding-top: 10px;
}

.discount-info-container {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    margin-bottom: 5px;
}

.discount-info-container.hidden {
    display: none;
}

.discount-info-container .percentage {
    flex: 1;
    color: var(--tertiary-color);
    font-weight: 500;
    font-size: 16px;
}

.discount-info-container .code {
    flex: 1;
    color: gray;
    font-weight: 500;
    text-align: right;
    font-size: 16px;
}

.discount-info-container .code i {
    flex: 1;
    color: var(--tertiary-color);
}

#initial-price {
    text-decoration: line-through;
}

.price-container {
    display: flex;
    margin-top: 5px;
    justify-content: space-between;
    font-size: 13px;
    align-items: center;
    margin-bottom: 12px;
}

.price-container > div:first-child {
    display: flex;
    gap: 5px;
    align-items: baseline;
}

.price {
    font-size: 25px;
    font-weight: bold;
}

.stock {
    font-size: 14px;
    color: #73c8fa;
}

.quantity-container {
    display: flex;
    gap: 12px;
    border: gray 1px solid;
    border-radius: 10px;
    padding: 6px 10px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: small;
}

.decrement, .increment {
    border-radius: 50%;
    width: 17px;
    height: 17px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.decrement:hover, .increment:hover {
    cursor: pointer;
}

.increment {
    background-color: lightgray;
}

#add-to-cart-btn {
    background-color: #22049b;
    color: white;
    display: flex;
    gap: 5px;
    border-radius: 30px;
    padding: 15px;
    align-self: center;
    justify-content: center;
    width: 100%;
    font-size: 15px;
    font-weight: bold;
    margin-top: 20px;
}

#add-to-cart-btn:hover {
    cursor: pointer;
    background-color: #170072;
}

#add-to-cart-btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
    border: 1px solid #aaa;
}

#add-to-cart-btn:hover:not(:disabled) {
    background-color: #180374;  /* Darker on hover */
}

@media (max-width: 1024px) {
    .product-item {
        flex: 1 1 calc(50% - 25px);
        min-width: calc(50% - 25px);
        max-width: calc(50% - 25px);
    }
}

.time-buffer-container, .type-option-container {
    display: flex;
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.time-buffer-container {
    margin-top: 10px;
}

.time-buffer-option, .type-option {
    border: gray 1px solid;
    border-radius: 10px;
    padding: 5px 14px;
    font-size: small;
    transition: transform 0.2s ease-in-out, border-color 0.2s;
}

.time-buffer-option.selected, .type-option.selected {
    border-color: #22049b;
    color: #22049b;
    transform: scale(1.1);
}

.time-buffer-option:hover, .type-option:hover {
    cursor: pointer;
    border-color: #22049b;
    color: #22049b;
    transform: scale(1.1);
}

.time-buffer-option.sold-out, .type-option.sold-out {
    border-color: #d3d3d3; /* Lighter gray for sold out items */
    background-color: #f2f2f2; /* Light gray background */
    color: #a9a9a9; /* Darker gray text */
    cursor: not-allowed; /* Prevent hover effect or click */
}

.time-buffer-option.sold-out:hover, .type-option.sold-out:hover {
    transform: none; /* No transform effect for sold-out items */
    border-color: #d3d3d3; /* Lighter gray for sold out items */
    background-color: #f2f2f2; /* Light gray background */
    color: #a9a9a9;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .main {
        padding: 70px 45px;
    }

    .product-item {
        flex: 1 1 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .product-item .title {
        font-size: 16px;
    }

    .quantity, .increment, .decrement {
        font-size: larger;
    }
}

.upgraded-title, .upgraded-price {
    color: #4caf50;
}

.upgraded-price {
    margin-left: 3px;
}

.text-stroked {
    font-size: smaller;
    text-decoration: line-through;
}

/* Main End */

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer p {
    font-size: 18px;
    padding: 50px;
}

@media (max-width: 768px) {
    .footer p {
        font-size: 13px;
    }
}
/* Footer End */

/* Modal */
.cart-modal {
    position: fixed;
    top: 0;
    right: -430px; /* Start off-screen */
    width: 430px;
    height: 100vh; /* Full screen height */
    background: var(--cart-modal-background);
    box-shadow: -4px 0 10px var(--box-shadow-color);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    padding: 10px 30px;
}

.cart-modal.open {
    right: 0; /* Slide into view */
}

.cart-content {
    background: var(--secondary-color);
    color: var(--cart-content-text-color);
    border-radius: 8px;
    padding: 20px;
}

.cart-content h2 {
    margin-bottom: 60px;
    text-align: center;
}

.cart-item {
    display: flex;
    align-items: self-end;
    margin-bottom: 15px;
    padding-bottom: 25px;
    gap: 15px;
    border-bottom: 1px solid #ddd;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: var(--cart-content-text-color);
}

.cart-item-actions {
    display: flex;
    gap: 4px;
}

.quantity-actions {
    background: var(--cart-item-actions-background);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 5px;
    padding: 3px 5px;
    justify-content: space-between;
}

.cart-item-actions button {
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cart-item-actions button:hover {
    background: var(--primary-hover-color);
    color: #5158FF;
}

.cart-item-actions span {
    background: var(--cart-item-actions-span-background);
    padding: 1px 10px;
    border-radius: 5px;
    font-weight: bold;
    color: var(--cart-item-actions-text-color);
    font-size: 13px;
}

.cart-item-actions .trash {
    background: var(--cart-item-actions-background);
    gap: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    color: var(--cart-content-text-color);
    border-radius: 5px;
    font-size: 13px;
    transition: color 0.3s ease;
}

.cart-item-actions .trash:hover {
    background: var(--cart-item-actions-background);
    color: red;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item img {
        width: 50px;
        height: 50px;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
}

.subtotal-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    padding: 5px 0;
    margin-top: 25px;
    color: white;
}

.tax-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: white;
    margin-bottom: 30px;
}

.discount-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #56b5f9;
    font-weight: 500;
    margin-bottom: 30px;
    align-items: flex-start;
}

.discount-container div {
    display: flex;
    flex-direction: column;
}

.discount-code {
    color: gray;
    font-size: 14px;
}

#discount-code {
    margin-left: 6px;
    font-size: 11px;
}

.total-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 25px 0;
    margin-top: 10px;
    color: #333;
    border-top: rgba(128, 128, 128, 0.534) 1px solid;
}

.total-price-container .total-label {
    color: white;
}

.total-price-container .total-label span {
    font-size: x-small;
    margin-left: 3px;
    font-weight: lighter;
}

.total-price-container .total-value {
    color: white;
}

.checkout-button {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: #22049b;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.checkout-button:hover {
    background: #170072;
}

.close-button {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover {
    color: #22049b;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 5px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .cart-modal {
        position: fixed;
        top: 0; /* Start from the top */
        right: -100%; /* Initially hidden */
        width: 80vw; /* Make it responsive */
        height: 100vh; /* Full height */
        max-width: 350px; /* Limit width */
        background: var(--cart-modal-background);
        box-shadow: -4px 0 10px var(--box-shadow-color);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        border-radius: 0; /* Remove rounded corners for full-screen effect */
    }

    .cart-modal.open {
        right: 0; /* Slide in */
    }

    .cart-overlay {
        position: fixed; /* Ensure full-screen coverage */
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.3); /* Slightly transparent */
        z-index: 999;
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
        pointer-events: none;
    }

    .cart-overlay.open {
        opacity: 1;
        pointer-events: all;
    }
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.2); /* White with 50% opacity */
    z-index: 999; /* Below the cart-modal */
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: all; /* Allow clicks to close modal */
}

/* Modal End */

/* Back confirmation modal */
/* Modal background overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
  
  /* Modal box styling */
.modal {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    width: 400px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}
  
  /* Modal header */
.modal h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    color: #333;
}
  
  /* Modal body */
.modal p {
    font-size: 1rem;
    margin: 0 0 20px;
    color: #666;
}
  
  /* Buttons container */
.modal-buttons {
    display: flex;
    justify-content: space-between;
}
  
  /* Button styling */
.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
  
/* OK button */
.btn-ok {
    background: #5158FF;
    color: #fff;
}
  
/* Cancel button */
.btn-cancel, .btn-back {
    border: 1px solid #5158FF;
}

.modal-buttons button:only-child {
    margin-left: auto;
}
/* Back confirmation modal End */

/* Toast */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgb(58,27,227), rgb(133,137,247));
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.5s ease-out;
}

@keyframes bounceIn {
    0% { transform: translateX(-50%) translateY(100px); opacity: 0; }
    60% { transform: translateX(-50%) translateY(-10px); opacity: 1; }
    80% { transform: translateX(-50%) translateY(5px); }
    100% { transform: translateX(-50%) translateY(0); }
}

.toast-show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: bounceIn 0.5s ease-out;
}
/* Toast End*/

.hidden {
    display: none;
}

.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
  }
