/* Plantation product galleries, revision 7: directional desktop controls outside cards; dots and category links on both layouts.
   Only the product track is wrapped; promotional tiles keep their grid cell and width. */
#p26-home .p26-gallery-arrow,
#p26-home .p26-gallery-footer,
#p26-home .p26-gallery-pagination,
#p26-home .p26-gallery-all { display: none; }

#p26-home .p26-gallery-shell {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
  overflow: visible;
}

#p26-home .p26-gallery-shelf[data-p26-gallery-ready="true"] .p26-arrow-group { display: none !important; }

/* Preserve the existing empty-state sibling rule after wrapping the track. */
#p26-home .p26-gallery-shell[data-p26-has-products="true"] + .p26-shop-empty { display: none; }

#p26-home .p26-gallery-shell[data-overflow="true"] > [data-p26-track] {
  scrollbar-width: none;
}
#p26-home .p26-gallery-shell[data-overflow="true"] > [data-p26-track]::-webkit-scrollbar {
  display: none;
  height: 0;
}

/* Ordinary swipes keep the original track's touch and snap behavior. */
#p26-home .p26-gallery-shell > [data-p26-track].p26-gallery-scrubbing {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}

#p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not([hidden]) {
  position: absolute;
  z-index: 3;
  top: var(--p26-gallery-arrow-y, 110px);
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #21452f;
  border-radius: 50%;
  color: #fffdf8;
  background: #21452f;
  box-shadow: 0 2px 9px rgba(33, 69, 47, .17);
  transform: translateY(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#p26-home .p26-gallery-arrow-previous { left: -14px; }
#p26-home .p26-gallery-arrow-next { right: -14px; }
#p26-home .p26-gallery-arrow::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
  margin-left: -4px;
}
#p26-home .p26-gallery-arrow-previous::before {
  transform: rotate(225deg);
  margin-left: 4px;
}
#p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:disabled {
  color: #8b9c88;
  background: #fdfaf3;
  border-color: #d4ddcb;
  box-shadow: 0 1px 5px rgba(33, 69, 47, .08);
  cursor: default;
  opacity: 1;
}
#p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not(:disabled):active {
  background: #15351f;
  transform: translateY(-50%) scale(.96);
}

#p26-home .p26-gallery-shell > .p26-gallery-footer:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 4px 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 2px 5px;
}
#p26-home .p26-gallery-range {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  color: #21452f;
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
#p26-home .p26-gallery-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #dfd4c5;
}
#p26-home .p26-gallery-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: var(--p26-gallery-thumb-width, 40px);
  height: 10px;
  margin-top: -1px;
  border: 0;
  border-radius: 999px;
  background: #21452f;
  box-shadow: 0 0 0 1px rgba(33, 69, 47, .05);
}
#p26-home .p26-gallery-range::-moz-range-track {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #dfd4c5;
}
#p26-home .p26-gallery-range::-moz-range-thumb {
  width: var(--p26-gallery-thumb-width, 40px);
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #21452f;
  box-shadow: none;
}
#p26-home .p26-gallery-range:focus-visible,
#p26-home .p26-gallery-arrow:focus-visible {
  outline: 3px solid #92631b !important;
  outline-offset: 3px;
}
#p26-home .p26-gallery-hint {
  display: block;
  margin: -3px 0 0;
  padding: 0;
  color: #58634f;
  text-align: center;
  font: 400 14px/1.3 var(--p26-sans, Arial, sans-serif);
  letter-spacing: 0;
}


/* Shared category CTA follows the page dots on mobile and desktop.
   The footer can also show just this link when a shelf has no overflow. */
#p26-home .p26-gallery-all:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 22px;
  border: 1px solid #21452f;
  border-radius: 9px;
  color: #21452f;
  background: #fdfaf3;
  font: 500 14px/1.3 var(--p26-sans, Arial, sans-serif);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
