/* Shop Page Styles */

/* ─── Main Container ─── */
.shop-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 48px 0 48px;
}

/* ─── Header Row ─── */
.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 20px 0;
}

.shop-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-black);
}

/* Sort Controls */
.shop-sort {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-gray-muted);
  text-transform: uppercase;
}

.sort-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sort-dropdown select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-black);
  background-color: var(--color-white);
  border: 1px solid var(--color-black);
  padding: 10px 40px 10px 16px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.sort-dropdown select:hover,
.sort-dropdown select:focus {
  border-color: var(--color-gray-muted);
}

.sort-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  stroke: var(--color-black);
  stroke-width: 2;
  fill: none;
}

/* ─── Divider ─── */
.shop-divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 0;
}

/* ─── Product Grid ─── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 32px 0 64px 0;
}

/* ─── Product Card ─── */
.shop-card {
  position: relative;
}

.shop-card-image-link {
  display: block;
}

.shop-card-image-wrapper {
  position: relative;
  aspect-ratio: 3 / 4;
  background-color: #E8E8E8;
  overflow: hidden;
}

.shop-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Placeholder (shown when img fails or src missing) */
.shop-card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #E8E8E8;
  z-index: 0;
}

.shop-card-placeholder svg {
  stroke: #BDBDBD;
  stroke-width: 1.5;
  fill: none;
  opacity: 0.6;
}

/* If img loads successfully, it covers the placeholder */
.shop-card-img:not([style*="display: none"]) {
  position: relative;
  z-index: 1;
}

/* NEW Badge */
.shop-badge-new {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-black);
  background-color: var(--color-white);
  border: 1px solid var(--color-black);
  padding: 4px 10px;
  line-height: 1;
}

/* Wishlist Heart Icon */
.shop-wishlist-btn {
  position: absolute;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.shop-wishlist-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-black);
  stroke-width: 1.5;
  fill: none;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.shop-wishlist-btn:hover svg {
  stroke: var(--color-black);
  fill: rgba(0, 0, 0, 0.08);
}

.shop-wishlist-btn.active svg {
  fill: var(--color-black);
  stroke: var(--color-black);
}

.shop-wishlist-btn:hover {
  transform: scale(1.1);
}

/* Card Info (below image) */
.shop-card-info {
  padding: 14px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-card-name {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-black);
  transition: opacity 0.2s ease;
}

.shop-card-name:hover {
  opacity: 0.7;
}

.shop-card-price {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-gray-muted);
  letter-spacing: 0.02em;
}

.shop-card-buy {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-black);
  text-decoration: none;
  border-bottom: 1.5px solid var(--color-black);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: opacity 0.2s ease;
}

.shop-card-buy:hover {
  opacity: 0.6;
}

/* ─── Load More Section ─── */
.shop-load-more-section {
  padding: 0 0 80px 0;
}

.shop-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 28px 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-black);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.shop-load-more svg {
  stroke: var(--color-black);
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s ease;
}

.shop-load-more:hover {
  opacity: 0.6;
}

.shop-load-more:hover svg {
  transform: translateY(3px);
}

/* ─── Footer Overrides for Shop (simplified) ─── */
.footer--simple .footer-tagline {
  display: none;
}

.footer--simple .footer-socials {
  display: none;
}

.footer-nav--row {
  flex-direction: row !important;
  align-items: center !important;
  gap: 32px !important;
}

/* ─── Wishlist Button: vertical position ─── */
.shop-wishlist-btn {
  top: 12px;
}

/* ─── Skeleton Loading ─── */
.shop-card--skeleton .shop-card-image-wrapper {
  background: none;
}

.skeleton-block,
.skeleton-line {
  background: linear-gradient(90deg, #e8e8e8 25%, #d4d4d4 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 0;
}

.skeleton-block {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: block;
}

.skeleton-line {
  height: 12px;
  border-radius: 2px;
  margin-bottom: 6px;
}

.skeleton-line--name  { width: 75%; }
.skeleton-line--price { width: 50%; }
.skeleton-line--buy   { width: 30%; margin-top: 4px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── State Messages (empty / error / no-results) ─── */
.shop-state-message {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  text-align: center;
  color: var(--color-gray-muted);
}

.shop-state-message svg {
  stroke: #BDBDBD;
  stroke-width: 1.5;
  fill: none;
  opacity: 0.7;
}

.shop-state-message p {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray-muted);
  margin: 0;
}

.shop-state-message--error p {
  color: #888;
}

.shop-retry-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-black);
  background: transparent;
  border: 1.5px solid var(--color-black);
  padding: 10px 24px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.shop-retry-btn:hover {
  background: var(--color-black);
  color: var(--color-white);
}

/* ─── Search Overlay ─── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.search-overlay-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 700px;
  margin-top: 80px;
  padding: 0 24px;
  gap: 12px;
}

.search-overlay-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-black);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-black);
  padding: 12px 0;
  outline: none;
}

.search-overlay-input::placeholder {
  color: #BDBDBD;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.search-overlay-close {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-black);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.search-overlay-close:hover {
  opacity: 1;
}

/* ==========================================================================
   Mobile Responsive — max-width: 768px (Shop-specific overrides only)
   Navbar/drawer styles are handled globally in responsive.css
   ========================================================================== */
@media screen and (max-width: 768px) {

  /* ── Shop Main ── */
  .shop-main {
    padding: 16px 16px 0 16px;
    margin-top: 56px;
  }

  /* ── Shop Header ── */
  .shop-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0 16px 0;
  }

  .shop-title {
    font-size: 0.85rem;
  }

  .shop-sort {
    width: 100%;
    justify-content: space-between;
  }

  .sort-label {
    font-size: 0.7rem;
  }

  .sort-dropdown select {
    font-size: 0.7rem;
    padding: 8px 32px 8px 12px;
  }

  /* ── Product Grid → 2 columns ── */
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 0 40px 0;
  }

  /* ── Product Cards ── */
  .shop-card-image-wrapper {
    aspect-ratio: 3 / 4;
  }

  .shop-badge-new {
    top: 8px;
    left: 8px;
    font-size: 0.58rem;
    padding: 3px 8px;
  }

  .shop-wishlist-btn {
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
  }

  .shop-wishlist-btn svg {
    width: 16px;
    height: 16px;
  }

  .shop-card-info {
    padding: 10px 0 0 0;
    gap: 3px;
  }

  .shop-card-name {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }

  .shop-card-price {
    font-size: 0.68rem;
  }

  .shop-card-buy {
    font-size: 0.65rem;
    margin-top: 3px;
  }

  /* ── Footer Mobile ── */
  .footer {
    padding: 36px 16px 28px 16px;
    text-align: center;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .footer-left {
    max-width: 100%;
    text-align: center;
  }

  .footer-logo {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .footer-copyright {
    font-size: 0.6rem;
  }

  .footer-right {
    align-items: center;
  }

  .footer-nav--row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px !important;
  }

  .footer-link {
    font-size: 0.62rem;
  }
}
