html, body {
    height: 100%; /* Ensure html and body take full viewport height */
    width: 100vw; /* Use viewport width for width */
    overflow-x: hidden; /* Prevent horizontal scroll on html/body */
}

body {
    background-color: #f0f0f0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    font-family: Arial, sans-serif;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-anchor: none;
    padding-top: 0px;
}

a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

a:hover {
    color: #0195fb;
    text-decoration: none;
}

footer {
/*    color: #000;*/
    text-align: center;
    padding: 10px 0;
    font-size: 10px;
    background: #222;
    color: #fff;
    width: 100%;
}

.center-image {
    max-width: 60%;
    max-height: 60%;
    display: block;
}

#countdown1 {
    font-size: 2em;
    color: #333;
    margin-top: 30px;
}

#countdown {
    font-size: 1.3em;
    font-family: monospace;
    font-weight: bold;
    color: #fff;
    background-color: #222;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 30px;
    margin-right: 12px;
    letter-spacing: 5px;
    width: 270px;
    text-align: center;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Changed from center to flex-start */
}

.main-content-wrapper {
    transition: transform 0.3s ease;
    transform-origin: center center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    min-height: 100px;
    padding-top: 40px;
}

.menu-divider {
    width: 80%;
    margin: 5px auto;
    border: 0;
    border-top: 1px solid #ccc;
}

.image-carousel-container {
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto 20px;
}

.image-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-image {
    width: 70%;
    flex-shrink: 0;
    display: none;
    margin: auto;
}

.carousel-image.active {
    display: block;
}

.carousel-controls {
    position: absolute;
    top: 42%;
    left: -100px;
    right: -100px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.prev-slide,
.next-slide {
    pointer-events: auto;
}

.carousel-controls button {
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    padding: 10px 15px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border-radius: 5px;
}

.carousel-controls button:hover {
    opacity: 1;
}

.carousel-controls i {
    font-size: 1.5em;
}

.image-carousel-wrapper {
    position: relative; /* Needed for absolute positioning of controls */
}

.thumbnail-gallery {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.thumbnail-item {
    width: 50px; /* Adjust as needed */
    height: 50px; /* Adjust as needed */
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    border-radius: 5px; /* Optional: for rounded corners */
    overflow: hidden;  /* Ensure image doesn't overflow */
}
.thumbnail-item:hover {
    opacity: 1;
}
.thumbnail-item.active {
    opacity: 1;
    border: 2px solid #007bff; /* Optional: highlight active thumbnail */
}
.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure image fills the thumbnail */
}

.product-detail-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.product-info {
    flex: 1;
    width: 520px;
    min-width: 400px;
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 100px;
    text-align: left;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 400px; /* Adjust this value as needed */
}

.image-carousel-container {
    flex: 1;
    max-width: 350px;
}

.image-carousel img {
    flex-shrink: 0;
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.buy-section {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.buy-section select {
    height: 40px;
    padding: 5px;
    border: 1px solid #ccc;
    width: 80px; /* Increased width */
    font-size: 16px; /* Increased font size */
}

.buy-button {
  background-color: red;
  color: white;
  padding: 10px 30px;
  border-radius: 0px;
  cursor: pointer;
  margin-left: 5px;
  margin-right: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  height: 40px;
  width: 57.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(0);
  transition: transform 0.2s ease-in-out, background-color 0.3s ease-in-out;
  overflow: hidden;
  position: relative;
}

.buy-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: darkred;
  transition: left 0.2s ease-in-out;
  z-index: -1;
}

.buy-button:hover {
  color: white;
}

.buy-button:hover::before {
  left: 0;
}

#publicSaleStart {
    text-align: center;
    font-style: italic;
}

.zoomed-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto;
}

.zoomed-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    cursor: pointer;
}

.details-container {
    background-color: #fff;
    border-radius: 5px;
    margin-top: 30px; /* Changed from 20px to 30px */
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    cursor: pointer;
}

.details-header h3 {
    margin: 0;
    font-size: 18px;
}

.details-content {
    padding: 0 10px 10px 10px;
    display: none; /* Initially hidden */
    overflow-y: auto;
/*    max-height: 300px;*/
}

.details-content p{
  font-size: 14px;
  height: 100%;
}

.rotate-icon {
    transition: transform 0.3s ease;
}

.rotate-icon.open {
    transform: rotate(180deg);
}

.disabled-button {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    pointer-events: none;
}

.purchase-limit {
/*    width: 350px;*/
    width: 85%;
    height: 35px;
    border: 1px solid #bbd2ec;
    background-color: #e7eff9;
    color: #26548d;
    padding: 5px 19px 5px 19px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    font-size: 0.7em;
    line-height: 35px; /* Adjust line-height to be the same as the height for vertical centering as well */
    text-align: center; /* This is the key line */
    /* justify-content: center; Remove this, it's for flex containers */
    display: flex; /* Consider keeping this if you have more complex content */
    align-items: center; /* Good for vertical centering within a flex container */
}

.couponcode {
    padding: 0;
    margin: 0;
}
#couponCode:focus {
    outline: 1px solid #007bff; /* Example: blue outline */
}
.coupon-container {
    width: 85%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #26548d;
    padding: 0px 18px 0px 18px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    font-size: 0.8em;
    line-height: normal; /* Changed from 5px */
    position: relative; /* Added for absolute positioning of input */
    overflow: hidden; /* Added to contain absolute elements */
    border: 2px solid #f0f0f0;
}
#couponInputContainer {
    display: none; /* Hidden by default */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}
