.cbp-banner-container {
  width: 100%;
  margin: 20px 0;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
  box-sizing: border-box;
}

.cbp-banner-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
  justify-items: center;
}

.cbp-coupon-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  width: 100%;
  max-width: 400px; /* Doubled max-width from 200px to 400px */
  aspect-ratio: 1 / 1;
}

.cbp-coupon-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cbp-card-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cbp-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cbp-logo-placeholder {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbp-logo-placeholder span {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

.cbp-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 50px; /* Add padding to prevent code from being hidden behind badge */
}

.cbp-card-title {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

.cbp-card-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.cbp-code-label {
  font-size: 10px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cbp-code-value {
  font-size: 17.5px; /* Increase font size by 25% (from 14px to 17.5px) */
  font-weight: 700;
  color: #667eea;
  letter-spacing: 1px;
  font-family: monospace;
}

.cbp-card-badge {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: linear-gradient(135deg, #20bf6b 0%, #26de81 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(32, 191, 107, 0.3);
}

.cbp-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1;
}

.cbp-card-cta {
  display: none;
}

.cbp-coupon-card:hover .cbp-card-overlay::after {
  content: "Click to Get Coupon";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(102, 126, 234, 0.95);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.cbp-popup-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cbp-popup-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  position: relative;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cbp-popup-close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: #999;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
  transition: color 0.3s ease;
}

.cbp-popup-close:hover {
  color: #333;
}

.cbp-popup-body {
  padding: 40px 30px 30px;
  text-align: center;
}

#cbp-popup-title {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.cbp-popup-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: #f7f7f7;
  border: 2px dashed #667eea;
  border-radius: 12px;
}

#cbp-popup-code {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
  letter-spacing: 2px;
}

.cbp-copy-btn {
  padding: 8px 20px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cbp-copy-btn:hover {
  background: #5568d3;
}

.cbp-copy-btn.copied {
  background: #00b894;
}

#cbp-popup-description {
  margin: 20px 0;
  color: #666;
  font-size: 15px;
  line-height: 1.6;
}

.cbp-affiliate-btn {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 10px;
}

.cbp-affiliate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  color: #fff;
}

.cbp-no-coupons {
  text-align: center;
  padding: 40px 20px;
  color: #fff;
  font-size: 16px;
}

/* Popup Logo Styles */
.cbp-popup-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cbp-popup-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cbp-popup-logo.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .cbp-banner-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1200px) {
  .cbp-banner-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .cbp-banner-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .cbp-banner-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .cbp-coupon-card {
    padding: 15px 10px;
    max-width: 360px; /* Adjusted max-width for better responsiveness */
  }

  .cbp-card-logo {
    width: 60px;
    height: 60px;
  }

  .cbp-logo-placeholder {
    width: 60px;
    height: 60px;
  }

  .cbp-logo-placeholder span {
    font-size: 24px;
  }

  .cbp-card-title {
    font-size: 14px;
  }

  .cbp-popup-content {
    margin: 20% auto;
    width: 95%;
  }

  .cbp-popup-body {
    padding: 30px 20px 20px;
  }

  #cbp-popup-code {
    font-size: 22px;
  }

  .cbp-popup-code-box {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .cbp-banner-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .cbp-coupon-card {
    padding: 10px 5px;
    max-width: 320px; /* Further adjusted max-width for mobile devices */
  }

  .cbp-card-logo {
    width: 50px;
    height: 50px;
  }

  .cbp-logo-placeholder {
    width: 50px;
    height: 50px;
  }

  .cbp-logo-placeholder span {
    font-size: 20px;
  }

  .cbp-card-title {
    font-size: 12px;
  }

  .cbp-popup-content {
    margin: 25% auto;
    width: 98%;
  }

  .cbp-popup-body {
    padding: 25px 15px 15px;
  }

  #cbp-popup-code {
    font-size: 20px;
  }

  .cbp-popup-code-box {
    gap: 5px;
  }
}
