/* ==========================================================================
   B2B YAPI MALZEMELERİ TURİZM DAN. GIDA LTD. ŞTİ. (www.b2byapi.com.tr)
   Modern E-Ticaret & Sanal Mağaza Tasarım Sistemi (B2B Yapı Türkiye Mimarisi)
   ========================================================================== */

:root {
  --brand-red: #df0023;
  --brand-red-dark: #b6031f;
  --brand-red-light: #fff0f2;
  --brand-dark: #1d1f22;
  --brand-charcoal: #2f3337;
  --text-main: #22252a;
  --text-muted: #687078;
  --bg-page: #f4f5f7;
  --bg-surface: #ffffff;
  --border-color: #e4e7ec;
  --success: #128048;
  --success-bg: #e7f6ee;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --info: #1d4ed8;
  --info-bg: #dbeafe;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 6px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.09);
  --shadow-lg: 0 20px 40px rgba(16, 24, 40, 0.16);
  --container-max: 1320px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Archivo', 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   TOP BAR & HEADER (B2B YAPI STYLE + B2B YAPI BRANDING)
   ========================================================================== */

.top-strip {
  background: var(--brand-dark);
  color: #e5e7eb;
  font-size: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.top-strip-left, .top-strip-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d1d5db;
  transition: color 0.15s;
}

.top-strip-item:hover {
  color: #ffffff;
}

.top-badge-b2b {
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.site-header {
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.header-main {
  padding: 14px 0;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Custom B2B YAPI Geometric inspired Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  user-select: none;
}

.brand-cubes {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-red);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  box-shadow: 0 3px 8px rgba(223, 0, 35, 0.28);
  position: relative;
  white-space: nowrap;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.05;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.search-form:focus-within {
  background: #fff;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(223, 0, 35, 0.12);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
}

.search-btn {
  background: var(--brand-red);
  color: #fff;
  padding: 10px 18px;
  margin: 4px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--brand-red-dark);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 120;
  max-height: 420px;
  overflow-y: auto;
}

.search-Suggestions-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f3f5;
  cursor: pointer;
  transition: background 0.15s;
}

.search-Suggestions-item:hover {
  background: #fff5f6;
}

.search-Suggestions-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #eee;
}

/* Header User Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.18s;
  position: relative;
}

.action-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background: var(--brand-red-light);
}

.action-btn.cart-btn {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.action-btn.cart-btn:hover {
  background: var(--brand-red-dark);
}

.action-btn.admin-btn {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.action-btn.admin-btn:hover {
  background: #374151;
}

.badge-count {
  background: #b6031f;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:not(.cart-btn) .badge-count {
  background: var(--brand-red);
}

/* ==========================================================================
   RED NAVIGATION BAR & MEGA MENU (B2B YAPI V4 REPLICA)
   ========================================================================== */

.nav-bar {
  background: var(--brand-red);
  color: #fff;
  position: relative;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.btn-all-categories {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-red-dark);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 18px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-all-categories:hover,
.btn-all-categories.active {
  background: #8f0016;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 13px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  transition: background 0.15s;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 0;
  background: #fff;
  transition: height 0.18s;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  height: 3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-util-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-util-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Mega Menu Overlay */
.mega-menu-wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  border-bottom: 3px solid var(--brand-red);
  z-index: 100;
  display: none;
}

.mega-menu-wrapper.open {
  display: block;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 480px;
  max-height: 76vh;
}

.mega-sidebar {
  background: #f8f9fa;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 8px 0;
  list-style: none;
}

.mega-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.mega-sidebar-item:hover,
.mega-sidebar-item.active {
  background: #fff;
  color: var(--brand-red);
  border-left-color: var(--brand-red);
}

.mega-content {
  padding: 22px 26px;
  overflow-y: auto;
  background: #fff;
}

.mega-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.mega-content-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-dark);
}

.mega-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.mega-sub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #f0f2f5;
  transition: all 0.15s;
  background: #fff;
}

.mega-sub-card:hover {
  border-color: #ffd0d7;
  box-shadow: var(--shadow-sm);
}

.mega-sub-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
}

