/*
Theme Name: MyShop PRO
Theme URI: https://example.com
Author: You
Author URI: https://example.com
Description: WooCommerce uyumlu, AJAX filtrelemeli, profesyonel e-ticaret teması
Version: 2.2.0
Text Domain: myshop
*/

/* ================================
   DEĞİŞKENLER & TEMEL
   ================================ */
:root {
  --site-container: 1200px;
  --radius: 14px;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --primary: #111827;
  --primary-hover: #374151;
}
html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.site-container { max-width: var(--site-container); margin: 0 auto; padding: 0 1rem; }

/* ================================
   HEADER
   ================================ */
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.site-header .brand img { height: 40px; width: auto; }
.site-title { font-weight: 800; font-size: 1.5rem; color: var(--text); text-decoration: none; }
.nav-primary ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav-primary a { text-decoration: none; font-weight: 500; }
.nav-primary a:hover { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-icon { display: inline-flex; align-items: center; gap:.4rem; padding:.45rem .75rem; border-radius:999px; background:#f3f4f6; color:#111827; font-size:.9rem; text-decoration:none; position:relative; }
.header-icon:hover { background:#e5e7eb; }
.header-mobile-toggle { display: none; }
@media (max-width:960px){
  .nav-primary { display:none; }
  .nav-primary.is-open { display:block; }
  .nav-primary ul { flex-direction:column; align-items:flex-start; gap:.75rem; }
  .header-mobile-toggle { display:inline-flex; background:#111827; color:#fff; border-radius:10px; padding:.45rem .6rem; border:0; cursor:pointer; }
}

/* ================================
   HERO
   ================================ */
.hero-full { position:relative; background-position:center!important; background-size:cover!important; }
.hero-overlay { position:absolute; inset:0; background:linear-gradient(to bottom, rgba(17,24,39,.55), rgba(17,24,39,.35)); pointer-events:none; }

/* ================================
   SHOP GRID
   ================================ */
.shop-grid { display:grid; grid-template-columns:260px 1fr; gap:1rem; }
.shop-content { min-width:0; }
@media (max-width:1024px){ .shop-grid { grid-template-columns:1fr; } }

/* Ürün grid */
.woocommerce ul.products { display:grid!important; grid-template-columns:repeat(4,1fr)!important; gap:1.5rem; margin:0; padding:0; list-style:none; }
@media (max-width:1200px){ .woocommerce ul.products { grid-template-columns:repeat(3,1fr)!important; } }
@media (max-width:768px){ .woocommerce ul.products { grid-template-columns:repeat(2,1fr)!important; } }
@media (max-width:480px){ .woocommerce ul.products { grid-template-columns:1fr!important; } }

/* Ürün kartları */
.woocommerce ul.products li.product { background:#fff; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; }
.woocommerce ul.products li.product img { width:100%; aspect-ratio:4/5; object-fit:cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size:1rem; font-weight:600; margin:.5rem 0; }
.woocommerce ul.products li.product .price { font-size:1rem; font-weight:700; }
.woocommerce ul.products li.product .button { margin-top:.5rem; width:100%; background:var(--primary); color:#fff; padding:.6rem .9rem; border-radius:.5rem; text-align:center; }
.woocommerce ul.products li.product .button:hover { background:var(--primary-hover); }

/* ================================
   HESABIM SAYFASI
   ================================ */
body.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: var(--site-container);
  margin: 2rem auto;
  padding: 0 1rem;
  align-items: start;
}
/* Sol menü */
.myaccount-nav {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 240px;
}
.myaccount-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.myaccount-nav li a {
  display: block;
  padding: .6rem .8rem;
  border-radius: .5rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: .2s;
}
.myaccount-nav li.is-active a,
.myaccount-nav li a:hover {
  background: var(--primary);
  color: #fff;
}
/* İçerik */
.woocommerce-MyAccount-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 900px;
  min-width: 900px;
  box-sizing: border-box;
}
@media (max-width: 960px) {
  body.woocommerce-account .woocommerce {
    grid-template-columns: 1fr;
  }
  .woocommerce-MyAccount-content {
    max-width: 100%;
    min-width: 100%;
  }
}

/* ================================
   SEPET SAYFASI (Cart)
   ================================ */
.cart-wrapper { display:grid; grid-template-columns:2fr 1fr; gap:2rem; max-width:var(--site-container); margin:2rem auto; }
@media (max-width:960px){ .cart-wrapper { grid-template-columns:1fr; } }

/* tabela */
.cart-main .shop_table { width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.cart-main .shop_table th,
.cart-main .shop_table td { border-bottom:1px solid var(--border); padding:.9rem; vertical-align:middle; text-align:center; background:#fff; }
.cart-main .shop_table thead th { background:#f9fafb; font-weight:700; }
.cart-main .product-name { text-align:left; }
.cart-main .product-thumbnail img { width:64px; height:auto; border-radius:10px; }
.cart-main .quantity input.qty { width:86px; text-align:center; border:1px solid var(--border); border-radius:10px; padding:.5rem .55rem; }

/* remove butonu */
.cart-main .product-remove .remove{
  display:inline-flex; width:30px; height:30px; align-items:center; justify-content:center;
  border-radius:999px; background:#fee2e2; color:#b91c1c; font-weight:700; text-decoration:none;
}
.cart-main .product-remove .remove:hover{ background:#fecaca; }

/* kupon satırı */
.cart-main .actions { padding:0; background:#fff; }
.cart-coupon { display:flex; gap:.6rem; align-items:center; justify-content:flex-end; padding:1rem; }
.cart-coupon input[type="text"]{ max-width:230px; border:1px solid var(--border); border-radius:10px; padding:.6rem .7rem; }
.cart-coupon .button{ padding:.6rem .9rem; border-radius:12px; }

/* sağ özet kartı */
.cart-summary { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem; height:fit-content; }
.cart-summary h3,
.cart-summary h2 { font-size:1.2rem; font-weight:800; margin:0 0 1rem; padding-bottom:.5rem; border-bottom:1px solid var(--border); }
.cart-summary .cart_totals h2{ font-size:1.2rem; font-weight:800; margin:0 0 1rem; padding-bottom:.5rem; border-bottom:1px solid var(--border); }
.cart-summary .shop_table{ width:100%; border-collapse:collapse; margin:0 0 1rem; }
.cart-summary .shop_table th,
.cart-summary .shop_table td{ border:1px solid var(--border); padding:.75rem; }
.cart-summary .shop_table th{ background:#f9fafb; }

/* checkout’a git */
.cart-summary .wc-proceed-to-checkout .checkout-button{
  display:block; width:100%; padding:1rem; font-weight:800; border-radius:14px;
}

/* mobil kart görünümü */
@media (max-width: 720px){
  .cart-main table.shop_table thead{ display:none; }
  .cart-main table.shop_table{ border:0; border-radius:0; }
  .cart-main table.shop_table tbody tr{
    display:grid; grid-template-columns:80px 1fr; gap:.6rem;
    border:1px solid var(--border); border-radius:var(--radius); margin-bottom:.9rem; padding:.75rem; overflow:hidden;
  }
  .cart-main td{ border:0; padding:.25rem 0; text-align:left; }
  .cart-main .product-thumbnail{ grid-row:span 3; }
  .cart-main .product-remove{ grid-column:2; justify-self:end; }
  .cart-main .product-price::before{ content:'Fiyat:'; color:var(--muted); margin-right:.35rem; }
  .cart-main .product-quantity::before{ content:'Adet:'; color:var(--muted); margin-right:.35rem; }
  .cart-main .product-subtotal::before{ content:'Ara Toplam:'; color:var(--muted); margin-right:.35rem; }
  .cart-coupon{ justify-content:stretch; padding:0; }
  .cart-coupon input[type="text"]{ flex:1; max-width:none; }
}

/* ================================
   CHECKOUT SAYFASI
   ================================ */
.checkout-wrapper { max-width:var(--site-container); margin:2rem auto; }
.checkout-grid { display:grid; grid-template-columns:2fr 1fr; gap:2rem; }
.checkout-main, .checkout-summary { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem; }
.checkout-summary { height:fit-content; }
@media (max-width:960px){ .checkout-grid { grid-template-columns:1fr; } }

.checkout-main h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
}
.checkout-main .woocommerce-billing-fields__field-wrapper,
.checkout-main .woocommerce-shipping-fields__field-wrapper {
  display:grid; grid-template-columns:repeat(2,1fr); gap:1rem;
}
.checkout-main .form-row-wide { grid-column: 1 / -1; }
.checkout-main label {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .3rem;
  display: block;
}
.checkout-main input,
.checkout-main select,
.checkout-main textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem;
  width: 100%;
  box-sizing: border-box;
  font-size: .95rem;
  margin-bottom: .6rem;
}

.checkout-summary h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
}
.checkout-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.checkout-summary th,
.checkout-summary td {
  border: 1px solid var(--border);
  padding: .75rem;
}
.checkout-summary th { background: #f9fafb; }

#payment { border:1px solid var(--border); border-radius:var(--radius); padding:1rem; }
#payment .wc_payment_methods { margin:0; padding:0; list-style:none; }
#payment .wc_payment_method { border-top:1px dashed var(--border); padding:.75rem 0; }
#payment .wc_payment_method:first-child { border-top:0; }
#place_order { width:100%; padding:1rem; font-size:1rem; font-weight:700; border-radius:var(--radius); }

/* ================================
   SINGLE PRODUCT (Ürün sayfası)
   ================================ */
.single-product .product-wrap { display:grid; grid-template-columns: 1fr 1fr; gap:2rem; }
@media (max-width:960px){ .single-product .product-wrap { grid-template-columns: 1fr; } }

.single-product .product-gallery { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:1rem; }
.single-product .summary { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem; }

.single-product .product_title { font-size:1.5rem; font-weight:800; margin:0 0 .5rem 0; }
.single-product .price { font-size:1.375rem; font-weight:800; margin:.5rem 0 1rem 0; }
.single-product form.cart { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.single-product .quantity input.qty { width:100px; text-align:center; border:1px solid var(--border); border-radius:10px; padding:.55rem; }
.single-product .single_add_to_cart_button { padding:.8rem 1.1rem; border-radius:12px; }

.single-product .product-meta { margin-top:1rem; color:var(--muted); font-size:.95rem; }
.single-product .share { display:flex; gap:.5rem; margin-top:.75rem; }

/* Sekmeler */
.single-product .product-tabs { margin-top:2rem; background:#fff; border:1px solid var(--border); border-radius:var(--radius); }
.single-product .product-tabs .tab-head { display:flex; gap:1rem; border-bottom:1px solid var(--border); padding:.75rem 1rem; }
.single-product .product-tabs .tab-head a { text-decoration:none; font-weight:600; color:var(--text); padding:.25rem .5rem; border-radius:8px; }
.single-product .product-tabs .tab-head a.active { background:#111827; color:#fff; }
.single-product .product-tabs .tab-panel { padding:1rem 1.25rem; }

.related.products h2 { font-size:1.2rem; font-weight:800; margin:1.5rem 0 .75rem; }

/* ================================
   FORMLAR & BUTONLAR (genel)
   ================================ */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  border:1px solid var(--border); border-radius:10px; padding:.6rem .7rem; width:100%; background:#fff; box-sizing:border-box;
}
label { font-weight:600; margin-bottom:.3rem; display:block; }
button, .button, input[type="submit"] {
  background:var(--primary); color:#fff; border:none; border-radius:10px; padding:.6rem .9rem; cursor:pointer; font-weight:600;
}
button:hover, .button:hover, input[type="submit"]:hover { background:var(--primary-hover); }

/* ================================
   FOOTER
   ================================ */
.site-footer { border-top:1px solid var(--border); background:#fff; color:var(--muted); padding:1.5rem 0; text-align:center }
