/**
 * NUTU GRUP - WooCommerce Shop & Archive Styles
 */

/* ==========================================================================
   Shop / Category Hero Header
   ========================================================================== */
.shop-hero {
  background: linear-gradient(135deg, #0B1726 0%, #16283D 100%);
  color: #FFFFFF;
  padding-block: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

.shop-hero--image {
  min-height: 280px;
  padding-block: 32px;
  display: flex;
  align-items: center;
}

.shop-hero--image > .shop-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.shop-hero--image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 21, 33, 0.75), rgba(7, 21, 33, 0.2) 55%, transparent);
  pointer-events: none;
}

.shop-hero--image > .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.shop-hero--image .shop-hero-content {
  max-width: 760px;
}

.shop-hero--image .shop-hero-desc {
  color: #FFFFFF;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.5;
  margin-bottom: 24px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.shop-hero--image .shop-hero-desc p {
  margin: 0;
  color: inherit;
}

.shop-hero .site-breadcrumbs {
  padding: 0;
  margin: 0 0 14px;
  background: transparent;
  border: 0;
}

.shop-hero .site-breadcrumbs > .container {
  padding: 0;
  max-width: none;
}

.shop-hero .breadcrumb-item,
.shop-hero .breadcrumb-item.current,
.shop-hero .breadcrumb-item a,
.shop-hero .breadcrumb-separator {
  color: #FFFFFF;
  font-size: 14px;
  text-shadow: 0 1px 4px #071521;
}

.shop-hero .breadcrumb-item a:hover {
  text-decoration: underline;
}

.shop-hero--image .shop-hero-title {
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.shop-hero--image .shop-hero-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 20px;
}

.shop-hero--image .shop-hero-feature {
  position: relative;
  gap: 12px;
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  text-shadow: 0 2px 4px #071521;
}

.shop-hero--image .shop-hero-feature + .shop-hero-feature::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.shop-hero--image .shop-hero-feature svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: #FFFFFF;
  stroke-width: 1.6;
  filter: drop-shadow(0 1px 3px #071521);
}

@media (max-width: 767px) {
  .shop-hero--image {
    min-height: 360px;
    padding-block: 2rem;
    align-items: center;
  }

  .shop-hero--image > .shop-hero-image {
    object-fit: cover;
    object-position: 75% center;
  }

  .shop-hero--image::after {
    background: linear-gradient(180deg, rgba(7, 21, 33, 0.55), rgba(7, 21, 33, 0.7) 55%, rgba(7, 21, 33, 0.85));
  }

  .shop-hero--image .shop-hero-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .shop-hero--image .shop-hero-feature svg {
    flex-shrink: 0;
  }

  .shop-hero--image .shop-hero-feature + .shop-hero-feature::before {
    left: -0.5rem;
  }

  .shop-hero--image .shop-hero-feature:nth-child(odd)::before {
    display: none;
  }

  .shop-hero--image .shop-hero-title {
    overflow-wrap: anywhere;
  }
}

.shop-hero-content {
  max-width: 700px;
}

.shop-hero-title {
  color: #FFFFFF;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: var(--spacing-2);
}

.shop-hero-desc {
  color: #94A3B8;
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-6);
}

.shop-hero-features {
  display: flex;
  align-items: center;
  gap: var(--spacing-6);
  flex-wrap: wrap;
}

.shop-hero-feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  color: #E2E8F0;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.shop-hero-feature svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

/* ==========================================================================
   Shop Main Layout (Sidebar Filters + Products Grid)
   ========================================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-8);
  padding-block: var(--spacing-8);
}

@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .shop-sidebar {
    display: none;
  }
}

/* Sidebar Filters */
.shop-sidebar {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-5);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height-main) + 20px);
}

.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--spacing-4);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--spacing-4);
}

.filter-sidebar-title {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--color-text-dark);
}

.filter-reset-link {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-decoration: underline;
}

.filter-reset-link:hover {
  color: var(--color-primary);
}

.filter-group {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--spacing-4);
  margin-bottom: var(--spacing-4);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: var(--font-size-sm);
  font-weight: 800;
  color: var(--color-text-dark);
  padding-block: var(--spacing-2);
  cursor: pointer;
}

.filter-group-header svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.filter-group.collapsed .filter-group-header svg {
  transform: rotate(-90deg);
}

.filter-group.collapsed .filter-group-content {
  display: none;
}

.filter-group-content {
  padding-top: var(--spacing-3);
}

.filter-options-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  max-height: 220px;
  overflow-y: auto;
}

.filter-checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--color-text);
  cursor: pointer;
}

.filter-checkbox-item label {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  cursor: pointer;
  flex-grow: 1;
}

.filter-checkbox-item input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
}

.filter-count {
  color: var(--color-text-light);
  font-size: 14px;
}

/* Price Range Inputs */
.price-inputs-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-3);
}

.price-input-wrap {
  position: relative;
  flex: 1;
}

.price-input-wrap input {
  width: 100%;
  padding: 0.4rem 1.5rem 0.4rem 0.5rem;
  font-size: var(--font-size-xs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
}

.price-currency {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Shop Top Toolbar (Product count, views, sort)
   ========================================================================== */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-6);
  flex-wrap: wrap;
}

