:root {
  --orange-gradient: linear-gradient(135deg, #ff6b00, #ff8f33, #ffaa66);
  --orange-light: #fff3e6;
  --orange-dark: #cc5500;
  --shadow-orange: rgba(255, 107, 0, 0.3);
  --shadow-soft: rgba(0, 0, 0, 0.1);
}

.custom-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.category-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff, #fef8f3);
  border-radius: 24px;
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 8px 32px rgba(255, 107, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid rgba(255, 107, 0, 0.1);
}

.category-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--tp-text-primary), transparent);
  opacity: 0;
  transition: all 0.6s ease;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.category-card:hover::before {
  opacity: 0.1;
}

.category-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(255, 107, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.1);
}

.category-link {
  display: block;
  position: relative;
  text-decoration: none;
  margin-bottom: 20px;
}

.category-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--orange-gradient);
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 1;
}

.category-card:hover .category-ring {
  opacity: 0.15;
  transform: translate(-50%, -50%) scale(1.2);
}

.category-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
  border: 4px solid transparent;
  background: linear-gradient(white, white) padding-box,
    var(--orange-gradient) border-box;
  box-shadow: 0 8px 24px var(--shadow-orange);
}

.category-card:hover .category-img {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--tp-text-primary);
  box-shadow: 0 12px 32px var(--shadow-orange);
}

.category-shine {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  background: linear-gradient(45deg, #fff, var(--orange-light));
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.6);
}

.category-card:hover .category-shine {
  opacity: 1;
  transform: scale(1.2);
}

.tpcategory__content {
  text-align: center;
  position: relative;
  z-index: 3;
}

.tpcategory__title {
  margin: 0;
  font-size: 1.25em;
  font-weight: 600;
}

.tpcategory__title a {
  color: #2d3748;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  background: linear-gradient(to right, var(--tp-text-primary), var(--orange-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  background-position: 100% 0;
}

.tpcategory__title a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--orange-gradient);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.category-card:hover .tpcategory__title a {
  background-position: 0 0;
  transform: translateY(-2px);
}

.category-card:hover .tpcategory__title a::after {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .custom-row {
    grid-template-columns: repeat(auto-fit, minmax(225spx, 1fr));
    gap: 20px;
    padding: 15px;
  }

  .category-card {
    padding: 20px;
  }

  .category-img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .custom-row {
    grid-template-columns: 1fr;
  }

  .category-card {
    margin: 0 10px;
  }
}

/* Loading Animation */
.category-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.category-card:nth-child(1) {
  animation-delay: 0.1s;
}

.category-card:nth-child(2) {
  animation-delay: 0.2s;
}

.category-card:nth-child(3) {
  animation-delay: 0.3s;
}

.category-card:nth-child(4) {
  animation-delay: 0.4s;
}

.category-card:nth-child(5) {
  animation-delay: 0.5s;
}

.category-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glowing Effect on Hover */
.category-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  padding: 2px;
  background: var(--orange-gradient);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover::after {
  opacity: 0.6;
}

/* ---- Fix 6'lı grid ---- */
.custom-row{
  display:grid;
  grid-template-columns: repeat(6, minmax(0,1fr)); /* 6 kolon sabit */
  gap:24px;
  max-width:1400px;
  margin:0 auto;
  padding:20px;
}

/* Kademeli kırılımlar */
@media (max-width: 1399.98px){
  .custom-row{ grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 1199.98px){
  .custom-row{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 991.98px){
  .custom-row{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 767.98px){
  .custom-row{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 479.98px){
  .custom-row{ grid-template-columns: 1fr; }
}

/* ---- Başlık görünmüyor (gradient-text şeffaflığı) düzeltmesi ---- */
/* Varsayılan metni normal renkte göster; hover'da gradient uygula */
:root{
  --tp-text-primary: #ff6b00; /* yoksa görünmez olur; fallback veriyoruz */
}

.tpcategory__title{
  margin:0;
  font-size:1.1rem;
  font-weight:600;
  line-height:1.3;
}

.tpcategory__title a{
  color:#2d3748;                 /* normalde görünür metin */
  text-decoration:none;
  transition:all .3s ease;
  background:none;               /* şeffaf yazı kapalı */
  -webkit-text-fill-color:initial;
}

.category-card:hover .tpcategory__title a{
  background:linear-gradient(to right, var(--tp-text-primary), var(--orange-dark));
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;   /* sadece hover’da gradient yazı */
  transform:translateY(-2px);
}

.tpcategory__title a::after{
  content:'';
  position:absolute;
  bottom:-5px; left:50%;
  width:0; height:3px;
  background:var(--orange-gradient);
  transition:all .3s ease;
  transform:translateX(-50%);
  border-radius:2px;
}
.category-card:hover .tpcategory__title a::after{ width:100%; }

@media (max-width: 768px){
  .custom-row{ gap:20px; padding:15px; }
  .category-card{ padding:20px; }
  .category-img{ width:100px; height:100px; }
}

.category-card::before{
  background: conic-gradient(from 0deg, transparent, var(--tp-text-primary, #ff6b00), transparent);
}

.custom-row.justify-content-around{ justify-content:unset; }
