:root {
    --popup-height: 100vh;
    --popup-width: 100vw;
    --popup-bg-color: rgba(255, 255, 255, 0.1); /* darker backdrop for clarity */
    --modal-bg-color: #ffffff;
    --modal-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    --close-icon-color: #888;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
}

/* Full-screen overlay */
.sales-modal {
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: var(--popup-width);
    height: var(--popup-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--popup-bg-color);
    z-index: 100;
    transition: opacity 0.3s ease;
}

/* Hidden state */

.hidden{
    display: none !important;
}

/* Modal container */
.sales-modal-container {
    position: relative;
    background-color: var(--modal-bg-color);
    padding: 2em;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--modal-shadow);
    z-index: 101;
    overflow: hidden; /* keeps confetti inside */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Close icon */
#sales-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 32px;
    color: var(--close-icon-color);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

#sales-popup-close:hover {
    color: #444;
    transform: scale(1.1);
}

/* Offer card styling */
.offer-card {
    width: 100%;
    border-radius: 10px;
    padding: 1em;
    text-align: center;
}

.offer-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1em;
}

.offer-card h2 {
    font-size: 1.2rem;
    margin: 0.5em 0;
}

.offer-card .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.offer-card .old-price {
    color: #999;
    text-decoration: line-through;
    margin-right: 0.5em;
}
/* ===========================
   SMALL BOTTOM CONTAINER FOR SPECIAL OFFERS
=========================== */
.sales-small-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: auto;             /* let content determine width */
  max-width: 90vw;         /* responsive max width */
  height: auto;            /* adapt to card height */
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
  padding: 0;              /* remove extra padding */
  border-radius: 20px;
  z-index: 100;
  align-items: center;
}

.sales-small-container .offer-card-small {
  flex-shrink: 0;          /* prevent shrinking */
  padding: 0.8rem 1.2rem;  /* smaller padding for better fit */
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #fff;
  font-weight: 600;
  font-family: 'Arial', sans-serif;
  font-size: 0.95rem;
}

/* Card text */
.sales-small-container .offer-card-small {
  background: linear-gradient(135deg, #ff6f61, #fdd5a6); /* coral to sand */
  padding: 1rem 1.5rem;            /* relative padding */
  border-radius: 20px;              /* slightly rounded */
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #fff;
  font-weight: 600;
  font-family: 'Arial', sans-serif;
  font-size: 1rem;                 /* base font size */
  max-width: 90%;                  /* prevents overflow on small screens */
}

.sales-small-container .offer-card-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sales-small-container .offer-card-small span{
    font-family: "Poppins", sans-serif;
    color: #143d6a;
}

/* Optional: subtle horizontal scrollbar */
.sales-small-container::-webkit-scrollbar {
  height: 5px;
}

.sales-small-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .sales-modal-container {
        padding: 1.5em;
    }

    #sales-popup-close {
        font-size: 26px;
    }

    .offer-card h2 {
        font-size: 1rem;
    }
}