/* Utilities */
.visibility-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Categories List Container */
.categories-list {
  width: 100%;
  padding: 0px 0 20px 0;
  /*background: #ffffff;*/
}

/* Add container padding for alignment with other homepage sections */
.categories-list .container {
  max-width: 100% !important;
}

.categories-list-content {
  padding-left: 35px !important;
  padding-right: 35px !important;
  width: 100%;
}

/* Collections Grid */
.collections-list {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.collections-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

/* 3 Column Grid - All items in single horizontal line */
.collections-grid-3 {
  /* Flexbox properties inherited from .collections-grid */
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

/* Responsive Grid */
@media (max-width: 989px) {
  .collections-grid-3 {
    /* No changes needed for flexbox */
  }
  
  .collections-grid-item {
    flex: 0 0 calc((100% - 15px) / 2);
    max-width: calc((100% - 15px) / 2);
    width: calc((100% - 15px) / 2);
  }
}
@media (max-width: 749px) {
  .collections-grid-3 {
    gap: 15px;
  }
  
  .collections-grid-item {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .categories-list .container {
    padding: 0 16px;
  }
}

/* Grid Item - Remove max-width constraint for large images */
.collections-grid-item {
  position: relative;
  list-style: none;
  flex: 0 0 calc((100% - 30px) / 3);
  max-width: calc((100% - 30px) / 3);
  width: calc((100% - 30px) / 3);
  margin: 0;
}

.collections-grid-item-background {
  /*background: #f5f5f5;*/
}

/* Link Overlay */
.collections-grid-link-overlay {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.collections-grid-link-overlay:hover {
  text-decoration: none;
}

/* Image Container */
.collections-grid-image {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.collections-grid-image-portrait {
  /* Removed aspect-ratio to preserve original image ratios */
}

.collections-grid-image-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Image Element */
.collections-grid-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collections-grid-link-overlay:hover .collections-grid-image img {
  transform: scale(1.05);
}

/* Overlay */
.collections-grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.collections-grid-link-overlay:hover .collections-grid-overlay {
  /*background: rgba(0, 0, 0, var(--opacity-hover, 0.2));*/
}

/* Shop Collection Button — category label.
   COLOUR SCHEME matched to the MOBILE tile treatment (user request 2026-06-04):
   a full-width dark translucent strip pinned to the tile bottom with white
   uppercase text. VISIBILITY stays the original desktop behaviour — revealed
   on hover only (user request, same day). Touch devices keep it always
   visible via the @media (hover:none) block + the mobile overrides. */
.collections-grid-image .button {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.collections-grid-link-overlay:hover .collections-grid-image .button {
  opacity: 1;
}

.button--simple {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  border-radius: 0;
  min-height: 44px;
  box-sizing: border-box;
}

/* hover affordance: deepen the strip (replaces the old opacity reveal) */
.collections-grid-link-overlay:hover .button--simple {
  background: rgba(0, 0, 0, 0.72);
}

.button--simple span {
  display: block;
}

.focus-inset:focus-visible {
  outline: 2px solid #000000;
  outline-offset: -2px;
}

/* Information Container */
.collections-grid-information {
  padding: 20px 0;
  text-align: center;
}

.collections-grid-information.container {
  max-width: 100%;
  padding: 20px 16px;
}

/* Title */
.collections-grid-title {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #000000;
  line-height: 1.3;
}

.collections-grid-title.h3 {
  font-size: 14px;
  margin-top: 0px;
  margin-bottom: 0px;
}

.collections-grid-title span {
  display: block;
}

/* Responsive Adjustments - Bootstrap 3 Standard Breakpoints */
/* Container widths handled by global .container rules in simplex.styles.responsive.css */
@media (min-width: 1200px) {
  .collections-grid {
    gap: 15px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .collections-grid {
    gap: 15px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .collections-grid {
    gap: 15px;
  }
}

@media (max-width: 749px) {
  .collections-grid-title {
    font-size: 16px;
  }

  .button--simple {
    font-size: 13px;
    padding: 10px 20px;
  }
}

/* Touch Device Adjustments */
@media (hover: none) {
  .collections-grid-image .button {
    opacity: 1;
  }

  .collections-grid-link-overlay:hover .collections-grid-image img {
    transform: scale(1);
  }
}

/* Print Styles */
@media print {
  .collections-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }

  .collections-grid-image .button {
    display: none;
  }

  .collections-grid-link-overlay:hover .collections-grid-image img {
    transform: none;
  }
}

/* ===================================
   HOMEPAGE SECTIONS CONSISTENT SPACING
   Ensure all homepage sections have uniform vertical spacing
   =================================== */

/* Product grid sections - match category grid spacing */
.home-page .product-grid.home-page-product-grid,
.home-page .product-grid.bestsellers,
.home-page .blog-list-homepage {
  padding: 20px 20px 0px 20px; /* Horizontal spacing for product grid */
}

/* Ensure no conflicting margins on first/last sections */
.home-page .page-body > div:first-child {
  margin-top: 15px;
}

.home-page .page-body > div:last-child {
  margin-bottom: 15px;
}

/* ===================================
   PRODUCT GRID CENTER ALIGNMENT
   Center-align product grid content on category pages
   =================================== */

/* Center the product grid container within col-md-9 */
.side-content .product-grid .item-grid.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

/* Remove float from product items to work with flexbox */
.side-content .product-grid .item-box {
  float: none;
}

/* Center content within each product box */
.side-content .product-grid .item-box .thumbnail {
  margin: 0 auto;
}