.shop-count {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-dark);
}

.shop-toolbar-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

/* View Mode Switcher (Grid vs List) */
.view-switchers {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #FFFFFF;
}

.view-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: transparent;
  transition: all var(--transition-fast);
}

.view-btn.active,
.view-btn:hover {
  background-color: var(--color-bg-subtle);
  color: var(--color-primary);
}

.view-btn svg {
  width: 18px;
  height: 18px;
}

/* Sort Dropdown */
.shop-sort-wrap {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.shop-sort-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.shop-sort-select {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #FFFFFF url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 0.75rem center;
  appearance: none;
  cursor: pointer;
}

/* Mobile Filter Trigger Button */
.mobile-filter-trigger {
  display: none;
  align-items: center;
  gap: var(--spacing-2);
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
}

.mobile-filter-trigger.has-filters {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.mobile-filter-trigger svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 1024px) {
  .mobile-filter-trigger {
    display: inline-flex;
  }
}

/* ==========================================================================
   Product Grid & List Views (Shop Archive with Sidebar)
   ========================================================================== */
.shop-layout .products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-6);
}

@media (max-width: 1200px) {
  .shop-layout .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
  }
  .products-grid.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-3);
  }
}

/* List view mode */
.products-grid.view-list {
  grid-template-columns: 1fr !important;
}

.products-grid.view-list .product-card {
  flex-direction: row;
}

.products-grid.view-list .product-card-media {
  width: 280px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .products-grid.view-list .product-card {
    flex-direction: column;
  }
  .products-grid.view-list .product-card-media {
    width: 100%;
  }
}

/* ==========================================================================
   SEO Pagination
   ========================================================================== */
.pagination-wrap {
  margin-top: var(--spacing-10);
  display: flex;
  justify-content: center;
}

.pagination-wrap .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
  background: transparent;
}

.pagination-wrap .page-numbers li {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.pagination-wrap .page-numbers a,
.pagination-wrap .page-numbers span {
  min-width: 38px;
  height: 38px;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: #FFFFFF;
  color: var(--color-text-dark);
  font-size: var(--font-size-xs);
  font-weight: 700;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pagination-wrap .page-numbers a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination-wrap .page-numbers span.current {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.pagination-wrap .page-numbers span.dots {
  border: none;
  background: transparent;
  cursor: default;
}

@media (max-width: 767px) {
  .pagination-wrap .page-numbers {
    gap: 6px;
  }

  .pagination-wrap .page-numbers a,
  .pagination-wrap .page-numbers span {
    min-width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Mobile Filter Drawer (slide-in sidebar + overlay)
   ========================================================================== */
.mobile-filter-actions { display: none; }
@media (max-width: 1024px) {
  /* Overlay backdrop */
  .mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
  }

  .mobile-filter-overlay.active {
    display: block;
  }

  /* Drawer: hidden off-screen by default */
  .shop-sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: auto;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    z-index: 1300;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    border: none;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(110%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    background: #fff;
  }

  .shop-sidebar.mobile-open {
    transform: translateY(0);
  }

  .mobile-filter-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 18px 14px 14px;
  }
  .shop-sidebar .mobile-filter-actions {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #edf0f4;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
  .mobile-filter-actions .filter-reset-link {
    text-align: center;
    color: #526078;
    text-decoration: underline;
    font-size: 13px;
    padding: 6px;
  }

  .shop-sidebar .filter-sidebar-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    padding: 0 0 14px;
    border-bottom: 1px solid #edf0f4;
  }

  .shop-sidebar .filter-sidebar-header .filter-sidebar-title {
    font-size: 16px;
    font-weight: 800;
  }

  .shop-sidebar .filter-sidebar-header .filter-reset-link {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    color: #526078;
    text-align: center;
    text-decoration: underline;
    font-size: 13px;
    z-index: 1301;
  }

  .shop-sidebar .filter-group { border: 0; margin: 0 0 10px; }
  .shop-sidebar .filter-group-header {
    background: #f7f9fb;
    border-radius: 6px;
    padding: 11px 10px;
    font-size: 14px;
  }
  .shop-sidebar .filter-group-header svg { width: 15px; height: 15px; }
  .shop-sidebar .filter-group-content { padding: 8px 8px 4px; }
  .shop-sidebar .filter-checkbox-item { padding: 4px 0; font-size: 14px; color: #526078; }
  .shop-sidebar .filter-checkbox-item input { width: 16px; height: 16px; accent-color: #ef1b2d; }
  .shop-sidebar .price-inputs-row { gap: 8px; }
  .shop-sidebar .price-input-wrap input { height: 36px; }
  .mobile-filter-apply {
    position: static;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 4px;
    background: #ef1b2d;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    z-index: 1302;
  }

}

.shop-hero-feature-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  background-image: url('../images/iconite-1.webp');
  background-repeat: no-repeat;
  background-size: 400% auto;
  filter: brightness(0) invert(1);
}

.shop-hero-feature-icon--1 { background-position: 0 50%; }
.shop-hero-feature-icon--2 { background-position: 33.333% 50%; }
.shop-hero-feature-icon--3 { background-position: 66.666% 50%; }
.shop-hero-feature-icon--4 { background-position: 100% 50%; }