#couponInputContainer.active {
    display: flex !important; /* Force display when active */
}
#couponInputContainer input[type="text"] {
    width: 320px;
    height: 100%;
    margin-right: 5px;
    border: none;
    outline: none;
    font-size: inherit;
    text-align: center;
}
#couponInputContainer button {
    height: 100%;
    width: 55px;
    padding-top: 0px;
    border: none;
    outline: none;
    font-size: inherit;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    background-color: #f0f0f0;
    position: absolute;
}
#couponMessage {
    margin-top: 10px;
    font-size: 12px;
    text-align: center;
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
}

.mini-nav {
    font-size: 0.95em;
    margin-top: 15px;
    margin-left: 10px;
    margin-right: auto;
    display: block;
}
.mini-nav a {
    color: #000;
}

.mini-nav-desk {
    display: block;
}

.mini-nav-mobile {
    display: none;
}

.image-carousel-wrapper {
    position: relative; /* Needed for absolute positioning of the share icon */
    /* Add any other existing styles for the wrapper */
}

.share-icon {
    position: absolute;
    top: 85%; /* Adjust vertical position as needed */
    right: -65px; /* Adjust horizontal position as needed */
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    padding: 5px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    z-index: 10;
}

.share-icon:hover {
    background-color: rgba(1, 149, 251, 0.9);
    color: #fff;
}

.share-options {
    position: absolute;
    /* Remove top, right, bottom, left that were for static positioning */
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: none; /* Hidden by default */
    z-index: 11;
}

.share-options.active {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-radius: 3px;
}

.share-option:hover {
    color: rgba(1, 149, 251, 0.9);
}

.share-option i {
    font-size: 16px;
}

@media (max-width: 768px) {
  body {
    background-size: contain;
    background-repeat: repeat;
    background-position: center;
    font-size: 14px;
  }
  .banner-right{
    display: block;
    text-align: center;
  }
  .banner-right a, .banner-right span{
    display: block;
  }
  .product-detail-container{
    display: block;
  }
  .image-carousel-wrapper {
    width: 70%;
    margin: auto;
  }

  .product-detail-container {
    width: 100%;
    margin: 0 auto;
    display: block;
  }

  .image-carousel-container,
  .product-info {
    width: 100%; /* Ensure full width */
    max-width: 520px; /* Keep a reasonable max-width */
    box-sizing: border-box;
    margin: 15px auto 10px; /* Center and add vertical margins */
  }

  /* Fixes for product-info width on mobile */
  .product-info {
    min-width: auto; /* Remove the fixed min-width */
    margin-left: 0; /* Remove the left margin */
    padding: 15px; /* Adjust padding for mobile */
  }

  .buy-button {
    width: 80%; /* Adjust buy button width on mobile */
    margin-left: auto;
    margin-right: 5px;
  }

/*  .image-carousel {
    overflow-x: auto;
    white-space: nowrap;
  }*/

.image-carousel {
    /* --- CRITICAL: Scrolling and Layout Properties --- */
    overflow-x: auto;        /* 1. Re-enables the horizontal scrolling */
    white-space: nowrap;     /* 2. Forces all slides onto a single line */
    
    /* --- CRITICAL: Snapping Properties --- */
    scroll-snap-type: x mandatory; /* Makes the scroll snap to positions */
    -webkit-overflow-scrolling: touch; /* Improves feel on iOS */
}

/* Apply snapping and sizing to the individual slide elements */
.image-carousel > .carousel-image {
    width: 100%;             /* Makes the slide fill the viewport width (for snapping) */
    height: auto;
    display: inline-block;   /* Works with white-space: nowrap */
    scroll-snap-align: start;/* Tells the scroll where to align (left edge) */
}

  .image-carousel img {
    width: 100%;
    height: auto;
    display: inline-block;
  }

  .prev-slide {
    display: none;
  }

  .next-slide {
    display: none;
  }

  .thumbnail-gallery {
    display: none;
  }

  #publicSaleStart {
    font-size: 10px;
  }
  .mobile-carousel-wrapper { /* Style the wrapper */
    width: 70%;
    margin: 0 auto;
  }
  .main-content-wrapper {
    padding-top: 0px;
  }
  .purchase-limit {
    width: 89%; /* Adjust purchase limit width */
    margin-left: auto;
    margin-right: auto;
    margin-left: 10px; /* Delete this */
    max-width: 437px; /* Delete this */
  }
  .coupon-container {
    width: 89.5%;
    margin-left: auto;
    margin-right: 0;
    margin-left: 10px;
    padding-right: 18px;
    max-width: 437px;
}
#couponInputContainer input[type="text"] {
    width: 85%;
    font-size: 14px;
}
  .details-container {
    margin-top: 20px; /* Adjust spacing for details */
  }
  .mini-nav-desk {
    display: none;
  }
  .mini-nav-mobile {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
  }
  .share-icon {
        position: absolute;
        top: 90%;
        right: -17%;
    }
}

/* Styles for even smaller screens (phones) */
@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
}