/* ==========================================================================
   SPECIAL OFFERS & SCHEMES PAGE STYLING - GARG PHARMACEUTICALS
   Dedicated deals portal for 2,200+ scheme medicines from inventory.csv
   ========================================================================== */

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

:root {
  --deal-orange: #ea580c;
  --deal-orange-light: #fff7ed;
  --deal-orange-border: #fed7aa;
  
  --deal-green: #15803d;
  --deal-green-light: #f0fdf4;
  --deal-green-border: #bbf7d0;

  --deal-purple: #7c3aed;
  --deal-purple-light: #f5f3ff;
  
  --deal-navy: #0b1528;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  
  --border-light: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.09);
}

/* Page Banner */
.offers-hero {
  background: linear-gradient(135deg, #0b1528 0%, #16243d 100%);
  color: #ffffff;
  padding: 48px 0 54px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--deal-orange);
}

.offers-hero::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.offers-badge-flame {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(234, 88, 12, 0.2);
  border: 1px solid rgba(234, 88, 12, 0.45);
  color: #fdba74;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.offers-hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.offers-hero-title span {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.offers-hero-sub {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 680px;
  line-height: 1.6;
}

/* Stats Counter Row */
.offers-metric-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.metric-pill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: #f1f5f9;
}

.metric-pill-item strong {
  color: #4ade80;
  font-size: 1.15rem;
}

/* Filter Control Hub */
.offers-filter-hub {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  margin-top: -30px;
  position: relative;
  z-index: 20;
  margin-bottom: 34px;
}

.filter-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.offers-search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.offers-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--deal-orange);
  pointer-events: none;
}

.offers-search-input {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 48px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.offers-search-input:focus {
  border-color: var(--deal-orange);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  display: none;
}

.offers-sort-select {
  height: 48px;
  padding: 0 16px;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 600;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
}

.offers-sort-select:focus {
  border-color: var(--deal-green);
}

/* Category Tabs */
.offers-tab-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.offer-tab-btn {
  background: #f1f5f9;
  border: 1.5px solid transparent;
  color: var(--text-body);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.offer-tab-btn:hover {
  background: var(--deal-orange-light);
  color: var(--deal-orange);
  border-color: var(--deal-orange-border);
}

.offer-tab-btn.active {
  background: var(--deal-orange);
  color: #ffffff;
  border-color: var(--deal-orange);
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.35);
}

.offer-tab-badge {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}

.offer-tab-btn.active .offer-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Results Section */
.offers-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.offers-count-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
}

.offers-count-text span {
  color: var(--deal-orange);
}

/* Card Grid */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.offer-product-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.offer-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--deal-orange);
}

.card-ribbon-scheme {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}

.card-med-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 4px;
  font-family: 'Outfit', sans-serif;
}

.card-seller-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

/* Price Box */
.card-pricing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1px solid #f1f5f9;
}

.price-mrp-block {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-mrp-block s {
  color: #94a3b8;
  font-weight: 600;
}

.price-ptr-block {
  text-align: right;
}

.price-ptr-block .ptr-label {
  font-size: 0.7rem;
  color: var(--deal-green);
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.price-ptr-block .ptr-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--deal-green);
}

/* Stock & Expiry Row */
.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-light);
}

.badge-stock-qty {
  font-weight: 700;
  color: var(--deal-green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-expiry-date {
  font-weight: 600;
  color: #475569;
}

.badge-expiry-date.short-expiry {
  color: #dc2626;
  background: #fef2f2;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Action Buttons inside Card */
.card-action-group {
  display: flex;
  gap: 8px;
}

.btn-card-order {
  flex: 1;
  background: var(--deal-green);
  color: #ffffff;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.btn-card-order:hover {
  background: #166534;
  transform: translateY(-1px);
}

.btn-card-wa {
  width: 42px;
  height: 42px;
  background: #25d366;
  color: #ffffff;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-card-wa:hover {
  background: #1eb956;
  transform: translateY(-1px);
}

/* Pagination */
.offers-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 30px 0 60px;
}

.btn-page-ctrl {
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-page-ctrl:hover:not(:disabled) {
  background: var(--deal-orange-light);
  border-color: var(--deal-orange);
  color: var(--deal-orange);
}

.btn-page-ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-body);
  margin: 0 10px;
}

/* Company Quick Filter Bar */
.offers-company-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
  flex-wrap: wrap;
}

.company-bar-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.offers-company-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.offer-comp-chip {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.18s ease;
}

.offer-comp-chip:hover {
  background: #ffffff;
  border-color: var(--deal-orange);
  color: var(--deal-orange);
}

.offer-comp-chip.active {
  background: var(--deal-orange);
  border-color: var(--deal-orange);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

@media (max-width: 768px) {
  .offers-hero-title {
    font-size: 1.7rem;
  }
  .filter-top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .offers-search-box {
    min-width: 0 !important;
    width: 100%;
  }
  .offers-sort-select {
    width: 100%;
  }
  .offers-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px !important;
  }
  .offers-hero-title {
    font-size: 1.45rem;
  }
}

