/* assets/css/shop.css */

/* =========================
   HERO
========================= */

.shop-hero {
  margin-top: 100px;
  padding: 2rem 5% 2.5rem;
  background: linear-gradient(135deg, #f5f5f5 0%, #ececec 100%);
  position: relative;
  overflow: hidden;
}

.shop-hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(139, 69, 19, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(2px);
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(-15px, 15px) rotate(180deg);
  }
}

.shop-hero__inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: left;
}

.shop-hero__path {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--black);
  letter-spacing: .05em;
  opacity: 0.7;
  flex-wrap: wrap;
}

.shop-hero__crumb {
  text-decoration: none;
  color: var(--black);
  transition: color .2s ease;
}

.shop-hero__crumb:hover {
  color: var(--copper);
}

.shop-hero__crumb--active {
  color: var(--copper);
  font-weight: 600;
}

.shop-hero__sep {
  opacity: .4;
}

.shop-hero__title {
  font-size: clamp(1.8rem, 1.3rem + 1.5vw, 2.4rem);
  font-weight: 300;
  color: var(--copper);
  margin-top: .75rem;
  letter-spacing: .1em;
}

.shop-hero__subtitle {
  margin-top: .5rem;
  color: var(--black);
  font-size: 1rem;
  opacity: 0.8;
  max-width: 500px;
  line-height: 1.6;
}

/* =========================
   LAYOUT + TOP BAR
========================= */

.shop-layout {
  padding: 2rem 5% 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.shop-mobile-filterbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  row-gap: .75rem;
}

.shop-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  border-radius: 4px;
  padding: .6rem .9rem;
  font-size: .9rem;
  color: var(--black);
  cursor: pointer;
  letter-spacing: .05em;
  transition: all .2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.shop-filter-toggle:hover {
  border-color: var(--copper);
  color: var(--copper);
  box-shadow: 0 12px 30px rgba(139, 69, 19, .12);
}

.shop-filter-toggle__icon {
  font-size: 1rem;
  line-height: 1;
}

.shop-results-count {
  font-size: .9rem;
  color: var(--black);
  opacity: .7;
  letter-spacing: .05em;
}

.shop-layout__inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
}

/* =========================
   FILTER PANEL (DESKTOP)
========================= */

.filters-panel {
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
  border-radius: 4px;
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 100px;
  /* stick under navbar */
  height: fit-content;
  align-self: start;
}

.filters-inner {
  display: grid;
  gap: 1.75rem;
}

.filter-group__header {
  margin-bottom: .75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.filter-group__title {
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--black);
  text-transform: uppercase;
  font-weight: 600;
}

.filter-group__hint {
  font-size: .7rem;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.4;
  letter-spacing: .05em;
}

/* divider line for groups */
.filter-group+.filter-group {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 1.25rem;
}

.filter-apply-wrapper {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 1.25rem;
}

/* lists */
.filter-list {
  list-style: none;
  display: grid;
  gap: .5rem;
}

.filter-list__item {
  font-size: .9rem;
  color: var(--black);
  display: flex;
  align-items: center;
  line-height: 1.3;
}

/* subcategory list has subtle left bar */
.filter-list--subcat .filter-subcat-row {
  border-left: 2px solid rgba(139, 69, 19, 0.25);
  padding-left: .75rem;
  display: flex;
  align-items: center;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
  color: var(--black);
}

.filter-checkbox input[type="checkbox"] {
  accent-color: var(--copper);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

/* Price inputs row */

.price-row {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}

.price-field {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .8rem;
  color: var(--black);
  letter-spacing: .05em;
}

.price-sep {
  font-size: .8rem;
  color: var(--black);
  opacity: .6;
  margin-bottom: .4rem;
}

.price-input {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: .6rem .7rem;
  font-size: .9rem;
  outline: none;
  color: var(--black);
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
  transition: all .2s ease;
  width: 100%;
}

.price-input:focus {
  border-color: var(--copper);
  box-shadow: 0 12px 30px rgba(139, 69, 19, .12);
}

/* selects (brand & sort) */

.sort-select {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: .6rem .7rem;
  font-size: .9rem;
  outline: none;
  background: #fff;
  color: var(--black);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
  transition: all .2s ease;
  appearance: none;
  cursor: pointer;
  background-image:
    radial-gradient(circle at 90% 50%, var(--copper) 2px, transparent 2px),
    radial-gradient(circle at 95% 50%, var(--copper) 2px, transparent 2px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  background-position: calc(100% - 16px) 50%, calc(100% - 8px) 50%;
}

.sort-select:focus {
  border-color: var(--copper);
  box-shadow: 0 12px 30px rgba(139, 69, 19, .12);
}

/* Apply button */

.apply-btn {
  width: 100%;
  padding: .7rem 1rem;
  background: var(--copper);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 12px 30px rgba(139, 69, 19, .2);
}

.apply-btn:hover {
  background: var(--dark-copper);
  box-shadow: 0 18px 40px rgba(139, 69, 19, .3);
}

/* =========================
   PRODUCTS GRID + CARDS
========================= */

.products-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.products-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

.shop-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .06);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all .3s ease;
  position: relative;

  opacity: 0;
  transform: translateY(24px);
}

.shop-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.shop-card:hover {
  box-shadow: 0 28px 60px rgba(0, 0, 0, .08);
  transform: translateY(-4px);
}