.mega-sub-cap:hover {
  color: var(--brand-red);
}

.mega-sub-cap img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  background: #f7f7f7;
  flex-shrink: 0;
}

.mega-third-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 56px;
}

.mega-third-link {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
}

.mega-third-link:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

/* ==========================================================================
   HERO SLIDER & B2B YAPI PROMO BANNERS
   ========================================================================== */

.hero-section {
  margin-top: 18px;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1d1f22;
  box-shadow: var(--shadow-md);
}

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 1300 / 455;
  min-height: 260px;
  width: 100%;
  cursor: pointer;
}

.hero-slide.active {
  display: block;
}

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

.hero-overlay-left {
  position: absolute;
  left: 28px;
  bottom: 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 16px 22px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  max-width: 380px;
}

.hero-overlay-left strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 6px;
}

.hero-overlay-left em {
  font-style: normal;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-overlay-price {
  position: absolute;
  right: 28px;
  bottom: 28px;
  background: var(--brand-red);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  text-align: right;
}

.hero-overlay-price strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 2px;
}

.hero-overlay-price em {
  font-style: normal;
  font-size: 24px;
  font-weight: 900;
}

.hero-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: #fff;
  border-top: 1px solid var(--border-color);
}

.hero-tab {
  padding: 12px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  border-right: 1px solid #f1f3f5;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-tab:hover,
.hero-tab.active {
  color: var(--brand-red);
  background: #fff8f9;
  border-bottom-color: var(--brand-red);
  font-weight: 700;
}

/* 3-Column Promo Banners (B2B Yapı homeBanner3Ct) */
.promo-triple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.promo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  background: #fff;
  aspect-ratio: 4 / 3.4;
  transition: transform 0.25s, box-shadow 0.25s;
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.promo-card:hover img {
  transform: scale(1.03);
}

.promo-card-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.promo-card-label strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-dark);
}

.promo-card-label em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-red);
}

/* Popular Categories / Spotlight Strip */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 6px;
  height: 22px;
  background: var(--brand-red);
  border-radius: 3px;
}

.popular-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.popular-item {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}

.popular-item:hover {
  border-color: var(--brand-red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.popular-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.popular-item p {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   CATEGORY PILLS & PRODUCT CATALOG GRID
   ========================================================================== */

.category-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.cat-pill {
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  transition: all 0.18s;
}

.cat-pill:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.cat-pill.active {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

/* Catalog Layout with Sidebar Filters */
.catalog-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.filter-sidebar {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 18px;
  position: sticky;
  top: 90px;
}

.filter-group {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f3f5;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.15s;
}

.filter-item:hover {
  background: #f8f9fa;
  color: var(--brand-red);
}

.filter-item.active {
  background: var(--brand-red-light);
  color: var(--brand-red);
  font-weight: 700;
}

/* Toolbar */
.catalog-toolbar {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-info {
  font-size: 14px;
  color: var(--text-muted);
}

.toolbar-info strong {
  color: var(--brand-dark);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

/* Product Grid & Cards (B2B Yapı prodList Style) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 18px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.22s;
  position: relative;
}

.product-card:hover {
  border-color: #d0d5dd;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-figure {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: 14px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-figure img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.28s;
}

.product-card:hover .product-figure img {
  transform: scale(1.05);
}

.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.badge-discount {
  background: var(--brand-red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
}

.badge-sku {
  background: rgba(29, 31, 34, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.18s;
  z-index: 2;
}

.btn-wishlist:hover,
.btn-wishlist.active {
  color: var(--brand-red);
  border-color: var(--brand-red);
  background: #fff0f2;
}

.product-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
  margin-bottom: 8px;
  cursor: pointer;
}

.product-title:hover {
  color: var(--brand-red);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #f59e0b;
  margin-bottom: 10px;
}

.product-rating span {
  color: var(--text-muted);
  font-weight: 500;
}

.product-price-wrap {
  margin-top: auto;
  padding-top: 6px;
}

.price-old-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}

.price-old-row del {
  text-decoration: line-through;
}

.price-current {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-dark);
}

.product-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.badge-freeship {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  padding: 4px 8px;
  border-radius: 5px;
}

.btn-add-cart {
  width: 100%;
  margin-top: 10px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s;
}

.btn-add-cart:hover {
  background: var(--brand-red-dark);
}

/* ==========================================================================
   NATIVE <dialog> MODALS & DRAWERS (MODERN WEB GUIDANCE COMPLIANT)
   ========================================================================== */

dialog.modern-dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0;
  max-width: 920px;
  width: calc(100% - 32px);
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto;
  background: #fff;
  color: var(--text-main);
  overflow: hidden;
}

dialog.modern-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog.modern-dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
}

dialog.drawer-dialog {
  margin: 0 0 0 auto;
  max-width: 440px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  background: #f8f9fa;
  flex-shrink: 0;
}

.dialog-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border-color);
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dialog-close:hover {
  color: var(--brand-red);
  border-color: var(--brand-red);
}

.dialog-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.drawer-dialog .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
}

#cartDrawerFooter {
  flex-shrink: 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* Product Detail Modal Layout */
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.pdp-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.pdp-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}

.pdp-thumb {
  width: 64px;
  height: 64px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  object-fit: contain;
  cursor: pointer;
}

.pdp-thumb.active {
  border-color: var(--brand-red);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.specs-table tr:nth-child(odd) {
  background: #f8f9fa;
}

.specs-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #eceff2;
}

.specs-table td:first-child {
  font-weight: 700;
  color: var(--text-muted);
  width: 42%;
}

/* ==========================================================================
   FORMS, CHECKOUT & ORDER TRACKING
   ========================================================================== */

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

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

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-charcoal);
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.form-control {
  padding: 10px 13px;
  border: 1.5px solid var(--border-color);
  border-radius: 7px;
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
  transition: border-color 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(223, 0, 35, 0.1);
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s;
}

