/* ==================================================================
   promosyonlar.css — section/pages/promosyonlar.php sayfa özel stili.
   Kategori butonu bar + promo grid + hover overlay. Ana style.css
   marka paletiyle uyumlu (koyu zeytin + zeytinyağı-yeşili primary).
   ================================================================== */

.pw-container {
  padding: 12px 12px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

/* Kategori butonları — yatay scroll, mobilde swipe */
.pw-categories {
  display: flex;
  gap: 8px;
  padding: 4px 2px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.pw-categories::-webkit-scrollbar { display: none; }

.pw-cat-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid #2e360f;
  background: #1c2109;
  color: #cfd0b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  transition: all .18s;
  scroll-snap-align: start;
  text-transform: uppercase;
  white-space: nowrap;
}
.pw-cat-btn:hover {
  border-color: #7e890e;
  color: #fff;
}
.pw-cat-btn.active {
  background: linear-gradient(180deg,#a2b112 0%,#6a7908 100%);
  color: #131703;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(126,137,14,.35);
}

/* Grid — mobilde 2 kolon, tabletde 3, geniş ekranda 4 */
.pw-promos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .pw-promos-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
}
@media (min-width: 960px) {
  .pw-promos-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
}

/* Promo kartı */
.pw-promo-item {
  background: #1c2109;
  border: 1px solid #2a300d;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .18s, border-color .18s;
  min-width: 0;
}
.pw-promo-item:hover {
  transform: translateY(-2px);
  border-color: #7e890e;
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}

/* Görsel — doğal orana bırakılır (görsellerin kendisinde metin/tutar
   gömülü olduğu için crop yapmıyoruz). */
.pw-promo-img {
  position: relative;
  overflow: hidden;
  background: #0f1305;
  line-height: 0;
}
.pw-promo-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .3s;
}
.pw-promo-item:hover .pw-promo-img img { transform: scale(1.03); }

/* Overlay ve DETAYLI BİLGİ butonu artık kullanılmıyor — kart tıklaması
   modal açıyor. Görseldeki orijinaline uygun olarak overlay'i gizle. */
.pw-promo-overlay { display: none !important; }

/* Küçük ekranda overlay her zaman görünsün (touch cihaz) */
@media (hover: none) {
  .pw-promo-overlay { opacity: 1; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55) 100%); }
}

