/* Variation Options Styling */
.variation-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.variation-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.1s ease-in-out;
    width: 100%;
}

.variation-option:hover {
    border-color: #0060EF;
}

.variation-option.selected {
    border-width: 2px;
    border-color: #0060EF;
    background-color: #fff;
}

/* Flex container for variation content (image and details) */
.variation-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.custom-variation-image {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.variation-description-box {
    margin-bottom: 10px;
    padding: 15px;
    background-color: #F7F9FA;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    color: rgba(0, 0, 0, 0.65);
    font-size: 14px;
}

/* Gallery Carousel Styling */
.custom-featured-image-container {
    position: relative;
    text-align: center;
}

.custom-gallery-carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.custom-gallery-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.custom-carousel-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
}

.custom-carousel-thumbnail.active {
    border-color: #0060EF;
}

/* Adjust buttons to be circular with background color and a white arrow */
.custom-prev-slide,
.custom-next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0000001A !important; /* Correct background color with !important */
    border: none;
    font-size: 14px !important; /* Smaller arrow with !important */
    color: white !important; /* Ensure arrow color is white */
    cursor: pointer;
    padding: 8px !important; /* Adjust padding to reduce size */
    border-radius: 50%; /* Perfect circle */
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure arrows are on top */
    opacity: 1; /* Full opacity to ensure visibility */
    visibility: visible; /* Ensure they are visible at all times */
    transition: background-color 0.3s ease-in-out; /* Smooth background change on hover */
}

.custom-prev-slide {
    left: 10px;
}

.custom-next-slide {
    right: 10px;
}

/* Hover effect for arrows */
.custom-prev-slide:hover,
.custom-next-slide:hover {
    background-color: #999999; /* Slightly darker shade on hover */
}

/* Ensure arrows are not hidden behind images */
.custom-featured-image-container {
    position: relative;
    z-index: 1;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .custom-prev-slide,
    .custom-next-slide {
        display: none;
    }
}


/* Main featured image adjustments */
.custom-featured-image {
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 800px; /* Adjust this value based on your needs */
    object-fit: contain;
}

/* Accessories Styling */
.accessories-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.accessory-products {
    display: flex;
    flex-direction: column;
}

.accessory-item {
    display: flex;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    align-items: flex-start;
    width: 100%;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.accessory-item.out-of-stock {
    opacity: 0.6;
}

.accessory-checkbox {
    margin-right: 15px;
    align-self: flex-start;
}

.accessory-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    align-self: flex-start;
}

.accessory-info {
    flex: 1;
}

.accessory-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.price-stock-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accessory-price {
    font-size: 15px;
    color: #000000d9;
    margin: 0 0 5px 0;
}

.stock-status {
    margin-left: 15px;
    font-weight: bold;
}

.stock-status.in-stock {
    color: #28a745;
}

.stock-status.out-of-stock {
    color: #dc3545;
}

/* Quantity Input Styles */
.qty-input {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 98px !important;
    height: 30px !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
    margin-top: 5px !important;
    margin-bottom: 10px !important;
}

/* Add a container for the divider */
.qty-input-wrapper {
    position: relative !important;
}

/* Update the divider style */
.qty-input-wrapper::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0; /* Stretch to the right edge of the accessory box */
    height: 1px;
    background-color: #f0f1f2;
}

/* Quantity adjustment buttons */
.qty-count {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: #333 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    width: 30px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-align: center !important;
}

