.store-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark2) 100%);
  padding: 60px 0 40px;
  text-align: center;
}

.store-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: 10px;
}

.store-hero h1 span { color: var(--gold-light); }

.store-hero p {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
}

/* Store layout */
.store-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 60px;
  align-items: start;
}

/* Sidebar */
.store-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 90px;
}

.sidebar-section { margin-bottom: 28px; }
.sidebar-section:last-child { margin-bottom: 0; }

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--bg-cream);
  transition: border-color var(--transition);
  outline: none;
}

.search-input:focus { border-color: var(--gold-primary); }

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-list li button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
}

.category-list li button:hover,
.category-list li button.active {
  background: rgba(201,168,76,0.1);
  color: var(--gold-dark);
  font-weight: 700;
}

.category-list li button .cat-count {
  font-size: 0.75rem;
  background: var(--border);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 999px;
}

.category-list li button.active .cat-count {
  background: var(--gold-primary);
  color: #fff;
}

/* Store main */
.store-main {}

.store-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sort-select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: var(--bg-white);
  outline: none;
  cursor: pointer;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.no-books {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
  color: var(--text-muted);
}

.no-books svg { margin: 0 auto 16px; opacity: 0.3; }

/* Book Modal */
.book-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.book-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.book-modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--transition);
  display: grid;
  grid-template-columns: 280px 1fr;
}

.book-modal-overlay.open .book-modal { transform: scale(1); }

.modal-cover {
  height: 100%;
  min-height: 360px;
  background: linear-gradient(135deg, #f0e8d5, #e0d4ba);
  overflow: hidden;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.modal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.modal-close {
  align-self: flex-end;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--bg-cream);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 16px;
}

.modal-close:hover { background: #f44336; color: #fff; }

.modal-category {
  font-size: 0.75rem;
  color: var(--gold-primary);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.modal-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.meta-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.modal-stock {
  font-size: 0.78rem;
  color: #4CAF50;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-stock.low { color: #FF9800; }
.modal-stock.out { color: #f44336; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-cream);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-dark);
  transition: background var(--transition);
}

.qty-btn:hover { background: var(--gold-primary); color: #fff; }

.qty-display {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 8px 0;
}

/* Cart drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 3001;
}

.cart-drawer-overlay.open .cart-drawer { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.cart-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--bg-cream);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.cart-close:hover { background: #f44336; color: #fff; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg-cream);
  border-radius: var(--radius);
}

.cart-item-img {
  width: 56px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  background: #e0d4ba;
}

.cart-item-info {}
.cart-item-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.cart-item-price { font-size: 0.82rem; color: var(--gold-dark); font-weight: 700; }
.cart-item-qty   { font-size: 0.78rem; color: var(--text-muted); }

.cart-item-remove {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.cart-item-remove:hover { color: #f44336; }

.cart-footer {
  padding: 20px 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 1rem;
}

.cart-total strong {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold-dark);
}

/* Checkout */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.checkout-overlay.open { opacity: 1; pointer-events: all; }

.checkout-modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  transform: scale(0.95);
  transition: transform var(--transition);
}

.checkout-overlay.open .checkout-modal { transform: scale(1); }

.checkout-modal h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.checkout-modal p.sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  background: var(--bg-cream);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--gold-primary); background: #fff; }

.order-summary-mini {
  background: var(--bg-cream);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.order-summary-mini h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.summary-items { display: flex; flex-direction: column; gap: 6px; }

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; }
  .store-sidebar { position: static; }
  .book-modal { grid-template-columns: 1fr; }
  .modal-cover { min-height: 220px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

@media (max-width: 600px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .form-row { grid-template-columns: 1fr; }

  /* Checkout: tüm overlay yukarıdan kaydırılır, buton daima erişilebilir */
  .checkout-overlay { align-items: flex-start; overflow-y: auto; padding: 16px; }
  .checkout-modal { padding: 24px; max-height: none; margin: 16px 0; }
  .checkout-modal .btn {
    min-height: 52px;
    padding: 15px 20px;
    font-size: 1rem;
    justify-content: center;
  }
  .checkout-modal .btn:last-child { padding-bottom: max(15px, env(safe-area-inset-bottom)); }

  /* Sepet: "Siparişi Tamamla" daha büyük dokunma alanı */
  #checkout-btn { min-height: 52px; font-size: 1rem; justify-content: center; }
}

/* ── Taksit tablosu ── */
.installment-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-cream);
}

.installment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.installment-row:hover { border-color: var(--gold-light, #d9b96a); }

.installment-row.selected {
  border-color: var(--gold-primary);
  background: #fffdf6;
  box-shadow: 0 0 0 1px var(--gold-primary) inset;
}

.installment-row input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--gold-primary);
}

.installment-row .inst-label { font-weight: 700; font-size: 0.86rem; color: var(--text-dark); min-width: 78px; }
.installment-row .inst-monthly { font-weight: 700; font-size: 0.9rem; color: var(--text-dark); margin-left: auto; }
.installment-row .inst-total { font-size: 0.76rem; color: var(--text-muted); min-width: 96px; text-align: right; }
.installment-row .inst-monthly small { font-weight: 400; color: var(--text-muted); font-size: 0.72rem; }

.installment-hint { font-size: 0.74rem; color: var(--text-muted); margin-top: 6px; }

/* ── Kargo ücreti seçeneği (taksit satırlarıyla aynı görsel dil) ── */
.shipping-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border, #e6e0d4);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.shipping-row:hover { border-color: var(--gold-light, #d9b96a); }

.shipping-row.selected {
  border-color: var(--gold-primary);
  background: #fffdf6;
  box-shadow: 0 0 0 1px var(--gold-primary) inset;
}

.shipping-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--gold-primary);
}