.pw-detail-btn {
  background: linear-gradient(180deg,#a2b112 0%,#6a7908 100%);
  color: #131703;
  border: 0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(126,137,14,.4);
  transition: transform .1s, box-shadow .15s;
}
.pw-detail-btn:active { transform: translateY(1px); }
.pw-detail-btn:hover { box-shadow: 0 6px 16px rgba(126,137,14,.5); }

/* Başlık */
.pw-promo-title {
  padding: 10px 12px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 42px;
  display: flex;
  align-items: center;
  text-align: left;
}
@media (min-width: 640px) {
  .pw-promo-title { font-size: 13px; }
}

/* Boş durum — filtre eşleşmezse */
.pw-promos-grid:empty::after,
.pw-promos-grid:has(> :not([style*="none"]):nth-child(1)) ~ .pw-empty { display: none; }

/* ==================================================================
   Kullanıcı özel tema — GRANDPASHABET uyumlu (zeytin + neon-yeşil aksent).
   Aşağıdaki bloklar yukarıdaki base kuralları override eder.
   ================================================================== */

/* Kategori butonları */
.pw-cat-btn {
  background: #1c2f05;
  border-color: rgba(170, 255, 0, 0.18);
  color: #fff;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
  -webkit-user-select: none;
}
.pw-cat-btn:focus,
.pw-cat-btn:focus-visible { outline: none; box-shadow: none; }
.pw-cat-btn:hover {
  background: #243700;
  border-color: rgba(170, 255, 0, 0.45);
  color: #fff;
}
.pw-cat-btn.active {
  background: linear-gradient(135deg, #1f3800, #2c5000);
  border-color: rgba(170, 255, 0, 0.5);
  color: #aaff00;
}

/* Kart */
.pw-promo-item {
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  background: linear-gradient(160deg, #1a2b00 0%, #0d1a00 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(170, 255, 0, 0.06) inset;
  border: 1px solid rgba(170, 255, 0, 0.18);
}
.pw-promo-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 12px rgba(170, 255, 0, 0.08);
  border-color: rgba(170, 255, 0, 0.45);
}

/* Kart başlığı */
.pw-promo-title {
  color: #fff;
  text-transform: uppercase;
  padding: 10px 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0;
  display: block;
  text-align: center;
}

/* Overlay butonu */
.pw-detail-btn {
  background: linear-gradient(135deg, #1f3800, #162800);
  color: #aaff00;
  border: 1px solid rgba(170, 255, 0, 0.35);
  font-weight: 600;
  box-shadow: none;
}

/* Backdrop */
.pw-backdrop { background: rgba(5, 12, 0, 0.78); }

/* Modal */
.pw-modal {
  background: linear-gradient(180deg, #162800 0%, #101e00 50%, #1e3600 100%);
  border: 1px solid rgba(170, 255, 0, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(170, 255, 0, 0.07);
}

/* Modal yazılar */
.pw-block { color: rgba(255, 255, 255, 0.82); line-height: 1.75; }
.pw-block h1,
.pw-block h2,
.pw-block h3 { color: #fff; font-weight: 700; }
.pw-block a { color: #aaff00; }
.pw-block strong,
.pw-block b { color: #fff; }

/* Tablo */
.pw-block table td,
.pw-block table th {
  border-color: rgba(170, 255, 0, 0.1);
  color: rgba(255, 255, 255, 0.8);
}
.pw-block table th {
  background: rgba(170, 255, 0, 0.08);
  color: #fff;
  font-weight: 600;
}
.pw-block table tr:nth-child(even) td { background: rgba(170, 255, 0, 0.04); }

/* Kapatma butonu */
.pw-close {
  background: rgba(170, 255, 0, 0.07);
  border-color: rgba(170, 255, 0, 0.18);
}
.pw-close:hover {
  background: rgba(170, 255, 0, 0.14);
  border-color: rgba(170, 255, 0, 0.35);
}
.pw-close svg { stroke: rgba(255, 255, 255, 0.85); }

/* Scrollbar */
.pw-modal-body { scrollbar-color: rgba(170, 255, 0, 0.2) transparent; }
.pw-modal-body::-webkit-scrollbar-thumb { background: rgba(170, 255, 0, 0.2); }
.pw-modal-body::-webkit-scrollbar-thumb:hover { background: rgba(170, 255, 0, 0.38); }

/* Boş mesaj */
.pw-empty { color: rgba(255, 255, 255, 0.35); }

/* Numarasız liste tasarımı */
.pw-block ul {
  display: block !important;
  list-style: none !important;
  padding-left: 0 !important;
}
.pw-block ul li {
  display: block !important;
  padding: 2px 28px !important;
  position: relative !important;
}
.pw-block ul li::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 10px !important;
  width: 7px !important;
  height: 7px !important;
  background: #d0b64e !important;
  border-radius: 50% !important;
}

/* Tablo içeriği ortala */
#pw-modal-content table tr { text-align: center; }

/* Promosyonlar yazı tipi ve renk ayarı */
.pw-block h3 { color: #d0b64e !important; }
.pw-block p,
.pw-block li {
  color: #e8e8d0 !important;
  font-weight: bold;
}

/* ==================================================================
   Detay modal — layout/pozisyon (renkler kullanıcı CSS'inde yukarıda).
   Kart tıklaması ile açılır, X / overlay-click / ESC ile kapanır.
   ================================================================== */
body.pw-modal-open { overflow: hidden; }

.pw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pwFade .18s ease-out;
}
.pw-backdrop[hidden] { display: none !important; }
@keyframes pwFade { from { opacity: 0; } to { opacity: 1; } }

.pw-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pwPop .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pwPop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pw-modal-body {
  padding: 44px 20px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.pw-modal-body::-webkit-scrollbar { width: 8px; }
.pw-modal-body::-webkit-scrollbar-track { background: transparent; }

.pw-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  border-width: 1px;
  border-style: solid;
}
