/* Category Page Styles */
.category-main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

.category-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

/* Category Controls */
.category-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.hide-filters-btn {
  background: none;
  border: none;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.3s;
  font-family: var(--font-primary);
}

.hide-filters-btn:hover {
  color: #e21c2a;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.mobile-filters-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-primary);
}

.mobile-filters-btn:hover {
  background: #f5f5f5;
  border-color: #000;
}

.mobile-filters-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sort-dropdown {
  position: relative;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.3s;
  font-family: var(--font-primary);
}

.sort-btn:hover {
  color: #e21c2a;
}

.sort-btn svg {
  transition: transform 0.3s;
}

.sort-dropdown.active .sort-btn svg {
  transform: rotate(180deg);
}

.sort-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 100;
}

.sort-dropdown.active .sort-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sort-option {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s, color 0.3s;
  border-bottom: 1px solid #f5f5f5;
}

.sort-option:last-child {
  border-bottom: none;
}

.sort-option:hover {
  background: #f9f9f9;
  color: #e21c2a;
}

/* Category Layout */
.category-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* Filters Sidebar */
.filters-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding-right: 30px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  transition: all 0.3s;
}

.filters-sidebar.hidden {
  width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  opacity: 0;
}

.filters-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.filters-sidebar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.filter-section {
  margin-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
}

.filter-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 18px 0;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 0.3s;
  font-family: var(--font-primary);
}

.filter-header:hover {
  color: #666;
}

.filter-icon {
  flex-shrink: 0;
  transition: transform 0.3s;
}

.filter-section.expanded .filter-icon {
  transform: rotate(180deg);
}

/* Filter Content */
.filter-content {
  display: none;
  padding-bottom: 20px;
}

.filter-section.expanded .filter-content {
  display: block;
}

/* Color Filter Chips — swatch + count */
.filter-color-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filter-color-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-height: 44px;
  font-size: 14px;
  color: #111;
}

.filter-color-chip:hover {
  border-color: #111;
}

.filter-color-chip.active {
  border: 2px solid #111;
  background: #ededed;
  box-shadow: none;
}

.filter-color-chip input[type="checkbox"] {
  display: none;
}

.filter-color-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: block;
  box-sizing: border-box;
}

/* Selected swatch: color fill + gap + outer black ring (no center dot) */
.filter-color-chip.active .filter-color-dot {
  border-color: transparent;
  outline: 2px solid #000;
  outline-offset: 2px;
}

.filter-color-chip.active .filter-color-dot.filter-color-dot--outlined {
  border-color: transparent !important;
}

.filter-color-dot--outlined {
  background: #fff !important;
  border: 1px solid #333 !important;
  box-sizing: border-box;
}

.filter-color-count {
  flex: 1;
  min-width: 0;
  color: #111;
  white-space: nowrap;
}

.filter-color-dot.multi {
  background: conic-gradient(
    #e21c2a 0deg 60deg,
    #f5d000 60deg 120deg,
    #2d6a3e 120deg 180deg,
    #1a3a6e 180deg 240deg,
    #7b4bb7 240deg 300deg,
    #e85d04 300deg 360deg
  );
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.mobile-filter-section .mobile-filter-content-inner,
.mobile-filter-section .filter-color-mobile-inner {
  display: none;
  padding: 15px 20px 16px;
  border-top: none;
}

.mobile-filter-section[data-expanded="true"] .mobile-filter-content-inner,
.mobile-filter-section[data-expanded="true"] .filter-color-mobile-inner {
  display: block;
}

/* გახსნისას — ხაზი მხოლოდ ატრიბუტების ქვემოთ (არა სათაურის ქვემოთ) */
.mobile-filter-section[data-expanded="true"] > .mobile-filter-item::after {
  display: none;
}

.mobile-filter-section[data-expanded="true"]::after {
  content: "";
  display: block;
  height: 1px;
  background: #e0e0e0;
  margin: 0 20px;
  flex-shrink: 0;
}

/* Price Filter Chips */
.filter-price-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-price-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: #333;
}

.filter-price-chip:hover {
  border-color: #000;
}

.filter-price-chip.active {
  border: 2px solid #111;
  background: #ededed;
  color: #111;
  font-weight: 500;
}

