/* ============================================================
   IslamHashtag Product Showcase — showcase.css
   Design: warm cream × maroon × gold accent
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --ihs-cream:        #FAF7F2;
  --ihs-cream-dark:   #F0EBE1;
  --ihs-teal:         #6B1A1A;
  --ihs-teal-light:   #8B2A2A;
  --ihs-teal-pale:    #F5EAEA;
  --ihs-gold:         #C9913A;
  --ihs-gold-light:   #F5E6CC;
  --ihs-text:         #2C2C2C;
  --ihs-text-muted:   #6B6B6B;
  --ihs-border:       #E0D8CC;
  --ihs-white:        #FFFFFF;
  --ihs-red:          #C94040;
  --ihs-red-light:    #FDE8E8;
  --ihs-shadow-sm:    0 2px 8px rgba(107,26,26,.08);
  --ihs-shadow-md:    0 4px 20px rgba(107,26,26,.12);
  --ihs-shadow-lg:    0 8px 32px rgba(107,26,26,.16);
  --ihs-radius-sm:    8px;
  --ihs-radius-md:    14px;
  --ihs-radius-lg:    20px;
  --ihs-font-arabic:  'Amiri', 'Scheherazade New', 'Traditional Arabic', Georgia, serif;
  --ihs-font-body:    'Nunito', 'Segoe UI', system-ui, sans-serif;
  --ihs-transition:   0.22s cubic-bezier(.4,0,.2,1);
}

/* ── Wrapper ─────────────────────────────────────────────── */
.ihs-showcase {
  font-family: var(--ihs-font-body);
  color: var(--ihs-text);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 60px;
  box-sizing: border-box;
}

.ihs-showcase *, .ihs-showcase *::before, .ihs-showcase *::after {
  box-sizing: inherit;
}

/* ── Header ──────────────────────────────────────────────── */
.ihs-header {
  position: relative;
  background: linear-gradient(135deg, var(--ihs-teal) 0%, #4A0A0A 100%);
  border-radius: var(--ihs-radius-lg);
  padding: 48px 40px 44px;
  margin-bottom: 32px;
  overflow: hidden;
  text-align: center;
}

.ihs-header__crescent {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 180px;
  height: 180px;
  color: #FFFFFF;
  opacity: .15;
  pointer-events: none;
}

.ihs-header__text {
  position: relative;
  z-index: 1;
}

.ihs-header__bismillah {
  display: block;
  font-family: var(--ihs-font-arabic);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--ihs-gold);
  letter-spacing: .02em;
  line-height: 1.6;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.ihs-header__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--ihs-white);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.ihs-header__subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin: 0;
}

/* ── Filters ─────────────────────────────────────────────── */
.ihs-filters {
  background: var(--ihs-white);
  border: 1px solid var(--ihs-border);
  border-radius: var(--ihs-radius-md);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--ihs-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ihs-search {
  position: relative;
}

.ihs-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ihs-text-muted);
  pointer-events: none;
}

#ihs-search-input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1.5px solid var(--ihs-border);
  border-radius: var(--ihs-radius-sm);
  font-size: .95rem;
  font-family: var(--ihs-font-body);
  color: var(--ihs-text);
  background: var(--ihs-cream);
  transition: border-color var(--ihs-transition), box-shadow var(--ihs-transition);
  outline: none;
}

#ihs-search-input:focus {
  border-color: var(--ihs-teal);
  box-shadow: 0 0 0 3px rgba(107,26,26,.12);
  background: var(--ihs-white);
}

#ihs-search-input::placeholder {
  color: #AAA;
}

.ihs-filter-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.ihs-filter-group__label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ihs-text-muted);
  padding-top: 6px;
  min-width: 56px;
  flex-shrink: 0;
}

.ihs-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Subject tabs — rich card style */
.ihs-filter-tabs:not(.ihs-filter-tabs--pills) .ihs-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1.5px solid var(--ihs-border);
  border-radius: var(--ihs-radius-sm);
  background: var(--ihs-cream);
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--ihs-font-body);
  color: var(--ihs-text-muted);
  cursor: pointer;
  transition: all var(--ihs-transition);
  white-space: nowrap;
}