#p26-home .p26-gallery-all:active { background: #edf0e6; }
#p26-home .p26-gallery-all:focus-visible {
  outline: 3px solid #92631b !important;
  outline-offset: 2px;
}

/* Desktop uses a translucent previous button on the teaware shelf and a next
   button on the other shelves. Product geometry and the measured midpoint stay unchanged. */
@media (min-width: 768px) {
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not([hidden]) {
    width: var(--p26-gallery-desktop-arrow-size, 44px);
    min-width: var(--p26-gallery-desktop-arrow-size, 44px);
    height: var(--p26-gallery-desktop-arrow-size, 44px);
    min-height: var(--p26-gallery-desktop-arrow-size, 44px);
  }
  #p26-home .p26-gallery-shell[data-desktop-side="right"] > .p26-gallery-arrow-next {
    left: auto;
    right: var(--p26-gallery-arrow-outset, -44px);
  }
  #p26-home .p26-gallery-shell[data-desktop-side="left"] > .p26-gallery-arrow-previous {
    left: var(--p26-gallery-arrow-outset, -44px);
    right: auto;
  }
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not([hidden]) {
    color: #21452f;
    background: rgba(253, 250, 243, .78);
    border-color: rgba(33, 69, 47, .16);
    box-shadow: 0 2px 12px rgba(33, 69, 47, .13);
  }
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:disabled {
    color: #85917d;
    background: rgba(253, 250, 243, .55);
    border-color: rgba(33, 69, 47, .10);
    box-shadow: 0 1px 6px rgba(33, 69, 47, .07);
  }
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not(:disabled):active {
    color: #193f28;
    background: rgba(253, 250, 243, .94);
  }
  #p26-home .p26-gallery-range,
  #p26-home .p26-gallery-hint { display: none; }
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-footer:not([hidden]) > .p26-gallery-pagination:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  #p26-home .p26-gallery-dot {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #21452f;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  #p26-home .p26-gallery-dot::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #b7c1ae;
    transition: width .16s ease, background-color .16s ease;
  }
  #p26-home .p26-gallery-dot[aria-current="true"]::before {
    width: 24px;
    background: #21452f;
  }
  #p26-home .p26-gallery-dot:focus-visible {
    outline: 3px solid #92631b !important;
    outline-offset: 1px;
  }
}
@media (max-width: 767px) and (hover: hover) {
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not(:disabled):hover {
    background: #15351f;
  }
}
@media (min-width: 768px) and (hover: hover) {
  #p26-home .p26-gallery-shell[data-overflow="true"] > .p26-gallery-arrow:not(:disabled):hover {
    background: rgba(253, 250, 243, .96);
    border-color: rgba(33, 69, 47, .27);
  }
  #p26-home .p26-gallery-dot:hover::before { background: #6f8b62; }
  #p26-home .p26-gallery-dot[aria-current="true"]:hover::before { background: #193f28; }
}
@media (prefers-reduced-motion: reduce) {
  #p26-home .p26-gallery-dot::before { transition: none; }
}

/* Mobile keeps both arrows and the old range hidden; pagination and the
   shared category link remain visible whenever their own hidden flags allow it. */
@media (max-width: 767px) {
  #p26-home .p26-gallery-shell > .p26-gallery-arrow,
  #p26-home .p26-gallery-range,
  #p26-home .p26-gallery-hint { display: none !important; }
  #p26-home .p26-gallery-shell > .p26-gallery-footer:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 4px;
    width: 100%;
    padding: 0 2px 5px;
  }
  #p26-home .p26-gallery-pagination:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
  #p26-home .p26-gallery-dot {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #21452f;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  #p26-home .p26-gallery-dot::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #b7c1ae;
  }
  #p26-home .p26-gallery-dot[aria-current="true"]::before {
    width: 24px;
    background: #21452f;
  }
  #p26-home .p26-gallery-dot:focus-visible,
  #p26-home .p26-gallery-all:focus-visible {
    outline: 3px solid #92631b !important;
    outline-offset: 2px;
  }
}