.btn-primary:hover {
  background: var(--brand-red-dark);
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--text-main);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* Order Tracking Stepper */
.tracking-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.tracking-step {
  padding: 14px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background: #f9fafb;
  position: relative;
}

.tracking-step.done {
  border-color: var(--success);
  background: var(--success-bg);
}

.tracking-step-title {
  font-weight: 800;
  font-size: 13.5px;
  margin-bottom: 4px;
}

.tracking-step-date {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tracking-step-desc {
  font-size: 12px;
  line-height: 1.35;
}

/* ==========================================================================
   ADMIN PANEL (YÖNETİCİ PANELİ) VIEW
   ========================================================================== */

.admin-panel-wrap {
  margin: 24px 0 48px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-dark);
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border-color);
}

.admin-tab-btn.active {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.data-table-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #edf0f2;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 800;
  color: var(--brand-charcoal);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #fcfcfd;
}

/* ==========================================================================
   FOOTER (B2B YAPI TRUST BOXES + B2B YAPI OFFICIAL CORPORATE IDENTITY)
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: #fff;
  border-top: 1px solid var(--border-color);
}

.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-color);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-red-light);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.trust-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-dark);
}

.trust-text span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-main {
  background: #1d1f22;
  color: #d1d5db;
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.corporate-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
}

.corporate-card strong {
  color: #fff;
}

.footer-bottom {
  background: #141618;
  color: #9ca3af;
  padding: 18px 0;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #111827;
  color: #fff;
  padding: 13px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--brand-red);
  animation: slideInUp 0.25s ease-out;
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Helper Classes for Forms, Tracking & Mobile Filter */
.corporate-invoice-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.checkout-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff0f2;
  padding: 16px;
  border-radius: 10px;
  margin-top: 12px;
  border: 1px solid #ffd0d7;
  position: sticky;
  bottom: -14px;
  z-index: 5;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.checkout-submit-btn {
  font-size: 15px;
  padding: 14px 26px;
}

.tracking-search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tracking-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.mobile-filter-toggle-btn {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--brand-dark);
  margin-bottom: 12px;
}