.shipping-row .ship-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shipping-row .ship-text strong { font-weight: 700; font-size: 0.86rem; color: var(--text-dark); }
/* "Kargo Ücretlidir." satırı — üstündeki başlıktan 1 punto büyük okunur */
.shipping-row .ship-text small { font-size: 0.8rem; color: var(--text-muted); line-height: 1.35; }
.shipping-row .ship-price {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-primary);
  white-space: nowrap;
}
.shipping-row.selected .ship-price { color: var(--text-dark); }

@media (max-width: 560px) {
  .installment-row .inst-total { display: none; }
  .installment-table { max-height: 220px; }
}

/* ── Mağaza kitap kartı ── */
.store-grid .book-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.store-grid .book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-light);
}

.store-grid .book-cover {
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0e8d5, #e8dcc8);
}

.store-grid .book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.store-grid .book-card:hover .book-cover img { transform: scale(1.05); }

.store-grid .book-info {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-grid .book-category {
  font-size: 0.7rem;
  color: var(--gold-primary);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.store-grid .book-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-grid .book-author {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ① Fiyat + "+" satın alma bölgesi (belirgin) */
.store-grid .book-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.store-grid .book-price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-dark);
  line-height: 1;
}

.store-grid .add-to-cart-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.45);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.store-grid .add-to-cart-btn svg { width: 20px; height: 20px; }

.store-grid .add-to-cart-btn:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 8px 22px rgba(201, 168, 76, 0.55);
}

.store-grid .add-to-cart-btn:active { transform: scale(0.96); }

.store-grid .add-to-cart-btn:disabled {
  background: var(--border);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ② "Öne Çıkan" rozeti (şık) */
.store-grid .book-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-primary));
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.store-grid .book-badge::before {
  content: "★";
  font-size: 0.72rem;
  line-height: 1;
}

/* İndirim: üstü çizili eski fiyat + indirimli fiyat */
.store-grid .book-price-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
}

.book-price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* "İNDİRİM" rozeti: kırmızı, SOL üstte ("Öne Çıkan" sağ üstle çakışmaz) */
.store-grid .book-badge.sale {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #e5484d, #c0392b);
  box-shadow: 0 4px 14px rgba(197, 57, 48, 0.42);
}

.store-grid .book-badge.sale::before { content: none; }
