/* ==========================================================================
   CouponCodeXYZ.in - Components Styling
   Coupon Cards, Store Grid, Search Dropdown, Modals, FAQs & Badges
   ========================================================================== */

/* ==========================================================================
   Store Badges & Store Grid
   ========================================================================== */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.store-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.store-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.store-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  overflow: hidden;
}

.store-logo-wrap img,
.store-logo-wrap svg {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.category-icon-wrap svg {
  max-width: 28px;
  max-height: 28px;
}

.store-card-name, .store-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.store-card-count, .store-coupon-count {
  font-size: 0.775rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Category Grid
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.cat-icon-wrap, .category-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.cat-name, .category-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.cat-count, .category-offers-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Coupon Filter Tabs
   ========================================================================== */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tab {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   Coupon Cards (Modern High Conversion Layout)
   ========================================================================== */
.coupons-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.coupon-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  display: flex;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.coupon-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.coupon-card.featured-deal {
  border-left: 4px solid var(--accent);
}

/* Left discount badge section */
.coupon-discount-side {
  width: 150px;
  background: #f8fafc;
  border-right: 1px dashed var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
  position: relative;
}

.coupon-discount-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}

.coupon-discount-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.coupon-type-badge {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-code {
  background: #e0e7ff;
  color: #4338ca;
}

.badge-deal {
  background: #dcfce7;
  color: #15803d;
}

/* Right coupon details section */
.coupon-details-side {
  flex: 1;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.coupon-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.verified-tag {
  color: var(--success);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.uses-count {
  color: var(--text-light);
}

.store-tag {
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.coupon-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.coupon-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.coupon-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.coupon-expiry {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.coupon-expiry.expiring-soon {
  color: var(--danger);
  font-weight: 600;
}

.coupon-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Interactive Get Code Button */
.btn-get-code {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.btn-get-code:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-get-deal {
  background: var(--success);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.btn-get-deal:hover {
  background: #059669;
  color: #ffffff;
}

.code-mask {
  background: rgba(255, 255, 255, 0.2);
  border-left: 1px dashed rgba(255, 255, 255, 0.5);
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* Vote & Share buttons */
.feedback-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-thumb {
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border);
}

.btn-thumb:hover, .btn-thumb.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ==========================================================================
   Live Search Dropdown Results
   ========================================================================== */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  text-align: left;
}

.search-results-dropdown.show {
  display: block;
}

.search-result-header {
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--bg-muted);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.search-result-item:hover, .search-result-item.highlighted {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.search-result-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Coupon Modal Dialog
   ========================================================================== */
.coupon-modal-overlay, .modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.coupon-modal-overlay.open, .modal-overlay.open {
  display: flex;
}

.coupon-modal-dialog, .coupon-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 2.25rem 2rem;
  position: relative;
  box-shadow: var(--shadow-xl);
  text-align: center;
  border: 1px solid var(--border);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.modal-store-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.modal-store-logo {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  margin: 0 auto 1rem;
  border: 1px solid var(--border);
  padding: 4px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.coupon-code-box, .modal-code-box {
  background: #f8fafc;
  border: 2px dashed #3b82f6;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0;
  gap: 1rem;
}

.coupon-code-text, .modal-code-text {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e40af;
  letter-spacing: 1.5px;
}

.btn-copy-code {
  background: var(--primary);
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.btn-copy-code:hover {
  background: var(--primary-hover);
}

.btn-go-to-store {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #ffffff;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-go-to-store:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   FAQ Accordion Section (SEO Optimized)
   ========================================================================== */
.faq-wrap, .faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item.active {
  border-color: #93c5fd;
  box-shadow: var(--shadow-xs);
}

.faq-question {
  width: 100%;
  padding: 1.15rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  padding: 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  padding-top: 0.25rem;
  padding-bottom: 1.25rem;
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs .current {
  color: var(--text-main);
  font-weight: 600;
}