.filter-price-chip input[type="checkbox"] {
  display: none;
}

/* Size Filter Grid */
.filter-size-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.filter-size-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  text-align: center;
  min-height: 44px;
  box-sizing: border-box;
}

.filter-size-chip:hover {
  border-color: #000;
}

.filter-size-chip.active {
  border-color: #000;
  border-width: 2px;
  background: #fff;
  color: #000;
  font-weight: 500;
}

.filter-size-chip input[type="checkbox"] {
  display: none;
}

/* Filter Checkbox */
.filter-checkbox {
  display: flex;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  gap: 10px;
}

.filter-checkbox:hover {
  color: #000;
}

.filter-checkbox.active {
  font-weight: 500;
}

.mobile-filter-content-inner .filter-checkbox--mobile:not(.filter-size-chip-mobile),
#filters-container .filter-content .filter-checkbox--mobile:not(.filter-size-chip-mobile) {
  margin-bottom: 4px;
}

:is(.mobile-filter-content-inner, #filters-container .filter-content) .mobile-filter-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-size-chip-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  height: 44px;
  padding: 0 20px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-attribute-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  height: auto;
  padding: 10px 20px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}

/* Filter chips — shared active (mobile + desktop sidebar) */
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-size-chip-mobile.active,
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-price-chip-mobile.active,
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-price-chip-mobile:has(input:checked),
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-color-chip--mobile.active,
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-color-chip--mobile:has(input:checked),
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-attribute-chip.active,
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-attribute-chip:has(input:checked) {
  border: 2px solid #111;
  background: #ededed;
  color: #111;
  font-weight: 500;
  box-shadow: none;
}

:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-price-chip-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-price-chip-mobile input[type="checkbox"] {
  display: none;
}

.filter-price-chip-mobile.active,
.filter-price-chip-mobile:has(input:checked),
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-price-chip-mobile.active,
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-price-chip-mobile:has(input:checked) {
  border: 2px solid #111;
  background: #ededed;
  color: #111;
  font-weight: 500;
  box-shadow: none;
}

:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-size-chip-mobile input[type="checkbox"],
:is(.mobile-filter-content-inner, #filters-container .filter-content) .filter-attribute-chip input[type="checkbox"] {
  display: none;
}

.filter-size-chip-mobile p{
  margin-top: 5px;
}
.filter-price-chip-mobile p{
  margin-top: 5px;
}
.filter-checkbox--mobile p{
  margin-top: 5px;
}
/* Color filter chips — mobile overlay + desktop sidebar */
:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner) .filter-color-chip--mobile {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  height: 44px;
  padding: 0 14px;
  gap: 10px;
  min-height: 0;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #111;
  white-space: nowrap;
  box-sizing: border-box;
}

.filter-color-chip.filter-color-chip--mobile.active,
.filter-color-chip.filter-color-chip--mobile:has(input:checked),
:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner)
  .filter-color-chip.filter-color-chip--mobile.active,
:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner)
  .filter-color-chip.filter-color-chip--mobile:has(input:checked) {
  border: 2px solid #111;
  background: #ededed;
  box-shadow: none;
  color: #111;
  font-weight: 500;
}

:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner) .filter-color-chip--mobile:not(.active):hover {
  /* border-color: #000; */
}

/* Fixed 18×18 slot — chip size unchanged when dot shrinks on select */
:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner) .filter-color-swatch-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
}

:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner) .filter-color-swatch-slot .filter-color-dot {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner)
  .filter-color-chip--mobile.active
  .filter-color-swatch-slot
  .filter-color-dot {
  width: 10px;
  height: 10px;
  border-color: transparent;
  outline: 2px solid #000;
  outline-offset: 2px;
}

:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner)
  .filter-color-chip--mobile.active
  .filter-color-swatch-slot
  .filter-color-dot.filter-color-dot--outlined {
  border-color: transparent !important;
}

:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner) .filter-color-chip-label {
  display: inline;
  line-height: 1;
}

:is(.filter-color-mobile-inner, #filters-container .filter-content.filter-color-mobile-inner) .filter-color-chip-label .filter-color-count {
  flex: none;
  color: inherit;
  font-weight: inherit;
}

