/* =============================================
   Zayrah Couture — Shop Page
   ============================================= */

.shop-page {
  background: var(--bg);
}

.shop-hero {
  position: relative;
  background-color: var(--primary);
  background-image: radial-gradient(circle at 80% 20%, rgba(217, 198, 165, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 20% 80%, rgba(200, 213, 192, 0.1) 0%, transparent 60%);
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 130px 0 52px;
  overflow: hidden;
  color: var(--white);
}

.shop-hero__image,
.shop-promo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-hero__overlay,
.shop-promo__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 26, 26, 0.72), rgba(26, 26, 26, 0.34));
}

.shop-hero__content {
  position: relative;
  z-index: 1;
}

.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.shop-breadcrumb a:hover {
  color: var(--accent);
}

.shop-hero__title {
  max-width: 760px;
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
}

.shop-hero__text {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.shop-shell {
  padding-top: 72px;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(260px, 25%) 1fr;
  gap: 36px;
  align-items: start;
}

.shop-sidebar {
  position: relative;
}

.shop-filter-panel {
  padding: 24px;
  border: 1px solid rgba(200, 213, 192, 0.55);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.shop-filter-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(200, 213, 192, 0.55);
}

.shop-filter-panel__head h2,
.offcanvas-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--primary);
}

.filter-count-badge {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
}

.filter-block {
  padding: 22px 0;
  border-bottom: 1px solid rgba(200, 213, 192, 0.45);
}

.filter-block:last-of-type {
  border-bottom: none;
}

.filter-label,
.filter-block__title {
  display: block;
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(47, 79, 62, 0.16);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--primary);
}

.filter-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
}

.filter-search input:focus {
  outline: none;
}

.filter-options {
  display: grid;
  gap: 12px;
}

.filter-check,
.filter-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}

.filter-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.filter-range__top,
.filter-range__values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-range__top span {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.86rem;
}

.filter-range {
  accent-color: var(--primary);
}

.filter-range__values {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.filter-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-switch__track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--secondary);
  transition: background var(--transition);
  flex-shrink: 0;
}

.filter-switch__track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(47, 79, 62, 0.18);
  transition: transform var(--transition);
}

.filter-switch input:checked + .filter-switch__track {
  background: var(--primary);
}

.filter-switch input:checked + .filter-switch__track::after {
  transform: translateX(20px);
}

.filter-clear {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.filter-clear:hover {
  transform: translateY(-2px);
  background: var(--text);
  box-shadow: var(--shadow-md);
}

.shop-content {
  min-width: 0;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.shop-toolbar__count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.shop-toolbar__filter,
.mobile-filter-button {
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--primary);
  border: 1px solid rgba(47, 79, 62, 0.14);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.shop-sort span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.shop-sort .form-select {
  min-width: 190px;
  border-radius: var(--radius-pill);
  border-color: rgba(47, 79, 62, 0.18);
  background-color: var(--white);
  color: var(--text);
  box-shadow: none;
  font-size: 0.9rem;
  padding: 11px 42px 11px 18px;
}

.shop-sort .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.18rem rgba(47, 79, 62, 0.12);
}

.shop-grid,
.shop-skeleton {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.shop-skeleton {
  display: none;
  margin-bottom: 28px;
}

.shop-page.is-loading .shop-skeleton {
  display: grid;
}

.shop-page.is-loading .shop-grid,
.shop-page.is-loading .shop-pagination {
  opacity: 0.28;
  pointer-events: none;
}

.skeleton-card {
  min-height: 420px;
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, rgba(221, 230, 213, 0.45), rgba(255, 255, 255, 0.86), rgba(221, 230, 213, 0.45));
  background-size: 220% 100%;
  animation: skeletonSweep 1.25s ease-in-out infinite;
}

@keyframes skeletonSweep {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.shop-product-card {
  min-width: 0;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(47, 79, 62, 0.055);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.shop-product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.shop-product-card[hidden] {
  display: none;
}

.shop-product-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--secondary);
}

.shop-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, opacity var(--transition);
}

.shop-product-card__image--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.shop-product-card:hover .shop-product-card__image {
  transform: scale(1.06);
}

.shop-product-card:hover .shop-product-card__image--hover {
  opacity: 1;
}

.shop-badge,
.shop-stock-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.shop-badge--sale {
  background: var(--accent);
  color: var(--text);
}

.shop-stock-badge {
  top: auto;
  bottom: 14px;
  background: rgba(26, 26, 26, 0.78);
}

.shop-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  box-shadow: 0 8px 22px rgba(26, 26, 26, 0.1);
  transition: all var(--transition);
}

.shop-wishlist span {
  display: none;
  font-size: 0.74rem;
  font-weight: 700;
}

.shop-wishlist:hover,
.shop-wishlist.is-active {
  background: var(--primary);
  color: var(--white);
}

.shop-quick-view {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(18px);
  opacity: 0;
  transition: all var(--transition);
}

.shop-product-card:hover .shop-quick-view,
.shop-product-card:focus-within .shop-quick-view {
  transform: translateY(0);
  opacity: 1;
}

.shop-quick-view:hover {
  background: var(--primary);
  color: var(--white);
}

