/* ==========================================================
   YAYINLAR SAYFASI - Özel Stiller (Sepet & Mobil Optimizasyonlu)
========================================================== */

/* HERO SECTION */
.yayinlar-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #A0886A, #C9A87C);
  color: white;
  padding: 60px 20px;
}

.yayinlar-hero .hero-content {
  max-width: 800px;
}

.yayinlar-hero h1 {
  font-size: 2.8rem;
  font-weight: 300;
  margin-bottom: 20px;
  color: white;
}

.yayinlar-hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

/* BOOKS SECTION */
.books-section {
  padding: 60px 0;
  background: #f8f9fa;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))!important;
  gap: 15px !important;
}

/* BOOK CARD */
.book-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid #eee;
}

.book-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

/* BOOK COVER */
.book-cover {
  position: relative;
  height: 300px;
  background: linear-gradient(135deg, #f4f1ed, #e8e4df);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.book-cover img {
  max-width: 70%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s;
}

/* PDF ROZETİ */
.pdf-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #27ae60;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  pointer-events: none;
}

.book-card:hover .book-cover img {
  transform: scale(1.05) rotate(-2deg);
}

/* BADGE */
.book-badge {
  position: absolute;
  top: 15px;
  left: 15px; /* Sağdaki PDF rozetiyle çakışmaması için sola aldık */
  background: #A0886A;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

/* BOOK INFO */
.book-info {
  padding: 15px;
}

.book-info h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.book-subtitle {
  color: #A0886A;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.book-excerpt {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 15px;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.book-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #A0886A;
}

.book-footer .btn-primary {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ============================================
   YENİ: SEPET VE DURUM STILLERI (Mobil Görünürlük İçin)
============================================ */

/* Sepete Eklendi Durumu */
.btn-added {
  background-color: #27ae60 !important;
  color: white !important;
  cursor: default;
  pointer-events: none;
  border-color: #27ae60 !important;
}

/* Yükleme Durumu */
.btn-loading {
  background-color: #f39c12 !important;
  color: white !important;
  cursor: wait;
  opacity: 0.9;
}

/* Yüzen Sepet İkonu (Mobilde dikkat çekmesi için animasyon) */
@keyframes cartPulse {
  0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(39, 174, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

#floatingCart {
  animation: cartPulse 2s infinite;
}

/* Sepet İçeriği */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  gap: 10px;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}

.cart-remove-btn:hover {
  background: #c0392b;
}

/* Mobil İndirme İpucu Kutusu */
.mobile-download-tip {
  background: #fff8e1;
  border-left: 4px solid #f39c12;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  display: none; /* JS ile mobilde açılacak */
}

.mobile-download-tip strong {
  color: #e67e22;
}

/* İndirme Başarı Mesajı */
.download-success-msg {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-top: 15px;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BOOK MODAL
============================================ */
.book-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.book-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-modal .modal-content {
  background: white;
  border-radius: 15px;
  width: 95%;
  max-width: 1100px;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.book-modal .close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.book-modal .close-modal:hover {
  background: #f0f0f0;
  transform: rotate(90deg);
}

/* MODAL BODY */
.modal-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
}

.modal-left {
  background: linear-gradient(135deg, #f4f1ed, #e8e4df);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 750px;
}

.book-media-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  background: white;
  aspect-ratio: 9 / 16;
  min-height: 700px;
}

.book-media-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f4f1ed;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.play-overlay:hover {
  background: rgba(0, 0, 0, 0.1);
}

.play-icon {
  width: 90px;
  height: 90px;
  background: rgba(160, 136, 106, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.play-overlay:hover .play-icon {
  transform: scale(1.1);
  background: #A0886A;
}

.play-overlay span {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.book-media-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  background: #f4f1ed;
}

.modal-right {
  padding: 40px;
  overflow-y: auto;
}

.modal-right h2 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.modal-subtitle {
  color: #A0886A;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 25px;
}

/* BOOK DETAILS */
.book-details {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.detail-item {
  padding: 8px 0;
  font-size: 0.95rem;
  color: #555;
  border-bottom: 1px solid #eee;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item strong {
  color: #333;
  margin-right: 10px;
}

.price-highlight {
  color: #A0886A;
  font-weight: 700;
  font-size: 1.2rem;
}

/* BOOK DESCRIPTION */
.book-description, .book-features {
  margin-bottom: 25px;
}

.book-description h4, .book-features h4 {
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0e6d8;
}

.book-description p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.book-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-features li {
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #555;
  border-left: 3px solid #A0886A;
}

.book-features li::before {
  content: "✓ ";
  color: #A0886A;
  font-weight: bold;
  margin-right: 5px;
}

/* PURCHASE BUTTONS */
.purchase-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn-large {
  flex: 1;
  min-width: 200px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-large.btn-primary {
  background: #A0886A;
  color: white;
}

.btn-large.btn-primary:hover {
  background: #8a7058;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(160, 136, 106, 0.3);
}

.btn-large.btn-secondary {
  background: #25D366;
  color: white;
}

.btn-large.btn-secondary:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* CTA SECTION */
.yayinlar-cta {
  background: linear-gradient(135deg, #A0886A, #C9A87C);
  padding: 60px 30px;
  color: white;
  text-align: center;
}

.yayinlar-cta h2 {
  color: white;
  font-size: 2rem;
  font-weight: 400;
}

.yayinlar-cta p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

.yayinlar-cta .btn-primary {
  background: white;
  color: #A0886A;
  padding: 14px 40px;
  font-size: 1.05rem;
}

.yayinlar-cta .btn-primary:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
}

/* ============================================
   MÜŞTERİ BİLGİLERİ FORM MODAL
============================================ */
.customer-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  overflow: auto;
}

.customer-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.customer-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 15px;
}

.customer-modal-close:hover,
.customer-modal-close:focus {
  color: #000;
}

/* Form Stilleri */
.cust-form-group {
  margin-bottom: 20px;
}

.cust-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.cust-form-group input,
.cust-form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px; /* iOS'ta odaklanınca zoom yapmasını engeller */
  box-sizing: border-box;
}

.cust-form-group input:focus,
.cust-form-group select:focus {
  outline: none;
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.cust-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.cust-btn-primary {
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
  min-height: 50px; /* Mobilde kolay tıklama için */
  font-size: 16px;
}

.cust-btn-primary:hover {
  background-color: #229954;
}

.cust-btn-primary:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

/* ============================================
   RESPONSIVE (MOBİL OPTİMİZASYON)
============================================ */
@media (max-width: 768px) {
  .yayinlar-hero {
    min-height: auto;
    padding: 50px 20px;
  }

  .yayinlar-hero h1 {
    font-size: 2rem;
  }

  .yayinlar-hero p {
    font-size: 1rem;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }
  .books-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }

  .book-cover {
    height: 320px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-left {
    padding: 30px 20px;
    min-height: auto;
  }

  .book-media-container {
    max-width: 100% !important;
    min-height: auto !important;
    aspect-ratio: auto;
  }

  .modal-right {
    padding: 30px 20px;
  }

  .modal-right h2 {
    font-size: 1.5rem;
  }

  .purchase-buttons {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
    min-height: 50px; /* Mobilde büyük buton */
  }

  .yayinlar-cta h2 {
    font-size: 1.5rem;
  }

  /* Sepet Mobil Optimizasyonu */
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cart-remove-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 14px;
  }

  .mobile-download-tip {
    display: block !important; /* Mobilde ipucu kutusunu zorla göster */
  }
}

@media (max-width: 480px) {
  .yayinlar-hero h1 {
    font-size: 1.7rem;
  }

  .book-cover {
    height: 280px;
  }

  .book-info {
    padding: 20px;
  }

  .book-info h3 {
    font-size: 1.1rem;
  }
  
  .customer-modal-content {
    margin: 10% auto;
    padding: 20px;
    width: 95%;
  }
  
  .cust-form-row {
    grid-template-columns: 1fr;
  }
}