.qty-count--minus {
    border-right: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.qty-count--add {
    border-left: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* Input field in quantity selector */
.product-qty {
    width: 35px !important;
    text-align: center !important;
    border: none !important;
    font-size: 14px !important;
    color: #333 !important;
    background-color: transparent !important;
    appearance: none !important;
}

.product-qty::-webkit-inner-spin-button,
.product-qty::-webkit-outer-spin-button {
    appearance: none !important;
    margin: 0 !important;
}

/* Accessory description and details link */
.accessory-description {
    margin-top: 20px;
    font-size: 14px;
    color: #3b3e40;
}

.accessory-details-link {
    font-size: 14px;
    color: #0060EF;
    text-decoration: none;
}

/* Connected Product Styles */
.connected-product-container {
    text-align: center;
}

.connected-product-headline {
    font-family: 'Open Sans', sans-serif;
    font-size: 26px!important;
    font-weight: 600;
    color: #3b3e40;
    margin-bottom: 35px;
}

.connected-product-variations-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.connected-product-box {
    width: 290px;
    height: 155px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    background-color: #ffffff;
}

.connected-product-box:hover {
    border-color: #0060EF;
}

.connected-product-box.selected {
    border-width: 2px;
    border-color: #0060EF;
    background-color: #ffffff;
}

/* Variation Title and Price */
.variation-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #000000d9;
}

.variation-price {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #3b3e40;
    margin-top: 10px;
}

/* Buttons */
.connected-product-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.connected-product-btn {
    padding: 12px 24px;
    border-radius: 120px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    min-width: 200px;
}

.connected-product-btn.transparent {
    background: transparent;
    border: 2px solid #0060EF;
    color: #0060EF;
}

#add-connected-product {
    background-color: #0060EF;
    border: 2px solid #0060EF;
    color: white;
}

#add-connected-product:hover,
#add-connected-product:active,
#add-connected-product:focus {
    background-color: #0060EF !important;
    border-color: #0060EF !important;
    color: white !important;
}

/* Product Name and Price Styling */
.custom-product-name {
    font-size: 32px!important;
    font-weight: 600!important;
    margin-bottom: 10px;
}

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

.custom-product-price {
    font-size: 24px;
    color: #333;
}

/* Ensure the featured image container is positioned correctly */
#featured-image-container {
    position: relative;
    overflow: hidden; /* Ensure child elements don't overflow */
}

/* Prevent image selection during touch events */
.custom-featured-image {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
    touch-action: manipulation; /* Disable default touch actions */
}

.in-the-box-container {
   
	padding-bottom: 100px;
}

.in-the-box-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #3b3e40;
    margin-bottom: 20px;
    text-align: center;
}

.in-the-box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    padding: 0;
}

.in-the-box-item {
    display: flex;
    flex-direction: column;
}

.in-the-box-image {
    background-color: #F7F9FA;
    padding: 15px;
    border-radius: 0;
    width: 190px;
    height: 192px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.in-the-box-image img {
    width: 100%;
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.in-the-box-info {
    text-align: left;
    padding: 0;
}

.in-the-box-info h3 {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 16px !important;
    line-height: 1.2;
    margin: 0 0 5px;
    color: #3b3e40;
}

.in-the-box-quantity {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #3b3e40;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sale-price {
    color: #0060EF;
    font-weight: 600;
}

.regular-price {
    color: #3b3e40;
}

.sale-price + .regular-price {
    text-decoration: line-through;
    color: #666;
    font-size: 0.9em;
}

/* Mobile Breakpoint Styles */
@media screen and (max-width: 768px) {
    /* Product Title in Shortcode */
    h1#product-name.custom-product-name {
        font-size: 24px !important;
    }

    /* Price in Shortcode */
    .product-price-container .custom-product-price {
        font-size: 18px !important;
    }

    /* Variation Box Adjustments */
    .variation-options .variation-info strong {
        font-size: 14px !important;
    }

    /* Accessory name size adjustment */
    .accessory-name {
        font-size: 14px !important;
    }

    /* New in-the-box mobile styles */
    .in-the-box-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .in-the-box-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        padding: 10px;
    }

    .in-the-box-info h3 {
        font-size: 14px !important;
    }

    .in-the-box-quantity {
        font-size: 12px;
    }

    .connected-product-variations-container {
        flex-direction: column;
        align-items: center;
    }
    
    .connected-product-box {
        width: 100%;
        max-width: 290px;
    }
}

.stock-status-text {
    color: #ff0000;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.out-of-stock-text {
    color: #ff0000;
    font-size: 16px;
    font-weight: 500;
    margin: 10px 0;
}