.shop-product-card__body {
  padding: 18px 18px 20px;
}

.shop-product-card__category {
  margin: 0 0 7px;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-product-card__name {
  min-height: 2.8em;
  margin: 0 0 10px;
  font-family: var(--font-heading);
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.28;
}

.shop-product-card__name a:hover {
  color: var(--primary);
}

.shop-product-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
}

.price-current {
  color: var(--primary);
  font-weight: 800;
}

.price-was {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: line-through;
}

.shop-empty-state {
  padding: 72px 24px;
  text-align: center;
  border: 1px solid rgba(200, 213, 192, 0.55);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.shop-empty-state i {
  font-size: 2rem;
  color: var(--accent);
}

.shop-empty-state h2 {
  margin: 16px 0 8px;
  font-family: var(--font-heading);
  color: var(--primary);
}

.shop-empty-state p {
  margin: 0 0 22px;
  color: var(--text-muted);
}

.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 0;
}

.shop-pagination button {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text);
  border: 1px solid rgba(47, 79, 62, 0.12);
  font-weight: 700;
  transition: all var(--transition);
}

.shop-pagination button:hover,
.shop-pagination button.is-active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.shop-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-promo {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  margin-top: 74px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  color: var(--white);
}

.shop-promo__content {
  position: relative;
  z-index: 1;
  max-width: 540px;
  padding: 48px;
}

.shop-promo__content h2 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
}

.shop-promo__content p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
}

.recently-viewed {
  padding-top: 20px;
}

.recently-viewed .section-header {
  margin-bottom: 28px;
}

.recently-viewed-slider {
  padding: 4px 4px 70px;
}

.recent-card {
  height: auto;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.recent-card a {
  display: grid;
}

.recent-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.recent-card__name,
.recent-card__price {
  padding: 0 16px;
}

.recent-card__name {
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: 1.04rem;
  color: var(--text);
}

.recent-card__price {
  margin: 6px 0 18px;
  color: var(--primary);
  font-weight: 800;
}

.recently-viewed__controls {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.recently-viewed__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.recently-viewed__btn:hover {
  background: var(--primary);
  color: var(--white);
}

.shop-newsletter {
  padding-top: 24px;
}

.shop-newsletter__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
  padding: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(221, 230, 213, 0.9), rgba(253, 251, 248, 0.98));
  box-shadow: var(--shadow-md);
}

.shop-newsletter h2 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  font-weight: 500;
}

.shop-newsletter p {
  margin: 0;
  color: var(--text-muted);
}

.shop-newsletter__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.shop-newsletter__form input {
  min-height: 52px;
  border: 1px solid rgba(47, 79, 62, 0.16);
  border-radius: var(--radius-pill);
  background: var(--white);
  padding: 0 20px;
  color: var(--text);
}

.shop-newsletter__form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.18rem rgba(47, 79, 62, 0.12);
}

.shop-newsletter__message {
  grid-column: 1 / -1;
  min-height: 22px;
  font-size: 0.88rem;
}

.shop-filter-offcanvas {
  background: var(--bg);
}

.shop-filter-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(200, 213, 192, 0.55);
}

.shop-filter-offcanvas .shop-filter-panel {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.shop-filter-offcanvas .shop-filter-panel__head {
  display: none;
}

.mobile-filter-button {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 990;
  display: none;
  transform: translateX(-50%);
}

@media (max-width: 1199.98px) {
  .shop-grid,
  .shop-skeleton {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .shop-layout {
    display: block;
  }

  .shop-shell {
    padding-top: 54px;
  }

  .shop-toolbar {
    flex-wrap: wrap;
  }

  .shop-toolbar__count {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .shop-hero {
    min-height: 240px;
    padding: 132px 0 52px;
  }

  .shop-grid,
  .shop-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .shop-toolbar {
    position: relative;
    align-items: stretch;
    padding: 12px 0;
    background: transparent;
    backdrop-filter: none;
  }

  .shop-sort {
    width: 100%;
    order: 3;
  }

  .shop-sort .form-select {
    flex: 1;
    min-width: 0;
  }

  .shop-toolbar__count {
    order: 1;
  }

  .shop-toolbar__filter {
    order: 2;
    display: inline-flex !important;
    justify-content: center;
  }

  .mobile-filter-button {
    display: none;
  }

  .shop-product-card__body {
    padding: 14px;
  }

  .shop-product-card__name {
    min-height: 3em;
    font-size: 0.98rem;
  }

  .shop-product-card__category {
    font-size: 0.66rem;
  }

  .shop-quick-view {
    position: static;
    display: block;
    margin: 0 14px 14px;
    opacity: 1;
    transform: none;
    background: var(--primary);
    color: var(--white);
  }

  .shop-wishlist {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
  }

  .shop-promo {
    min-height: 330px;
    margin-top: 52px;
  }

  .shop-promo__content,
  .shop-newsletter__inner {
    padding: 30px 22px;
  }

  .shop-newsletter__inner,
  .shop-newsletter__form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .shop-product-card__name {
    font-size: 0.92rem;
  }

  .price-current,
  .price-was {
    font-size: 0.86rem;
  }
}
