 
/* Sale Modal Specific Variables */
:root {
  --sale-popup-bg: #ffffff;
  --sale-popup-text: #333333;
  --sale-popup-accent: #FFD700;
  --sale-popup-accent-hover: #E6B800;
  --sale-popup-shadow: 0px 6px 18px rgba(0, 0, 0, 0.2);
  --sale-popup-border-radius: 12px;
  --sale-popup-font-lg: clamp(1.4rem, 2vw, 1.8rem);
  --sale-popup-font-md: clamp(1rem, 1.5vw, 1.2rem);
  --sale-popup-font-sm: clamp(0.7rem, 1vw, 0.9rem);
  --sale-popup-step-bg: linear-gradient(145deg, #1c2438, #2b3a56, #3a4a6f);
  --sale-popup-step-text: #ffffff;
}
.sale-popup-modal:focus-within {
    outline: none;
  }
  
/* Popup Modal */
.sale-popup-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--sale-popup-border-radius);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.25);
    color: var(--sale-popup-text);
    backdrop-filter: blur(5px);
    z-index: 9999;
    overflow-y: auto;
    max-height: 100vh;
}

/* Popup Content */
.sale-popup-content {
    background: var(--sale-popup-bg);
    color: var(--sale-popup-text);
    padding: 2rem;
    border-radius: var(--sale-popup-border-radius);
    width: min(90%, 850px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--sale-popup-shadow);
    font-family: 'Roboto', sans-serif;
    text-align: center;
    position: relative;
    max-height: calc(100vh - 4rem); 
    overflow-y: auto;
}

/* Title */
.sale-popup-title {
    font-size: var(--sale-popup-font-lg);
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--sale-popup-text);
    text-shadow: none;
}

/* Steps Section */
.sale-popup-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Step Items */
.detail-item {
    padding: 1rem;
    background: var(--sale-popup-step-bg);
    border-radius: var(--sale-popup-border-radius);
    box-shadow: var(--sale-popup-shadow);
    transition: transform 0.3s ease-in-out;
    text-align: center;
    color: var(--sale-popup-step-text);
}

.detail-item:hover {
    transform: scale(1.05);
}

.detail-item h3 {
    font-size: var(--sale-popup-font-sm); /* Smaller title for better fit */
    font-weight: bold;
    margin-bottom: 0.3rem;
    color:var(--sale-popup-bg)
}

.emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

 

/* CTA Button */
.sale-popup-button {
    background: var(--sale-popup-accent);
    color: var(--sale-popup-bg);
    padding: 12px 20px;
    border-radius: var(--sale-popup-border-radius);
    font-size: var(--sale-popup-font-md);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: var(--sale-popup-shadow);
}

.sale-popup-button:hover {
    background: var(--sale-popup-accent-hover);
    transform: translateY(-3px);
}

.sale-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--sale-popup-text);
  cursor: pointer;
  z-index: 10001;
}

.sale-popup-close:hover {
  background: linear-gradient(180deg, #2a3a5d, #101824);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.35),
    inset 0 2px 3px rgba(255, 255, 255, 0.1),
    inset 0 -2px 3px rgba(0, 0, 0, 0.4);
  border-color: #d4af37;
  color: #ffffff;
}
.sale-popup-button {
  background: linear-gradient(180deg, #1f2c47, #131a2c);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 1.125rem;
  font-family: 'Roboto', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  text-align: center;

  /* Centering fix */
  margin: 0 auto;
  width: auto;
}


.sale-popup-button:hover {
  background: linear-gradient(180deg, #2a3a5d, #101824);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.35),
    inset 0 2px 3px rgba(255, 255, 255, 0.1),
    inset 0 -2px 3px rgba(0, 0, 0, 0.4);
  border-color: #d4af37;
  color: #ffffff;
}

/* Financing Section */
.sale-financing {
    background: var(--sale-popup-financing-bg);
    color: var(--sale-popup-financing-text);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--sale-popup-border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--sale-popup-shadow);
}

.credit-card-visual {
    background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
    padding: 1rem 2rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: var(--sale-popup-font-md);
    font-weight: bold;
    color: #444;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Countdown Section */
.sale-expiration {
    font-size: var(--sale-popup-font-md);
    font-weight: bold;
    color: var(--sale-popup-text);
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

#countdown {
    font-size: var(--sale-popup-font-lg);
    font-weight: bold;
    color: var(--sale-popup-text);
    display: inline-block;
}
@media (max-width: 600px) {
  .sale-popup-modal {
    align-items: flex-start; /* Prevent vertical clipping */
  }

  .sale-popup-content {
    padding: 3rem 1.2rem 1.2rem; /* Top padding for fixed close button */
    width: 95%;
    max-height: unset; /* Allow full scroll on very small screens */
    overflow-y: auto;
  }

  .sale-popup-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .detail-item {
    padding: 0.8rem;
  }

  .sale-popup-title {
    font-size: 1.2rem;
  }

  .sale-popup-button {
    width: auto;
    min-width: 200px;
    margin: 1rem auto 0 auto; /* center and add space above */
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }
  

  .sale-financing {
    padding: 1rem;
  }

  .credit-card-visual {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .sale-popup-close {
    position: fixed;
    top: 12px;
    right: 12px;
    font-size: 1.25rem;
    background: var(--sale-popup-bg);
    color: var(--sale-popup-text);
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: var(--sale-popup-shadow);
    z-index: 10001;
  }

  #countdown {
    font-size: 1.2rem;
  }
}