.ihs-filter-tabs:not(.ihs-filter-tabs--pills) .ihs-tab:hover {
  border-color: var(--ihs-teal);
  color: var(--ihs-teal);
  background: var(--ihs-teal-pale);
}

.ihs-filter-tabs:not(.ihs-filter-tabs--pills) .ihs-tab--active {
  background: var(--ihs-teal);
  border-color: var(--ihs-teal);
  color: var(--ihs-white);
  box-shadow: 0 2px 8px rgba(107,26,26,.25);
}

/* Audience / Format — pill style */
.ihs-filter-tabs--pills .ihs-tab {
  padding: 5px 14px;
  border: 1.5px solid var(--ihs-border);
  border-radius: 999px;
  background: transparent;
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--ihs-font-body);
  color: var(--ihs-text-muted);
  cursor: pointer;
  transition: all var(--ihs-transition);
  white-space: nowrap;
}

.ihs-filter-tabs--pills .ihs-tab:hover {
  border-color: var(--ihs-gold);
  color: var(--ihs-gold);
}

.ihs-filter-tabs--pills .ihs-tab--active {
  background: var(--ihs-gold-light);
  border-color: var(--ihs-gold);
  color: #8A5E1A;
}

.ihs-tab__icon {
  font-size: 1rem;
  line-height: 1;
}

/* ── Active filter strip ─────────────────────────────────── */
.ihs-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin-bottom: 8px;
}

.ihs-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  background: var(--ihs-teal-pale);
  border: 1px solid var(--ihs-teal-light);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ihs-teal);
}

.ihs-filter-chip__remove {
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(107,26,26,.15);
  border-radius: 50%;
  border: none;
  padding: 0;
  color: var(--ihs-teal);
  font-size: .7rem;
  transition: background var(--ihs-transition);
}

.ihs-filter-chip__remove:hover {
  background: rgba(107,26,26,.3);
}

/* ── Results meta ─────────────────────────────────────────── */
.ihs-results-meta {
  margin-bottom: 20px;
}

.ihs-results-meta__count {
  font-size: .85rem;
  color: var(--ihs-text-muted);
  font-weight: 500;
}

/* ── Grid ─────────────────────────────────────────────────── */
.ihs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ── Product Card ─────────────────────────────────────────── */
.ihs-card {
  background: var(--ihs-white);
  border: 1px solid var(--ihs-border);
  border-radius: var(--ihs-radius-md);
  overflow: hidden;
  box-shadow: var(--ihs-shadow-sm);
  transition: transform var(--ihs-transition), box-shadow var(--ihs-transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ihs-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ihs-shadow-lg);
}

/* Sale badge */
.ihs-card__sale-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--ihs-red);
  color: var(--ihs-white);
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Image */
.ihs-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ihs-cream-dark);
}

.ihs-card__image-wrap a {
  display: block;
  height: 100%;
}

.ihs-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.ihs-card:hover .ihs-card__image {
  transform: scale(1.04);
}

/* Type label */
.ihs-card__type {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(107,26,26,.85);
  backdrop-filter: blur(4px);
  color: var(--ihs-white);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Body */
.ihs-card__body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Category badges */
.ihs-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ihs-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--ihs-gold-light);
  color: #8A5E1A;
  border: 1px solid #E8C98A;
  text-transform: capitalize;
}

.ihs-badge--teal {
  background: var(--ihs-teal-pale);
  color: var(--ihs-teal);
  border-color: #A8D8DF;
}

/* Title */
.ihs-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ihs-text);
  margin: 0;
  line-height: 1.35;
}

.ihs-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ihs-transition);
}

.ihs-card__title a:hover {
  color: var(--ihs-teal);
}

/* Short desc */
.ihs-card__desc {
  font-size: .84rem;
  color: var(--ihs-text-muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* Footer */
.ihs-card__footer {
  padding: 0 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

/* Price */
.ihs-card__price {
  display: flex;
  flex-direction: column;
}

.ihs-card__price .woocommerce-Price-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ihs-teal);
}

.ihs-card__price del .woocommerce-Price-amount {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ihs-text-muted);
}

