/* ================================
   Coupon Mart - Store View Styling
   Responsive + Centered Cards
   ================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* General Reset */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
}
a:hover {
  text-decoration: none;
}

/* Container */
.store-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
}

/* Store Header */
.store-header {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-bottom: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.store-header:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Store Banner */
.store-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Logo */
.store-logo-container {
  flex: 1 1 200px;
  text-align: center;
  padding: 30px;
}
.store-logo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Description */
.store-description-container {
  flex: 2 1 400px;
  padding: 30px;
}
.store-title-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.store-title,
.store-heading {
  font-size: 32px;
  color: #007bff;
  font-weight: 700;
  margin: 0;
}
.store-description {
  font-size: 16px;
  color: #666;
}

/* Track Button */
.track-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.3s, transform 0.2s;
}
.track-button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* Coupons Heading */
.coupons-heading {
  font-size: 28px;
  color: #007bff;
  margin: 40px auto 20px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Default: no underline */
.coupons-heading::after {
  content: "";
  display: none;
}

/* Hover: underline visible */
.coupons-heading:hover::after {
  display: block;
  width: 60px;
  height: 3px;
  background: #007bff;
  margin: 8px auto 0;
  border-radius: 2px;
}

/* Coupon Cards Grid */
.limited-offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Coupon Card */
.coupon-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  overflow: hidden;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* ✅ Flex layout */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.coupon-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Coupon Image */
.coupon-logo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

/* Card Content */
.coupon-card-content {
  padding: 20px;
  text-align: center;
  flex-grow: 1; /* ✅ fill karta hai */
}
.coupon-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #007bff;
  margin-bottom: 10px;
}
.coupon-title:hover {
  color: #0056b3;
}
.coupon-details {
  font-size: 1rem;
  color: #555;
  margin-bottom: 10px;
}
.coupon-expiry {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 15px;
}

/* Button Container */
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;        
  flex-wrap: nowrap;
  padding: 15px;

  margin-top: auto; /* ✅ neeche chipka diya */
}

/* Buttons */
.show-code-button,
.get-deal-button {
  flex: 1;                  
  min-width: 120px;         
  white-space: nowrap;      
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.show-code-button {
  background-color: #28a745;
}

.get-deal-button {
  background-color: #0400f7;
}

.show-code-button:hover,
.get-deal-button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* No Coupons */
.no-coupons {
  font-size: 1.2rem;
  color: #888;
  text-align: center;
  margin-top: 30px;
}

/* Related Stores */
.related-stores-heading {
  font-size: 24px;
  margin: 50px 0 20px;
  text-align: center;
  color: #333;
}
.related-stores-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}
.related-store-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-store-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.related-store-logo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  margin: 20px auto;
  border-radius: 10px;
}
.related-store-name {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

/* Popup */
#deal-popup, #code-popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#popup-content, #code-popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.popup-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}
#code-popup-content p {
  font-size: 1.5rem;
  color: #1f1d1d;
  margin-bottom: 15px;
}
.coupon-code-display {
  display: inline-block;
  background: #f5f5f5;
  border: 2px dashed #007bff;
  padding: 12px 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #007bff;
  border-radius: 8px;
  margin: 10px 0;
  word-break: break-all;
}
.copied-message {
  font-size: 1.1rem;
  color: #28a745;
  margin-top: 10px;
}
.close-button {
  background: #FF5A5F;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
}
.close-button:hover {
  background: #e14b4f;
}

/* ===================
   RESPONSIVE DESIGN
   =================== */

/* Tablet */
@media(max-width: 992px) {
  .store-title { font-size: 26px; }
  .store-heading { font-size: 22px; }
  .limited-offers { max-width: 700px; }
}

/* Mobile */
@media(max-width: 600px) {
  .store-banner { flex-direction: column; text-align: center; }
  .store-logo { width: 160px; height: 160px; }
  .coupon-card { max-width: 90%; }
  .limited-offers { grid-template-columns: 1fr; max-width: 100%; }

  /* ✅ Mobile par bhi buttons ek hi line me */
  .button-container {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .show-code-button,
  .get-deal-button,
  .track-button {
    width: auto;
    flex: 1;
  }
}