.shop-card__image {
  position: relative;
  height: 260px;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shop-card__bgtext {
  font-size: 2.5rem;
  letter-spacing: .25em;
  font-weight: bold;
  color: rgba(139, 69, 19, 0.08);
  text-align: center;
  user-select: none;
}

.shop-card__badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--copper);
  color: #fff;
  padding: .4rem .7rem;
  font-size: .7rem;
  border-radius: 2px;
  letter-spacing: .08em;
  font-weight: 600;
  box-shadow: 0 15px 30px rgba(139, 69, 19, .4);
}

/* sale badge variant (still copper tone, could be changed to something stronger later) */
.shop-card__badge--sale {
  background: var(--copper);
  box-shadow: 0 18px 34px rgba(139, 69, 19, .5);
}

.shop-card__info {
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.shop-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: .05em;
}

.shop-card__desc {
  font-size: .9rem;
  line-height: 1.5;
  color: #555;
  min-height: 3.5em;
}

.shop-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: .75rem;
  width: 100%;
}

/* price wrapper now supports old and current price */
.shop-card__price-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.shop-card__price-current {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--copper);
  letter-spacing: .05em;
}

.shop-card__price-old {
  font-size: .8rem;
  color: #888;
  text-decoration: line-through;
  letter-spacing: .03em;
  margin-top: .2rem;
}

/* Add-to-cart CTA */
.shop-card__cta {
  background: transparent;
  border: 1px solid var(--copper);
  color: var(--copper);
  border-radius: 4px;
  font-size: .8rem;
  letter-spacing: .08em;
  padding: .6rem .9rem;
  cursor: pointer;
  min-width: 110px;
  text-align: center;
  text-transform: uppercase;
  transition: all .2s ease;
  box-shadow: 0 10px 25px rgba(139, 69, 19, .15);
}

.shop-card__cta:hover {
  background: var(--copper);
  color: #fff;
  box-shadow: 0 16px 40px rgba(139, 69, 19, .3);
}

/* =========================
   PAGINATION
========================= */

.pagination {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

.page-btn,
.page-num {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  min-width: 36px;
  min-height: 36px;
  padding: .5rem .75rem;
  font-size: .85rem;
  line-height: 1;
  color: var(--black);
  cursor: pointer;
  letter-spacing: .05em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
  transition: all .2s ease;
}

.page-btn[disabled] {
  opacity: .4;
  cursor: default;
}

.page-num.active {
  background: var(--copper);
  color: #fff;
  border-color: var(--copper);
  box-shadow: 0 15px 30px rgba(139, 69, 19, .3);
}

/* =========================
   FILTER DRAWER (MOBILE)
========================= */

.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.filter-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.filter-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, .3);
  z-index: 1700;
  transform: translateY(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}

.filter-drawer.active {
  transform: translateY(0);
}

.filter-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.filter-drawer__title {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--black);
  text-transform: uppercase;
}

.filter-drawer__close {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: .5rem .6rem;
  color: var(--black);
  font-size: .9rem;
  line-height: 1;
  transition: all .2s ease;
}

.filter-drawer__close:hover {
  color: var(--copper);
  background: rgba(139, 69, 19, 0.07);
}

.filter-drawer__body {
  padding: 1rem 1rem 2rem;
  overflow-y: auto;
  flex: 1;
  display: grid;
  gap: 2rem;
}

.filter-drawer__group .filter-group__title {
  font-size: .8rem;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--black);
  text-transform: uppercase;
}

.filter-drawer__group .filter-group__hint {
  font-size: .7rem;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.4;
  letter-spacing: .05em;
  margin-top: .4rem;
}

.filter-drawer__footer {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1rem;
  background: #fafafa;
}

.filter-apply-mobile {
  width: 100%;
  background: var(--copper);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: .8rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 18px 40px rgba(139, 69, 19, .3);
  cursor: pointer;
  transition: all .2s ease;
}

.filter-apply-mobile:hover {
  background: var(--dark-copper);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
  .shop-layout__inner {
    grid-template-columns: 1fr;
  }

  .filters-panel {
    display: none;
    /* hide sticky sidebar on smaller screens */
  }
}

@media (max-width: 480px) {
  .shop-hero__title {
    letter-spacing: .08em;
  }

  .shop-card__image {
    height: 230px;
  }

  .shop-card__bgtext {
    font-size: 2rem;
    letter-spacing: .2em;
  }

  .shop-card__price-current {
    font-size: 1rem;
  }

  .shop-card__price-old {
    font-size: .75rem;
  }
}

.shop-card__image {
  position: relative; /* needed for absolute img */
  overflow: hidden;
}

/* make product image fill the box nicely */
.shop-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;        /* ✅ fills nicely */
  object-position: center;  /* ✅ keeps center */
  z-index: 2;
}

/* keep bg text behind the image */
.shop-card__bgtext {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* badge always on top */
.shop-card__badge {
  z-index: 3;
}

/* keep bottom (price + button) pinned */
.shop-card__info{
  display:flex;
  flex-direction:column;
  height:100%;
}

.shop-card__bottom{
  margin-top:auto;          /* ✅ pushes it to the bottom */
  flex-wrap: nowrap;        /* ✅ prevent button dropping */
  align-items: center;      /* nicer alignment */
}

/* make descriptions consistent height (3 lines) */
.shop-card__desc{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;    /* ✅ same number of lines for all */
  overflow: hidden;
  min-height: auto;         /* remove the old behavior */
}