.filter-color-chip-label p{
  margin-top: 5px;
}

.filter-checkbox .checkbox-icon {
  font-size: 16px;
  line-height: 1;
}

/* Products Section */
.products-section {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
  /* padding: 15px; */
}

/* Category Product Card */
a.category-product-card {
  text-decoration: none;
  color: inherit;
}

.category-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.product-image-wrapper {
  position: relative;
  margin-bottom: 15px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  aspect-ratio: 3 / 4;
}

.product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  /* border-radius: 8px; */
  background-size: cover;
  background-position: center;
  transition: transform 0.3s;
  object-fit: contain;
  display: block;
  background-color: #f5f5f5;
}

/* Product Media Tabs */
.product-media-tabs {
  width: 100%;
  height: 100%;
  position: relative;
}

.product-tab-buttons {
  position: absolute;
  top: 15px;
  left: 10px;
  z-index: 20;
  display: flex;
  gap: 5px;
}

.product-tab-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-primary);
}

.product-tab-btn:hover {
  background: #fff;
  border-color: #000;
}

.product-tab-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.product-tab-content {
  width: 100%;
  height: 100%;
  position: relative;
}

.product-tab-pane {
  display: none;
  width: 100%;
  height: 100%;
}

.product-tab-pane.active {
  display: block;
}

.product-tab-pane img,
.product-tab-pane video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #f5f5f5;
}

.product-video {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: #f5f5f5;
  object-fit: contain;
}

.category-product-card:hover .product-image {
  /* transform: scale(1.02); */
}

.product-cart-btn {
  display: none;
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  transition: all 0.3s;
  z-index: 10;
  opacity: 0;
  transform: translateY(5px);
}