.ihs-card__price ins {
  text-decoration: none;
}

/* CTA */
.ihs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--ihs-radius-sm);
  font-size: .875rem;
  font-weight: 700;
  font-family: var(--ihs-font-body);
  cursor: pointer;
  transition: all var(--ihs-transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.ihs-btn--primary {
  background: var(--ihs-teal);
  color: var(--ihs-white);
  border-color: var(--ihs-teal);
}

.ihs-btn--primary:hover {
  background: var(--ihs-teal-light);
  border-color: var(--ihs-teal-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107,26,26,.3);
  color: var(--ihs-white);
  text-decoration: none;
}

.ihs-btn--outline {
  background: transparent;
  color: var(--ihs-teal);
  border-color: var(--ihs-teal);
}

.ihs-btn--outline:hover {
  background: var(--ihs-teal);
  color: var(--ihs-white);
  text-decoration: none;
}

.ihs-btn--view {
  background: transparent;
  border-color: var(--ihs-border);
  color: var(--ihs-text-muted);
  padding: 9px 12px;
}

.ihs-btn--view:hover {
  border-color: var(--ihs-teal);
  color: var(--ihs-teal);
}

/* ── Loading state ───────────────────────────────────────── */
.ihs-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--ihs-text-muted);
  font-size: .9rem;
}

.ihs-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--ihs-teal-pale);
  border-top-color: var(--ihs-teal);
  border-radius: 50%;
  animation: ihs-spin 0.7s linear infinite;
}

@keyframes ihs-spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loader */
.ihs-skeleton {
  background: var(--ihs-white);
  border: 1px solid var(--ihs-border);
  border-radius: var(--ihs-radius-md);
  overflow: hidden;
}

.ihs-skeleton__img {
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, var(--ihs-cream-dark) 25%, var(--ihs-cream) 50%, var(--ihs-cream-dark) 75%);
  background-size: 200% 100%;
  animation: ihs-shimmer 1.4s infinite;
}

.ihs-skeleton__body {
  padding: 16px 18px;
}

.ihs-skeleton__line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ihs-cream-dark) 25%, var(--ihs-cream) 50%, var(--ihs-cream-dark) 75%);
  background-size: 200% 100%;
  animation: ihs-shimmer 1.4s infinite;
  margin-bottom: 10px;
}

.ihs-skeleton__line--short { width: 60%; }
.ihs-skeleton__line--med   { width: 85%; }
.ihs-skeleton__line--full  { width: 100%; }

@keyframes ihs-shimmer {
  to { background-position: -200% 0; }
}

/* ── Empty state ─────────────────────────────────────────── */
.ihs-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--ihs-cream);
  border-radius: var(--ihs-radius-md);
  border: 2px dashed var(--ihs-border);
}

.ihs-empty__icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.ihs-empty h3 {
  font-size: 1.3rem;
  color: var(--ihs-text);
  margin: 0 0 8px;
}

.ihs-empty p {
  color: var(--ihs-text-muted);
  margin: 0 0 24px;
}

/* ── Load More ───────────────────────────────────────────── */
.ihs-load-more-wrap {
  text-align: center;
  margin-top: 40px;
}

.ihs-load-more {
  padding: 12px 36px;
  background: var(--ihs-white);
  border: 2px solid var(--ihs-teal);
  border-radius: var(--ihs-radius-sm);
  color: var(--ihs-teal);
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--ihs-font-body);
  cursor: pointer;
  transition: all var(--ihs-transition);
}

.ihs-load-more:hover {
  background: var(--ihs-teal);
  color: var(--ihs-white);
  transform: translateY(-1px);
  box-shadow: var(--ihs-shadow-md);
}

.ihs-load-more:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* ── Card enter animation ─────────────────────────────────── */
.ihs-card {
  animation: ihs-card-in 0.35s ease both;
}