.variation-option[data-in-stock="false"] {
    opacity: 0.7;
}

/* Waitlist Button and Modal Styles */
.waitlist-btn.single_add_to_cart_button {
    background-color: #0060EF !important;
    color: white !important;
    border: none !important;
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 1px !important;
    padding: 15px 25px !important;
    font-size: 16px !important;
    border-radius: 120px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    font-weight: 400 !important;
}

.waitlist-btn.single_add_to_cart_button:hover {
    background-color: #005BBB !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 60px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.waitlist-modal-inner {
    text-align: center;
}

.waitlist-modal-inner h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.waitlist-modal-inner p {
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
}

#waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

#waitlist-email {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 120px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

#waitlist-form button {
    background-color: #0B4ECB !important;
    color: white !important;
    border: none !important;
    width: 100% !important;
    padding: 15px 25px !important;
    font-size: 16px !important;
    border-radius: 120px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

#waitlist-form button:hover {
    background-color: #005BBB !important;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

#waitlist-response {
    margin-top: 20px;
    font-size: 16px;
}

#waitlist-response p {
    margin: 0;
    padding: 15px;
    border-radius: 120px;
}

#waitlist-response p[style*="color: green"] {
    background-color: #e8f5e9;
    color: #2e7d32 !important;
}

#waitlist-response p[style*="color: red"] {
    background-color: #ffebee;
    color: #c62828 !important;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .modal-content {
        padding: 40px 20px;
        width: 95%;
    }
    
    .waitlist-modal-inner h2 {
        font-size: 24px;
    }
    
    .waitlist-modal-inner p {
        font-size: 16px;
    }
}

#refresh2years, #refresh1year {
    display: none; /* Initial state */
}

#refresh2years.show, #refresh1year.show {
    display: block;
}

/* Toastr customization */
.toast-message {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: white !important;
}

#toast-container > div {
    padding: 15px 15px 15px 50px !important;
    width: 510px !important;
    max-width: 90vw !important; /* Ensure it doesn't overflow on mobile */
    opacity: 1 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    background-color: rgba(0, 96, 239, 0.86) !important;
    color: white !important;
}

#toast-container > .toast-error,
#toast-container > .toast-success {
    background-color: rgba(0, 96, 239, 0.86) !important;
    color: white !important;
    border-left: none !important;
}

/* Position adjustment */
.toast-top-right {
    top: 75px !important;
    right: 15px !important;
}

/* Mobile adjustments for toasts */
@media screen and (max-width: 768px) {
    #toast-container > div {
        width: calc(100vw - 30px) !important; /* Account for padding */
        margin-right: 15px !important;
    }
    
    .toast-top-right {
        top: 60px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .connected-product-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .connected-product-btn {
        width: 100%;
        max-width: 290px;
    }
}

/* Base button styles */
.single_add_to_cart_button {
    position: relative;
    background-color: #0060EF !important;
    color: white !important;
    border: none !important;
    padding: 15px 25px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    border-radius: 120px !important;
    width: 100% !important;
    cursor: pointer !important;
}

/* Button content wrapper */
.button-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Show spinner when loading */
#ajax-add-to-cart.loading .loading-spinner {
    display: inline-block;
}

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

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .single_add_to_cart_button {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    .button-content {
        gap: 10px !important;
    }
}

/* Important: Override display property for hidden buttons */
#ajax-add-to-cart[style*="display: none"],
#waitlist-button[style*="display: none"] {
    display: none !important;
}

/* Remove any default WooCommerce spinners */
.single_add_to_cart_button::after {
    display: none !important;
}

.single_add_to_cart_button.loading::after {
    display: none !important;
}

/* Our custom spinner */
.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Show our spinner when loading */
#ajax-add-to-cart.loading .loading-spinner {
    display: inline-block;
}
/* Override hover and loading states */
#ajax-add-to-cart:hover,
#ajax-add-to-cart:active,
#ajax-add-to-cart.loading {
    background-color: #0060EF !important;
}