/* Ada Kastas Katalog - Kastas.com tarzi WooCommerce override */

:root {
  --kastas-navy: #131a6c;
  --kastas-navy-dark: #0f1558;
  --kastas-accent: #c8102e;
  --kastas-gold: #f5b800;
  --kastas-border: #d9e2ec;
  --kastas-bg: #f4f7fa;
}

body.kastas-catalog-active .woocommerce-before-shop-loop {
  display: none !important;
}

/* Samatex float layout sifirlama */
body.kastas-catalog-active .kastas-catalog-layout,
body.kastas-catalog-active .kastas-single-container {
  display: flex !important;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px 40px;
}

body.kastas-catalog-active .kastas-main-col,
body.kastas-catalog-active .kastas-single-main {
  flex: 1 1 calc(100% - 320px);
  min-width: 0;
  float: none !important;
  width: auto !important;
}

body.kastas-catalog-active .kastas-sidebar-col {
  flex: 0 0 280px;
  max-width: 280px;
  float: none !important;
  width: auto !important;
}

body.kastas-catalog-active .product-layout-single .layout-content,
body.kastas-catalog-active .product-layout .layout-content {
  float: none !important;
  width: auto !important;
}

body.kastas-catalog-active .product-layout-single .layout-sidebar,
body.kastas-catalog-active .product-layout .layout-sidebar {
  float: none !important;
  width: auto !important;
}

/* Gereksiz Samatex ogeleri gizle */
body.kastas-catalog-active .product_meta,
body.kastas-catalog-active .single-product-sharing,
body.kastas-catalog-active .post-navigation,
body.kastas-catalog-active .related.products,
body.kastas-catalog-active .upsells.products,
body.kastas-catalog-active .woocommerce-tabs,
body.kastas-catalog-active .woocommerce-product-gallery__trigger {
  display: none !important;
}

body.kastas-catalog-active .page-title-section + .product-layout .woocommerce-products-header,
body.kastas-catalog-active .woocommerce-products-header__title {
  display: none;
}

/* Arama cubugu */
.kastas-search-bar {
  background: var(--kastas-navy);
  color: #fff;
  padding: 28px 0;
  margin-bottom: 0;
}

.kastas-search-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.kastas-search-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.kastas-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kastas-search-row input[type="search"],
.kastas-search-row select,
.kastas-filter-bar input,
.kastas-filter-bar select,
.kastas-sibling-select select {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--kastas-border);
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: #1e293b;
}

.kastas-search-bar .kastas-btn {
  background: #fff !important;
  color: var(--kastas-navy) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.kastas-search-bar .kastas-btn:hover {
  background: #f5f5f7 !important;
  color: var(--kastas-navy) !important;
}

.kastas-filter-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.kastas-filter-tags a {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
}

.kastas-filter-tags a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.kastas-btn {
  display: inline-block;
  background: var(--kastas-gold) !important;
  color: var(--kastas-navy) !important;
  border: none !important;
  padding: 10px 18px;
  border-radius: 4px;
  text-decoration: none !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none !important;
}

.kastas-btn:hover {
  background: #e5a800 !important;
  color: var(--kastas-navy) !important;
}

.kastas-btn-outline {
  background: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
}

.kastas-btn-outline:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

.kastas-filter-bar .kastas-btn-filter {
  background: var(--kastas-gold) !important;
  color: var(--kastas-navy) !important;
}

/* Sag kategori menusu */
.kastas-category-sidebar {
  background: #fff;
  border: 1px solid var(--kastas-border);
  border-radius: 6px;
  padding: 20px;
  position: sticky;
  top: 100px;
}

.kastas-sidebar-title {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--kastas-navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--kastas-accent);
  padding-bottom: 8px;
}

.kastas-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kastas-cat-list li a {
  display: block;
  padding: 9px 0;
  color: #334155;
  text-decoration: none;
  border-bottom: 1px solid #eef2f6;
  font-size: 14px;
}

.kastas-cat-list li.active > a,
.kastas-cat-list li a:hover {
  color: var(--kastas-navy);
  font-weight: 600;
}

.kastas-cat-list .count {
  color: #94a3b8;
  font-weight: 400;
}

