.collection-main-body.grid-uniform {
  margin-left: 0;
}

.collection_grid .pagination {
  margin-top: 30px;
  text-align: center;
}

.collection_grid .btn--underlined {
  color: var(--primary-btn-bg-color);
}

.mobile-facets__open {
  margin: 0 0 15px 0;
}

.facets__form-inner {
  gap: 30px;
}

@media screen and (min-width:768px) {
  .facets__form-inner {
    column-gap: var(--grid-spacing);
  }

  .grid-area--filtering { grid-area: filtering; }
  .grid-area--collection { grid-area: collection; }

  .collection_grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: "collection";
  }

  .collection_grid.filtering_enabled--topbar {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, auto);
    grid-template-areas: "filtering" "collection";
  }

  .collection_grid.filtering_enabled--topbar .collection-info__description {
    text-align: center;
  }

  .collection_grid.filtering_enabled--sidebar {
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto;
    grid-template-areas: "filtering collection";
    column-gap: 30px;
  }

  .collection_grid.filtering_enabled--sidebar .collection-info {
    margin-bottom: 30px;
  }

  .collection_grid.filtering_enabled--sidebar .collection-info .page--title {
    text-align: left;
  }
}

/* ---- PRODUCT ROW - SCOPED TO COLLECTION PAGES ONLY ---- */
.collection_grid .product-row {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
  background: #fff;
  height: auto; /* Allow dynamic height on mobile */
  min-height: 191px; /* Minimum height for desktop */
  display: flex;
  align-items: center;
}

.collection_grid .product-row-inner {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 10px 15px;
  flex-wrap: wrap; /* Allow wrapping on mobile */
}

.collection_grid .product-row-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1.4;
}

/* Fixed-size image wrapper */
.collection_grid .product-row-image-wrapper {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.collection_grid .product-row-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.collection_grid .product-row-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;       /* Force left alignment for product info */
}

.collection_grid .product-row-brand {
  font-size: 14px;
  color: #666;
  text-align: left !important;  /* Force left alignment */
}

.collection_grid .product-row-title {
  font-size: 18px;
  font-weight: bold;
  text-align: left !important;  /* Force left alignment */
}

.collection_grid .product-row-specs .spec {
  border: 1px dashed #0aa;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 5px;
  font-size: 13px;
  display: inline-block;
}

.collection_grid .product-row-middle {
  flex: 1;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  text-align: left;       /* Keep left alignment */
  display: flex;
  align-items: center;    /* Center vertically */
}

.collection_grid .product-row-middle .delivery {
  text-align: left;       /* Keep left alignment */
}

.collection_grid .product-row-right {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-right: 20px; /* right padding */
  text-align: right;      /* Keep right section right-aligned */
}

.collection_grid .product-row-right .stock {
  font-size: 12px;
  color: #666;
}

.collection_grid .product-row-right .price {
  font-size: 24px;   /* larger */
  font-weight: 700;  /* bold */
  line-height: 1.2;
}

.collection_grid .collection-list-row {
  width: 100%;
  margin-bottom: 0px;
}

/* ---- CART ACTIONS - SCOPED TO COLLECTION PAGES ONLY ---- */
.collection_grid .cart-actions {
  display: flex !important;
  align-items: center;
  gap: 8px; /* spacing between qty + button */
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important; /* Prevent any transform animations */
  transition: none !important; /* Disable transitions that might cause movement */
}

.collection_grid .qty-input {
  width: 70px;
  height: 50px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 0;   /* square corners */
  font-size: 16px;
  padding: 0;
  line-height: 50px;  /* vertical align */
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  transition: none !important;
}

.collection_grid .atc-btn {
  height: 50px;
  line-height: 50px;
  font-size: 16px;
  background: #000 !important;
  color: #fff !important;
  border: none;
  border-radius: 0;
  font-weight: bold;
  cursor: pointer;
  padding: 0 22px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  transition: background-color 0.2s ease !important; /* Only allow background color transition */
}

.collection_grid .atc-btn:hover {
  background: #333 !important;
  transform: none !important; /* Prevent any hover transforms */
}

.collection_grid .atc-btn.disabled {
  background: #ccc !important;
  cursor: not-allowed;
  opacity: 0.6 !important;
}

/* Remove any hover-only behavior and prevent movement - SCOPED */
.collection_grid .product-row .cart-actions,
.collection_grid .product-row .qty-input,
.collection_grid .product-row .atc-btn,
.collection_grid .product-row:hover .cart-actions,
.collection_grid .product-row:hover .qty-input,
.collection_grid .product-row:hover .atc-btn,
.collection_grid .product-row:not(:hover) .cart-actions,
.collection_grid .product-row:not(:hover) .qty-input,
.collection_grid .product-row:not(:hover) .atc-btn {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  transform: none !important;
  position: static !important; /* Ensure no absolute positioning changes */
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
}

.collection_grid .product-row {
  margin-bottom: 0px;
}

/* ===== MOBILE RESPONSIVE DESIGN - SCOPED TO COLLECTION PAGES ONLY ===== */
@media screen and (max-width: 767px) {
  .collection_grid .product-row {
    height: auto;
    min-height: unset;
  }
  
  .collection_grid .product-row-inner {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .collection_grid .product-row-left {
    flex: unset;
    align-self: stretch;
    gap: 10px;
  }
  
  .collection_grid .product-row-image-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
  }
  
  .collection_grid .product-row-info {
    flex: 1;
  }
  
  .collection_grid .product-row-title {
    font-size: 16px;
  }
  
  .collection_grid .product-row-middle {
    display: none; /* Hide middle section on mobile */
  }
  
  .collection_grid .product-row-right {
    order: 2;
    flex: unset;
    align-self: stretch;
    align-items: center; /* Center all items vertically */
    padding-right: 0;
    text-align: left;
    gap: 15px;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .collection_grid .product-row-right .stock {
    display: none; /* Hide stock on mobile */
  }
  
  .collection_grid .product-row-right .price {
    order: 2;
    font-size: 20px;
    align-self: flex-start;
    text-align: center;
    height: 40px; /* Match button height */
    line-height: 40px; /* Center text vertically */
    display: flex;
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
  }
  
  .collection_grid .cart-actions {
    order: 3;
    flex-shrink: 0;
    align-self: flex-end;
  }
  
  .collection_grid .qty-input {
    width: 60px;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
  }
  
  .collection_grid .atc-btn {
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    padding: 0 16px;
    white-space: nowrap; /* Keep button text on one line */
  }
}

/* ---- SEARCH PAGE - Force list layout and full width ---- */

/* Override grid layout on search pages */
.template--search .collection_grid {
  display: block !important; /* Override the grid display */
}

/* Ensure search content takes full width */
.template--search .collection-main-body-inner {
  width: 100% !important;
  max-width: 100% !important;
}

/* Make sure search results use full width */
.template--search .collection-list-row {
  width: 100% !important;
  max-width: 100% !important;
}