@keyframes ihs-card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger via nth-child */
.ihs-card:nth-child(2) { animation-delay: .04s; }
.ihs-card:nth-child(3) { animation-delay: .08s; }
.ihs-card:nth-child(4) { animation-delay: .12s; }
.ihs-card:nth-child(5) { animation-delay: .16s; }
.ihs-card:nth-child(6) { animation-delay: .20s; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .ihs-header {
    padding: 36px 24px 32px;
  }
  .ihs-filters {
    padding: 18px 20px;
    gap: 16px;
  }
  .ihs-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .ihs-header {
    padding: 28px 18px 24px;
    border-radius: var(--ihs-radius-md);
  }
  .ihs-header__crescent { display: none; }
  .ihs-filters { padding: 14px 16px; gap: 14px; }
  .ihs-filter-group { flex-direction: column; gap: 8px; }
  .ihs-filter-group__label { min-width: unset; padding-top: 0; }
  .ihs-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .ihs-card__footer { flex-direction: column; align-items: flex-start; }
  .ihs-btn { width: 100%; justify-content: center; }
}

/* ── RTL Arabic content ───────────────────────────────────── */
.ihs-header__bismillah {
  direction: rtl;
}

/* ── Respect prefers-reduced-motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ihs-card { animation: none; }
  .ihs-spinner { animation: none; border-top-color: var(--ihs-teal); }
  .ihs-skeleton__img,
  .ihs-skeleton__line { animation: none; }
  .ihs-card:hover { transform: none; }
  .ihs-btn:hover  { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   TYPE TABS  (Worksheets / Courses / Self-Study)
   ═══════════════════════════════════════════════════════════ */

.ihs-type-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ihs-type-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 14px 16px;
  background: var(--ihs-white);
  border: 2px solid var(--ihs-border);
  border-radius: var(--ihs-radius-md);
  cursor: pointer;
  font-family: var(--ihs-font-body);
  text-align: center;
  transition: all var(--ihs-transition);
  position: relative;
  box-shadow: var(--ihs-shadow-sm);
}

.ihs-type-tab:hover {
  border-color: var(--ihs-teal);
  background: var(--ihs-teal-pale);
  transform: translateY(-2px);
  box-shadow: var(--ihs-shadow-md);
}

.ihs-type-tab--active {
  border-color: var(--ihs-teal) !important;
  background: var(--ihs-teal) !important;
  color: white;
  box-shadow: var(--ihs-shadow-md);
  transform: translateY(-2px);
}

.ihs-type-tab__icon {
  font-size: 1.8rem;
  line-height: 1;
  display: block;
}

.ihs-type-tab__label {
  font-size: .95rem;
  font-weight: 700;
  display: block;
  color: var(--ihs-text);
  transition: color var(--ihs-transition);
}

.ihs-type-tab--active .ihs-type-tab__label {
  color: white;
}

.ihs-type-tab__desc {
  font-size: .72rem;
  color: var(--ihs-text-muted);
  display: block;
  line-height: 1.4;
  transition: color var(--ihs-transition);
}

.ihs-type-tab--active .ihs-type-tab__desc {
  color: rgba(255,255,255,.8);
}

/* Count badge */
.ihs-type-tab__count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  background: var(--ihs-gold-light);
  color: #8A5E1A;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.6;
  transition: all var(--ihs-transition);
}

.ihs-type-tab__count:empty {
  display: none;
}

.ihs-type-tab--active .ihs-type-tab__count {
  background: rgba(255,255,255,.25);
  color: white;
}

/* Active-tab indicator line */
.ihs-type-tab--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--ihs-gold);
  border-radius: 999px;
}

/* ── Responsive type tabs ─────────────────────────────────── */
@media (max-width: 600px) {
  .ihs-type-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ihs-type-tab {
    padding: 14px 10px 12px;
  }
  .ihs-type-tab__icon  { font-size: 1.4rem; }
  .ihs-type-tab__label { font-size: .85rem; }
  .ihs-type-tab__desc  { display: none; }
}