/* Kategori grid */
body.kastas-catalog-active ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.kastas-catalog-active ul.products li.product,
body.kastas-catalog-active ul.products li.kastas-loop-item {
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

.kastas-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid var(--kastas-border);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
  text-decoration: none !important;
  transition: box-shadow 0.2s, border-color 0.2s;
  height: 100%;
  color: inherit;
}

.kastas-product-card:hover {
  box-shadow: 0 8px 24px rgba(12, 45, 74, 0.12);
  border-color: #b8c9d9;
}

.kastas-card-image {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.kastas-card-image img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
}

.kastas-card-code {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kastas-navy);
  margin-bottom: 4px;
}

.kastas-card-subtitle {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.4;
}

.kastas-card-link {
  display: inline-block;
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--kastas-accent);
}

/* Tek urun sayfasi */
.kastas-single-product {
  width: 100%;
}

.kastas-product-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--kastas-border);
}

.kastas-hero-gallery {
  background: #fff;
  border: 1px solid var(--kastas-border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.kastas-hero-gallery .woocommerce-product-gallery,
.kastas-hero-gallery .images {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

.kastas-hero-gallery img {
  max-height: 240px !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 auto;
  display: block;
}

.kastas-hero-gallery .flex-control-thumbs {
  display: none;
}

.kastas-hero-code {
  display: inline-block;
  background: var(--kastas-navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.kastas-hero-title {
  font-size: 1.75rem !important;
  color: var(--kastas-navy) !important;
  margin: 0 0 8px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
}

.kastas-hero-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  margin: 0 0 16px;
}

.kastas-hero-description {
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 20px;
}

.kastas-hero-description p {
  margin: 0 0 10px;
}

.kastas-sibling-select {
  margin-bottom: 20px;
}

.kastas-sibling-select label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--kastas-navy);
  font-size: 14px;
}

.kastas-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kastas-hero-actions .kastas-btn {
  background: var(--kastas-navy) !important;
  color: #fff !important;
}

.kastas-hero-actions .kastas-btn:hover {
  background: var(--kastas-navy-dark) !important;
  color: #fff !important;
}

.kastas-hero-actions .kastas-btn-outline {
  border-color: var(--kastas-navy) !important;
  color: var(--kastas-navy) !important;
}

.kastas-single-body {
  width: 100%;
}

.kastas-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

.kastas-list-block h4 {
  color: var(--kastas-navy);
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kastas-list-block ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
}

.kastas-tech-wrap {
  margin-bottom: 28px;
}

.kastas-tech-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
}

.kastas-tech-table th,
.kastas-tech-table td {
  border: 1px solid var(--kastas-border);
  padding: 10px 14px;
  text-align: left;
}

.kastas-tech-table th {
  background: var(--kastas-bg);
  width: 45%;
  color: var(--kastas-navy);
  font-weight: 600;
}

/* Varyasyon tablosu */
.kastas-variants-section {
  width: 100%;
}

.kastas-filter-bar {
  background: var(--kastas-navy);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-radius: 6px 6px 0 0;
}

.kastas-filter-bar strong {
  margin-right: 8px;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.kastas-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--kastas-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  width: 100%;
}

.kastas-variants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.kastas-variants-table th {
  background: var(--kastas-bg);
  color: var(--kastas-navy);
  padding: 10px 12px;
  border-bottom: 2px solid var(--kastas-navy);
  white-space: nowrap;
  font-weight: 600;
}

.kastas-variants-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f6;
}

.kastas-variants-table tbody tr:hover {
  background: #f8fafc;
}

.kastas-variants-table tr.hidden-row {
  display: none;
}

/* Katalog sayfa ust bosluk */
.kastas-catalog-page {
  padding-top: 0;
}

body.kastas-catalog-active .product-layout {
  padding-bottom: 40px;
}

@media (max-width: 992px) {
  body.kastas-catalog-active .kastas-sidebar-col {
    flex: 1 1 100%;
    max-width: 100%;
    position: static;
  }

  body.kastas-catalog-active .kastas-main-col,
  body.kastas-catalog-active .kastas-single-main {
    flex: 1 1 100%;
  }

  .kastas-product-hero {
    grid-template-columns: 1fr;
  }

  .kastas-lists {
    grid-template-columns: 1fr;
  }

  body.kastas-catalog-active ul.products {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
