/* PromoWidget — Varsayılan CSS */
.pw-container {
  width: 100%;
  font-family: "Roboto", sans-serif;
  padding: 0 10px;
  box-sizing: border-box;
  margin: 10px 0;
}

/* Kategoriler */
.pw-categories {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 8px;
  margin-bottom: 10px;
}

.pw-categories::-webkit-scrollbar {
  display: none;
}

.pw-cat-btn {
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: inherit;
  border-radius: 24px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.pw-cat-btn:hover,
.pw-cat-btn.active {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
}

/* Promosyon grid */
.pw-promos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Promosyon kartı */
.pw-promo-item {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}
.pw-promo-item:hover {
  transform: translateY(-4px);
}

/* Dış görsel — 493x800 oranı (portrait) */
.pw-promo-img {
  position: relative;
  aspect-ratio: 493 / 800;
  overflow: hidden;
}
.pw-promo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pw-promo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.pw-promo-item:hover .pw-promo-overlay {
  opacity: 1;
}
.pw-detail-btn {
  padding: 8px 20px;
  background: rgba(255,255,255,0.9);
  color: #000;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pw-promo-title {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: inherit;
}
.pw-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: inherit;
  opacity: 0.7;
}

/* Backdrop — modern blur efekti */
.pw-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  animation: pw-fade-in 0.25s ease;
}
.pw-backdrop.active {
  display: block;
}

@keyframes pw-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal */
.pw-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  max-height: 85vh;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  z-index: 9999;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  animation: pw-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pw-modal.active {
  display: block;
}
/* 1024px+ masaüstü */
.pw-modal {
  width: 50%;
  max-width: 900px;
}
/* tablet */
@media (max-width: 1024px) {
  .pw-modal {
    width: 75%;
  }
}
/* mobil */
@media (max-width: 600px) {
  .pw-modal {
    width: 95%;
    max-height: 90vh;
  }
}

@keyframes pw-slide-up {
  from {
    opacity: 0;
    transform: translate(-50%, -42%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -48%);
  }
}

/* Modal scroll */
.pw-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 85vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.pw-modal-body::-webkit-scrollbar {
  width: 5px;
}
.pw-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.pw-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}
.pw-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.35);
}

/* Kapatma düğmesi */
.pw-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.pw-close:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
  transform: rotate(90deg) scale(1.1);
}
.pw-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2.5;
}

/* İç görsel — web (landscape) */
.pw-modal-img {
  width: 100%;
  aspect-ratio: 1300 / 474;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
  display: block;
  box-shadow: rgba(0,0,0,0.4) 0px 2px 4px, rgba(0,0,0,0.3) 0px 7px 13px -3px, rgba(0,0,0,0.2) 0px -3px 0px inset;
}

/* İç görsel — mobil (kare 600x600) */
.pw-modal-img-mobile {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
  display: none;
  box-shadow: rgba(0,0,0,0.4) 0px 2px 4px, rgba(0,0,0,0.3) 0px 7px 13px -3px, rgba(0,0,0,0.2) 0px -3px 0px inset;
}

/* Mobil görsel mantığı:
   - inner_image_mobile varsa: mobilde mobil, masaüstünde web
   - inner_image_mobile yoksa: her ikisinde de web */
@media (max-width: 768px) {
  .pw-modal-img.has-mobile {
    display: none;
  }
  .pw-modal-img-mobile {
    display: block;
  }
}

/* Modal içerik */
.pw-block {
  margin-bottom: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  line-height: 1.7;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
}
.pw-block h1, .pw-block h2, .pw-block h3 {
  color: #fff;
  margin-bottom: 8px;
}
.pw-block a {
  color: #7c9ef5;
  text-decoration: underline;
}
.pw-block table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.pw-block table td,
.pw-block table th {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}
.pw-block table th {
  background: rgba(255,255,255,0.05);
  font-weight: 600;
  color: #fff;
}
.pw-block table tr:nth-child(even) td {
  background: rgba(255,255,255,0.03);
}

/* Mobil grid */
@media (max-width: 480px) {
  .pw-promos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .pw-modal {
    width: 95%;
    max-height: 90vh;
  }
}

/* Tap highlight sıfırlama */
.pw-promo-item,
.pw-promo-item *,
.pw-cat-btn {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}