/**
 * CiCC Theme 4.0 — Pattern Styles (Design System)
 * Cards, Grids, Sections, Listings
 */

/* ===========================
   MODERN CARDS
   =========================== */
.cicc-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.cicc-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cicc-card__thumb {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
}

.cicc-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cicc-card:hover .cicc-card__thumb img {
  transform: scale(1.08);
}

.cicc-card__thumb .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,23,42,0.6) 0%, transparent 50%);
  z-index: 1;
}

.cicc-card__badges {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.cicc-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.cicc-card__badge--cat {
  background: rgba(0, 87, 163, 0.9);
  color: #fff;
}

.cicc-card__badge--date {
  background: rgba(15, 23, 42, 0.75);
  color: rgba(255,255,255,0.9);
}

.cicc-card__badge--price {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(249, 115, 22, 0.95);
  color: #fff;
  font-weight: 700;
}

.cicc-card__badge--sale {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.cicc-card__body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cicc-card__body h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cicc-card__body p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cicc-card__footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
}

.cicc-card__price {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0057a3;
}

.cicc-card__price del {
  font-size: 0.9375rem;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 8px;
  text-decoration: line-through;
}

.cicc-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0057a3;
  transition: gap 0.3s ease;
}

.cicc-card:hover .cicc-card__link {
  gap: 10px;
}

/* ===========================
   FEATURED / LARGE CARDS
   =========================== */
.cicc-card--featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cicc-card--featured .cicc-card__thumb {
  height: 100%;
  min-height: 320px;
}

.cicc-card--featured .cicc-card__body {
  padding: 32px;
}

.cicc-card--featured .cicc-card__body h3 {
  font-size: 1.375rem;
}

/* ===========================
   HERO SECTIONS
   =========================== */
.cicc-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.cicc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cicc-hero--gradient-navy {
  background: linear-gradient(135deg, #0f172a 0%, #0057a3 40%, #0077be 100%);
  color: #fff;
}

.cicc-hero--gradient-purple {
  background: linear-gradient(135deg, #0f172a 0%, #3b0764 40%, #7c3aed 100%);
  color: #fff;
}

.cicc-hero--gradient-green {
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 40%, #16a34a 100%);
  color: #fff;
}

.cicc-hero--gradient-orange {
  background: linear-gradient(135deg, #0f172a 0%, #7c2d12 40%, #f97316 100%);
  color: #fff;
}

.cicc-hero--sm {
  padding: 120px 0 60px;
}

.cicc-hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cicc-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.cicc-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.cicc-hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 32px;
}

.cicc-hero__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.cicc-hero__stat {
  text-align: center;
}

.cicc-hero__stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.cicc-hero__stat-label {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ===========================
   FILTER BAR
   =========================== */
.cicc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 20px 24px;
  background: #f8fafc;
  border-radius: 16px;
  margin-bottom: 40px;
}

.cicc-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cicc-filter__btn:hover {
  border-color: #0057a3;
  color: #0057a3;
  background: rgba(0,87,163,0.04);
}

.cicc-filter__btn--active {
  background: #0057a3;
  border-color: #0057a3;
  color: #fff;
}

.cicc-filter__btn--active:hover {
  background: #004080;
  color: #fff;
}

.cicc-filter__btn .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(0,0,0,0.06);
}

.cicc-filter__btn--active .count {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}

/* ===========================
   SECTION STYLES
   =========================== */
.cicc-section {
  padding: 80px 0;
}

.cicc-section--alt {
  background: #f8fafc;
}

.cicc-section--dark {
  background: #0f172a;
  color: #fff;
}

.cicc-section--sm {
  padding: 48px 0;
}

.cicc-section__header {
  text-align: center;
  margin-bottom: 48px;
}

.cicc-section__header h2 {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  font-weight: 800;
  margin: 0 0 12px;
  color: #0f172a;
}

.cicc-section__header p {
  font-size: 1.0625rem;
  color: #64748b;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.cicc-section--dark .cicc-section__header h2 {
  color: #fff;
}

.cicc-section--dark .cicc-section__header p {
  color: rgba(255,255,255,0.7);
}

/* ===========================
   MODERN GRID
   =========================== */
.cicc-grid {
  display: grid;
  gap: 28px;
}

.cicc-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cicc-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cicc-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .cicc-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cicc-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cicc-card--featured { grid-column: span 1; grid-template-columns: 1fr; }
  .cicc-card--featured .cicc-card__thumb { min-height: 200px; }
}

@media (max-width: 768px) {
  .cicc-grid--2,
  .cicc-grid--3,
  .cicc-grid--4 { grid-template-columns: 1fr; }
  .cicc-hero__stats { flex-wrap: wrap; gap: 24px; }
  .cicc-section { padding: 48px 0; }
}

/* ===========================
   PAGINATION
   =========================== */
.cicc-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 48px;
}

.cicc-pagination a,
.cicc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cicc-pagination a {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #475569;
}

.cicc-pagination a:hover {
  border-color: #0057a3;
  color: #0057a3;
  background: rgba(0,87,163,0.04);
}

.cicc-pagination .current {
  background: #0057a3;
  border-color: #0057a3;
  color: #fff;
}

/* ===========================
   CTA
   =========================== */
.cicc-cta {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, #0f172a 0%, #0057a3 50%, #0077be 100%);
  position: relative;
  overflow: hidden;
}

.cicc-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cicc-cta .container {
  position: relative;
  z-index: 1;
}

.cicc-cta h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
}

.cicc-cta p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  margin: 0 0 32px;
}

.cicc-cta p strong {
  color: #fbbf24;
}

.cicc-cta__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   RESPONSIVE FOR MOBILE
   =========================== */
@media (max-width: 640px) {
  .cicc-card__thumb { height: 180px; }
  .cicc-card__body { padding: 16px 20px 20px; }
  .cicc-card__body h3 { font-size: 0.9375rem; }
  .cicc-filter { padding: 16px; border-radius: 12px; }
}