.product-download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  z-index: 15;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
@media (max-width: 768px){
  .product-download-btn{
    position: absolute;
    top: 3px;
    right: 10px;
    width: 25px;
    height: 25px;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    z-index: 15;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
}

.product-download-btn:hover {
  background: #ffffff;
  transform: scale(1.06);
}

.video-download-btn {
  position: absolute;
  top: 10px;
  right: 50px;
  width: 32px;
  height: 32px;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  z-index: 15;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-download-btn:hover {
  background: #ffffff;
  transform: scale(1.06);
}

@media (max-width: 768px){
  .video-download-btn{
    position: absolute;
    top: 3px;
    right: 40px;
    width: 25px;
    height: 25px;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    z-index: 15;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
}





.category-product-card:hover .product-cart-btn {
  opacity: 1;
  transform: translateY(0);
  display: none;
}

.product-cart-btn:hover {
  background: #fff;
  border-color: #000;
  color: #000;
  transform: scale(1.1);
}

.product-cart-btn svg {
  width: 20px;
  height: 20px;
}

/* Product Colors */
.product-colors {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 48px;
}

.color-swatches {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Make active swatch center + keep neighbors visible */
  scroll-snap-type: x proximity;
  /* padding-inline: 16px; */
  scroll-padding-inline: 50%;
  will-change: scroll-position;
}

.color-swatches::-webkit-scrollbar {
  display: none;
}

.color-swatch {
  width: 48px;
  height: 48px;
  /* border-radius: 4px; */
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, border-color 0.2s;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
  scroll-snap-align: center;
}

.color-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.color-swatch:hover {
  /* transform: scale(1.05); */
}

.color-swatch.active {
  border-color: #000;
  border-width: 1px;
}

.color-nav-btn {
  display: none;
  background: none;
  border: 1px solid #e0e0e0;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  font-size: 18px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.color-nav-btn:hover {
  background: #f5f5f5;
  border-color: #000;
  color: #000;
}

/* "New" line: homepage latest 15 + category listing (same global newest-15 IDs) */
.black-friday-section .product-new-label,
.sale-section .product-new-label,
.gifts-section .product-new-label,
.category-main .product-new-label {
  margin: 0 0 6px;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  color: #b87333;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: left;
}

.black-friday-section .product-image-wrapper + .product-new-label,
.sale-section .product-image-wrapper + .product-new-label,
.gifts-section .product-image-wrapper + .product-new-label,
.category-main .product-image-wrapper + .product-new-label {
  margin-top: 8px;
}

/* Product Badges */
.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #ff6600;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.product-badge.coming-soon {
  background: #ff6600;
}

.product-badge.best-seller {
  background: #ff6600;
}

/* Product Info */
.product-name {
  /* font-size: 16px; */
  font-weight: 600;
  margin-bottom: 5px;
  color: #000;
  line-height: 1.4;
  font-size: 0.875rem !important;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}

.product-category {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.product-generated-pages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.generated-page-copy-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--generated-page-border, #111);
  border-radius: 8px;
  background: var(--generated-page-bg, #f2f2f2);
  color: var(--generated-page-text, #111);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.generated-copy-icon-wrap {
  position: absolute;
  right: 10px;
  display: inline-flex;
  align-items: center;
}

.generated-copy-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.generated-page-copy-btn.copied {
  background: #2ea043;
  border-color: #2ea043;
  color: #fff;
}

.generated-page-copy-btn.copied .generated-copy-icon {
  filter: brightness(0) invert(1);
}

.generated-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 20px);
  opacity: 0;
  z-index: 4000;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: calc(100vw - 30px);
  text-align: center;
  padding: 40px;
}

.generated-copy-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.current-price {
  font-size: 0.875rem;
  font-weight: 400;
  color: #000;
}

.original-price {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

.product-discount {
  display: inline-block;
  color: #ff6600;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.product-promo {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-layout {
    gap: 30px;
  }

  .filters-sidebar {
    width: 240px;
    padding-right: 20px;
  }
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .category-container {
    padding: 0 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .category-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 20px;
  }

  .hide-filters-btn {
    display: none !important;
  }

  .category-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .sort-dropdown {
    order: 2;
  }

  .mobile-filters-btn {
    order: 1;
  }

  .category-layout {
    flex-direction: column;
    gap: 15px;
  }

  .products-section {
    width: 100%;
  }

  .filters-sidebar {
    display: none !important;
  }

  .filters-sidebar.hidden {
    display: none !important;
  }

  .products-section {
    width: 100%;
    padding: 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .category-product-card {
    width: 100%;
    min-width: 0;
  }

  .product-name,
  .product-price,
  .current-price,
  .original-price {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .product-price {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .product-image-wrapper {
    width: 100%;
    margin-bottom: 10px;
    aspect-ratio: 3 / 4;
  }

  .product-image {
    aspect-ratio: 3 / 4;
    height: auto !important;
    width: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
  }

  .product-tab-buttons {
    top: 5px;
    left: 5px;
    gap: 3px;
  }

  .product-tab-btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .product-video {
    aspect-ratio: 3 / 4;
  }

  .product-name {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .product-category {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .product-price {
    gap: 6px;
    margin-bottom: 6px;
  }

  .current-price {
    font-size: 16px;
  }

  .original-price {
    font-size: 12px;
  }

  .product-discount {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .product-promo {
    font-size: 11px;
  }

  .product-colors {
    gap: 4px;
    margin-bottom: 8px;
    /* Allow vertical page scroll while interacting with swatches */
    touch-action: auto;
    min-height: 40px;
  }

  .color-swatches {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* padding-inline: 12px; */
    scroll-padding-inline: 50%;
  }

  .color-swatches::-webkit-scrollbar {
    display: none;
  }

  .color-swatch {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    scroll-snap-align: center;
  }

  /* Mobile: hide nav buttons (swipe instead) */
  .color-nav-btn {
    display: none !important;
  }

  .product-badge {
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .product-cart-btn {
    bottom: 19px;
    right: 5px;
    width: 36px;
    height: 36px;
  }

  .product-cart-btn svg {
    width: 18px;
    height: 18px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }
}

/* Mobile Filter Overlay */
.mobile-filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-filter-overlay.active {
  opacity: 1;
  visibility: visible;
  touch-action: none;
}

html.mobile-filter-scroll-lock,
body.mobile-filter-scroll-lock {
  overflow: hidden !important;
  height: 100%;
}

body.mobile-filter-scroll-lock {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.mobile-filter-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 92vh;
  height: 80dvh;
  max-height: 92vh;
  max-height: 92dvh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2001;
}

.mobile-filter-overlay.active .mobile-filter-panel {
  transform: translateY(0);
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0;
  border-bottom: none;
  position: relative;
  flex-shrink: 0;
}

.mobile-filter-header::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 1px;
  background: #e0e0e0;
}

.mobile-filter-title {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  color: #000;
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.mobile-filter-close {
  background: #f5f5f5;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  flex-shrink: 0;
  margin-bottom: 16px;
}

.mobile-filter-close:hover {
  background: #e0e0e0;
}

.mobile-filter-close svg {
  width: 20px;
  height: 20px;
}

.mobile-filter-panel .mobile-filter-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.mobile-filter-section {
  border-bottom: none;
  flex-shrink: 0;
}

.mobile-filter-section[data-expanded="true"] > .mobile-filter-item {
  background: #fff;
}

.mobile-filter-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 57px;
  min-height: 57px;
  max-height: 57px;
  padding: 0 20px;
  box-sizing: border-box;
  background: #fff;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-primary);
}

.mobile-filter-item::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 1px;
  background: #e0e0e0;
  pointer-events: none;
}

.mobile-filter-item:hover,
.mobile-filter-item:active,
.mobile-filter-item:focus,
.mobile-filter-item:focus-visible {
  background: #fff;
  outline: none;
}

.mobile-filter-toggle-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.mobile-filter-footer {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: none;
  background: #fff;
  flex-shrink: 0;
}

.mobile-filter-apply-btn {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 18px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-primary);
}

.mobile-filter-apply-btn:hover {
  background: #111;
}

.mobile-filter-content::-webkit-scrollbar {
  width: 6px;
}

.mobile-filter-content::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.mobile-filter-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.mobile-filter-content::-webkit-scrollbar-thumb:hover {
  background: #999;
}

@media (max-width: 480px) {
  .category-container {
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
  }

  .product-name {
    font-size: 13px;
  }

  .product-category {
    font-size: 11px;
  }

  .current-price {
    font-size: 15px;
  }

  .product-image-wrapper {
    margin-bottom: 8px;
  }
}

/* Pagination Styles */
.category-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 20px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 10px 20px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-block;
  font-weight: 500;
  transition: all 0.2s;
  font-family: var(--font-primary);
  font-size: 14px;
}

.pagination-btn:hover {
  background: #e21c2a;
  color: #fff;
}

.pagination-btn.pagination-disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination-btn.pagination-disabled:hover {
  background: #e0e0e0;
  color: #999;
}

.pagination-pages {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-page {
  padding: 10px 14px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  display: inline-block;
  min-width: 40px;
  text-align: center;
  font-size: 14px;
  transition: all 0.2s;
  font-weight: 500;
  font-family: var(--font-primary);
}

.pagination-page:hover {
  background: #000;
  color: #fff;
}

.pagination-page.pagination-active {
  background: #e21c2a;
  color: #fff;
  font-weight: 600;
}

.pagination-page.pagination-active:hover {
  background: #c01a26;
  color: #fff;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: #999;
  font-size: 14px;
}

.pagination-info {
  text-align: center;
  margin-top: 15px;
  color: #646970;
  font-size: 14px;
  font-family: var(--font-primary);
}

/* Mobile Responsive Pagination */
@media (max-width: 768px) {
  .category-pagination {
    flex-direction: row;
    gap: 6px;
    padding: 15px 10px;
    margin-top: 30px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .category-pagination::-webkit-scrollbar {
    display: none;
  }

  .pagination-btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .pagination-pages {
    justify-content: center;
    gap: 3px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .pagination-page {
    padding: 8px 10px;
    min-width: 32px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .pagination-ellipsis {
    padding: 8px 2px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .pagination-info {
    font-size: 13px;
    margin-top: 10px;
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .category-pagination {
    padding: 10px 5px;
    margin-top: 20px;
    gap: 4px;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .pagination-pages {
    gap: 2px;
  }

  .pagination-page {
    padding: 6px 8px;
    min-width: 28px;
    font-size: 11px;
  }

  .pagination-ellipsis {
    padding: 6px 1px;
    font-size: 11px;
  }

  .pagination-info {
    font-size: 11px;
    margin-top: 8px;
  }
}