.mobile-bottom-nav {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .mobile-filter-toggle-btn {
    display: flex;
  }
  .filter-sidebar {
    position: static;
    display: none;
  }
  .filter-sidebar.mobile-open {
    display: block;
  }
  .popular-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .trust-bar {
    grid-template-columns: 1fr 1fr;
  }
  .nav-right {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 66px;
  }

  .container {
    padding: 0 12px;
  }

  .header-main {
    padding: 8px 0;
  }

  .header-main-inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-cubes {
    font-size: 14px;
    padding: 6px 10px !important;
    gap: 4px;
    border-radius: 6px;
  }

  .brand-logo-icon {
    font-size: 14px;
    line-height: 1;
  }

  .brand-logo-text {
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
  }

  .brand-cubes svg {
    width: 16px;
    height: 16px;
    margin-right: 3px !important;
  }

  .brand-cubes img {
    max-height: 26px !important;
    max-width: 105px !important;
  }

  .header-actions {
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .action-btn {
    padding: 6px 8px;
    font-size: 12px;
    gap: 3px;
  }

  /* Hide text labels inside header action buttons on mobile except Admin/Cart badge */
  .header-actions .action-btn > span:nth-child(2) {
    display: none;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .search-input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .search-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Navigation Bar & Mega Menu on Mobile */
  .nav-bar-inner {
    min-height: 44px;
  }

  .btn-all-categories {
    padding: 10px 13px;
    font-size: 13px;
  }

  .nav-links li a {
    padding: 11px 10px;
    font-size: 12.5px;
  }

  .mega-menu-grid {
    grid-template-columns: 1fr;
    max-height: 78vh;
    overflow-y: auto;
  }

  .mega-sidebar {
    max-height: 210px;
    border-right: none;
    border-bottom: 2px solid var(--border-color);
  }

  .mega-content {
    padding: 14px;
  }

  .mega-content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mega-sub-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  /* Hero Slider on Mobile */
  .hero-slide {
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }

  .hero-overlay-left {
    left: 10px;
    bottom: 10px;
    padding: 10px 12px;
    max-width: 58%;
  }

  .hero-overlay-left strong {
    font-size: 13.5px;
    margin-bottom: 2px;
  }

  .hero-overlay-left em {
    font-size: 11px;
  }

  .hero-overlay-price {
    right: 10px;
    bottom: 10px;
    padding: 8px 11px;
    max-width: 40%;
  }

  .hero-overlay-price strong {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-overlay-price em {
    font-size: 14px;
  }

  .hero-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-tab {
    padding: 9px 6px;
    font-size: 11.5px;
  }

  /* Promo & Popular Cards on Mobile */
  .promo-triple-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .promo-card {
    aspect-ratio: 16 / 10;
  }

  .popular-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .section-header {
    margin: 22px 0 12px;
  }

  .section-title {
    font-size: 18px;
  }

  /* 2-Column Product Grid on Mobile (Standard E-Commerce Layout) */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-figure {
    padding: 10px;
  }

  .product-body {
    padding: 10px;
  }

  .product-title {
    font-size: 12.5px;
    min-height: 34px;
  }

  .price-current {
    font-size: 15px;
  }

  .product-footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .btn-add-cart {
    padding: 8px 10px;
    font-size: 12.5px;
  }

  /* Dialogs, Forms, Checkout & Tracking on Mobile */
  dialog.modern-dialog {
    width: calc(100% - 16px);
    max-height: 92vh;
  }

  .dialog-header {
    padding: 12px 16px;
  }

  .dialog-title {
    font-size: 15px;
  }

  .dialog-body {
    padding: 14px;
  }

  .pdp-grid,
  .form-grid,
  .corporate-invoice-grid,
  .tracking-stepper,
  .tracking-meta-grid {
    grid-template-columns: 1fr;
  }

  .checkout-summary-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .checkout-submit-btn {
    width: 100%;
  }

  .tracking-search-form {
    flex-direction: column;
  }

  .footer-grid,
  .trust-bar {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Fixed Mobile Bottom Bar */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 88;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-main);
  }

  .mobile-nav-item:active {
    color: var(--brand-red);
    background: #fff5f6;
  }

  .mobile-nav-item .m-icon {
    font-size: 17px;
    line-height: 1;
  }

  .toast-container {
    bottom: 72px;
    left: 12px;
    right: 12px;
  }
}

