/* ==========================================================================
   Shop Page Styles
   ========================================================================== */

.shop-page-wrapper {
  background-color: #f8f9fa;
  min-height: 80vh;
  padding-bottom: 0;
}

/* Breadcrumb */
.shop-breadcrumb-area {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.shop-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 0;
  list-style: none;
  font-size: 0.8125rem;
}

.shop-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.shop-breadcrumb a:hover {
  color: var(--primary, #db2e6d);
}

.shop-breadcrumb .separator {
  color: #9ca3af;
  font-size: 0.75rem;
}

.shop-breadcrumb .current {
  color: #111827;
  font-weight: 600;
}

/* Container */
.shop-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 15px 15px 15px 15px !important;
}

@media (min-width: 768px) {
  .shop-container {
    padding: 40px 25px 40px 25px !important;
  }
}

/* ==========================================================================
   Top DIV: Controls Toolbar
   ========================================================================== */
.shop-top-bar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.shop-product-count {
  font-size: 0.875rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-product-count strong {
  color: #111827;
  font-weight: 700;
}

.shop-product-count .count-badge {
  background-color: rgba(219, 46, 109, 0.1);
  color: var(--primary, #db2e6d);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Right Controls (Sort & Mobile Filter Trigger) */
.shop-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-shop-filter-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.45rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-shop-filter-toggle:hover {
  background-color: #f9fafb;
  border-color: var(--primary, #db2e6d);
  color: var(--primary, #db2e6d);
}

.btn-shop-filter-toggle svg {
  width: 1rem;
  height: 1rem;
}

.shop-sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-sort-wrapper label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
  white-space: nowrap;
}

.shop-sort-select {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1f2937;
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.shop-sort-select:focus {
  border-color: var(--primary, #db2e6d);
  box-shadow: 0 0 0 3px rgba(219, 46, 109, 0.12);
}

/* ==========================================================================
   Bottom DIV: 2 Columns Layout
   ========================================================================== */
.shop-main-layout {
  display: flex;
  gap: 1.75rem;
  align-items: stretch;
}

/* Left Column: 33% Filter Sidebar */
.shop-filter-col {
  width: 32%;
  min-width: 280px;
  max-width: 340px;
  flex-shrink: 0;
}

.shop-filter-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.shop-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.shop-filter-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-filter-header .btn-clear-all {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary, #db2e6d);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.shop-filter-header .btn-clear-all:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Filter Widget Blocks */
.shop-widget {
  padding: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.shop-widget:last-child {
  border-bottom: none;
}

.shop-widget-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.shop-widget-title svg {
  transition: transform 0.2s ease;
}

.shop-widget-title.collapsed svg {
  transform: rotate(-90deg);
}

/* Category List */
.shop-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 380px;
  overflow-y: auto;
}

.shop-category-item {
  margin-bottom: 0.35rem;
}

.shop-category-item:last-child {
  margin-bottom: 0;
}

.shop-category-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.shop-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #4b5563;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
}

.shop-category-link:hover {
  background-color: #f9fafb;
  color: var(--primary, #db2e6d);
}

.shop-category-link.active {
  background-color: rgba(219, 46, 109, 0.08);
  color: var(--primary, #db2e6d);
  font-weight: 700;
}

.shop-category-link .cat-count {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-left: 0.5rem;
}

.shop-category-link.active .cat-count {
  color: var(--primary, #db2e6d);
}

.shop-category-link .cat-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-cat-toggle {
  background: none;
  border: none;
  padding: 0.1rem 0.25rem;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-cat-toggle:hover {
  background-color: rgba(219, 46, 109, 0.12);
  color: var(--primary, #db2e6d);
}

.btn-cat-toggle .cat-toggle-icon {
  transition: transform 0.2s ease;
}

.btn-cat-toggle.collapsed .cat-toggle-icon {
  transform: rotate(-90deg);
}

/* Subcategories indentation */
.shop-category-sub {
  list-style: none;
  margin: 0.25rem 0 0.4rem 0.75rem;
  padding: 0;
  border-left: 2px solid #f3f4f6;
  padding-left: 0.5rem;
}

.shop-category-sub-2 {
  margin: 0.25rem 0 0.35rem 0.65rem;
  border-left: 2px solid #e5e7eb;
  padding-left: 0.4rem;
}

/* Price Range */
.shop-price-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.shop-price-input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 0.8125rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #1f2937;
  outline: none;
  text-align: center;
}

.shop-price-input:focus {
  border-color: var(--primary, #db2e6d);
}

.shop-price-divider {
  color: #9ca3af;
  font-weight: 600;
}

.btn-price-apply {
  background-color: var(--primary, #db2e6d);
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.btn-price-apply:hover {
  background-color: #000000;
}

/* Checkbox filter list (Attributes / Sizes) */
.shop-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
}

.shop-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.shop-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary, #db2e6d);
  cursor: pointer;
}

.shop-checkbox-label:hover {
  color: var(--primary, #db2e6d);
}

/* Color Swatches */
.shop-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shop-color-option {
  position: relative;
  cursor: pointer;
}

.shop-color-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.shop-color-dot {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #d1d5db;
  transition: all 0.2s ease;
}

.shop-color-option input[type="radio"]:checked + .shop-color-dot {
  box-shadow: 0 0 0 2px var(--primary, #db2e6d);
  transform: scale(1.1);
}

/* Brand list */
.shop-brand-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #1f2937;
  outline: none;
  background-color: #ffffff;
}

.shop-brand-select:focus {
  border-color: var(--primary, #db2e6d);
}

/* ==========================================================================
   Right Column: 66% Product Grid (3 on Desktop & Tab, 2 on Mobile)
   ========================================================================== */
.shop-products-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* Homepage single-products-box adjustments in Shop grid */
.shop-products-grid .single-products-box {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.shop-products-grid .single-products-box .products-image {
  border-radius: 8px !important;
  overflow: hidden;
  border: 1px solid #f0f0f0 !important;
  background: #ffffff;
}

.shop-products-grid .single-products-box .products-image img {
  border-radius: 8px !important;
}

.shop-products-grid .single-products-box .products-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 0.75rem;
}

.shop-products-grid .single-products-box .products-content h3 {
  font-size: 0.875rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

/* Empty Products State */
.shop-empty-state {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 4rem 2rem;
  text-align: center;
}

.shop-empty-state svg {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}

.shop-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.shop-empty-state p {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.btn-reset-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary, #db2e6d);
  color: #ffffff !important;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
}

.btn-reset-filters:hover {
  background-color: #000000;
}

/* ==========================================================================
   Professional Pagination
   ========================================================================== */
.shop-pagination-wrap {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.shop-pagination-wrap .pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.shop-pagination-wrap .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.4rem;
  border-radius: 0.375rem !important;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: all 0.2s ease;
}

.shop-pagination-wrap .page-item.chunk-nav .page-link {
  font-weight: 700;
  color: var(--primary, #db2e6d);
  background-color: rgba(219, 46, 109, 0.05);
  border-color: rgba(219, 46, 109, 0.2);
}

.shop-pagination-wrap .page-item .page-link:hover:not(.disabled) {
  border-color: var(--primary, #db2e6d);
  color: var(--primary, #db2e6d);
  background-color: rgba(219, 46, 109, 0.08);
}

.shop-pagination-wrap .page-item.active .page-link {
  background-color: var(--primary, #db2e6d) !important;
  border-color: var(--primary, #db2e6d) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(219, 46, 109, 0.25);
}

.shop-pagination-wrap .page-item.disabled .page-link {
  opacity: 0.35;
  cursor: not-allowed;
  background-color: #f9fafb;
}

/* ==========================================================================
   Tablet Responsive: 3 columns & Off-canvas left-drawer
   ========================================================================== */
@media (max-width: 1023.98px) {
  .btn-shop-filter-toggle {
    display: inline-flex;
  }

  /* Off-canvas Left Drawer */
  .shop-filter-col {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1045;
    background: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
  }

  .shop-filter-col.active {
    transform: translateX(0);
  }

  .shop-filter-panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .shop-filter-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 2;
    padding: 1rem 1.25rem;
  }

  /* Drawer Overlay */
  .shop-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .shop-drawer-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Tablet: 3 columns */
  .shop-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem;
  }
}

/* ==========================================================================
   Mobile Responsive: 2 columns
   ========================================================================== */
@media (max-width: 767.98px) {
  .shop-top-bar {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .shop-product-count {
    font-size: 0.8125rem;
    width: 100%;
  }

  .shop-top-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Mobile: 2 columns matching homepage product grid/card spacing */
  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 15px !important;
    row-gap: 20px !important;
  }

  .shop-products-grid .single-products-box {
    margin-bottom: 0;
  }

  .shop-products-grid .single-products-box .products-content h3 {
    font-size: 16px !important;
    line-height: 1.35;
  }

  .shop-products-grid .single-products-box .products-content .price {
    font-size: 13px !important;
  }

  .shop-pagination-wrap {
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
  }

  .shop-pagination-wrap .pagination {
    gap: 3px;
    flex-wrap: nowrap;
  }

  .shop-pagination-wrap .page-item .page-link {
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 4px;
    font-size: 0.75rem;
  }
}
