
/* =========================================================
   Shop (winkel) page layout
   - Desktop sidebar filters
   - Mobile off-canvas filters + 2-column grid
   Uses CSS variables for theme support
   ========================================================= */

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

/* Hero: slimmer than the old thick header */
.shop-hero {
  padding: 110px 0 32px;
  background: linear-gradient(135deg, rgba(236,72,153,0.22) 0%, rgba(168,85,247,0.18) 45%, var(--dark-bg) 100%);
  border-bottom: 1px solid var(--dark-border);
}

.shop-hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.shop-hero .page-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.2px;
}

.shop-hero .page-description {
  margin: 0;
  color: var(--text-2);
  max-width: 62ch;
}

.shop-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  padding: 14px 12px;
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  background: var(--surface-1);
  backdrop-filter: blur(6px);
}

.trust-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(236,72,153,0.16);
  font-size: 18px;
}

.trust-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--text-1);
}

.trust-sub {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.3;
}

/* Category tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 16px;
}

.category-tab {
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  color: var(--text-1);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.category-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(236,72,153,0.45);
}

.category-tab.active {
  background: rgba(236,72,153,0.16);
  border-color: rgba(236,72,153,0.55);
}

/* Layout */
.shop-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

/* Filters (desktop) */
.shop-filters {
  position: sticky;
  top: 92px;
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  background: var(--surface-1);
  padding: 14px 14px 8px;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.filters-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-1);
}

.filters-reset {
  border: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
}

.filters-reset:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.filter-section {
  padding: 10px 0;
  border-top: 1px solid var(--dark-border);
}

.filter-section:first-of-type {
  border-top: 0;
}

.filter-title {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-3);
}

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

.filter-option {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  user-select: none;
  color: var(--text-1);
  font-weight: 600;
}

.filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-pink);
}

/* price range inputs */
.price-range {
  display: grid;
  gap: 10px;
}
.price-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
}
.price-label {
  font-size: 13px;
  color: var(--text-3);
}
.price-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  background: var(--surface-2);
  color: var(--text-1);
  outline: none;
}
.price-input:focus {
  border-color: rgba(236,72,153,0.55);
}
.price-apply {
  width: 100%;
}

/* Shop header controls */
.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.results-count {
  font-weight: 800;
  color: var(--text-1);
}

.shop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-search input {
  width: min(420px, 48vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  background: var(--surface-2);
  color: var(--text-1);
  outline: none;
}

.shop-search input:focus {
  border-color: rgba(236,72,153,0.55);
}

.sort-select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  background: var(--surface-2);
  color: var(--text-1);
}

.filters-open {
  display: none; /* becomes visible on mobile */
}

/* Active filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  color: var(--text-1);
  font-weight: 700;
  font-size: 13px;
}

.filter-chip button {
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-weight: 900;
  padding: 0 2px;
}

.filter-chip button:hover {
  color: var(--text-1);
}

/* Products grid */
.page-winkel .products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.page-winkel .product-card {
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  display: grid;
  grid-template-rows: auto auto;
}

.page-winkel .product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236,72,153,0.35);
  background: var(--surface-2);
}

.page-winkel .product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
  height: 240px;
}

/* Force full image visibility */
.page-winkel .product-image img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain !important;
  object-position: center;
  transform: none !important;
}

.page-winkel .product-card:hover .product-image img {
  transform: none !important;
}

body.page-winkel .product-image{
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  padding: 0 !important;
  background: var(--surface-2);
}

body.page-winkel .product-image img{
  display:block;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}


.page-winkel .product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  color: var(--text-1);
}

.product-badge.sale { background: rgba(236,72,153,0.18); }
.product-badge.new  { background: rgba(168,85,247,0.18); }

.page-winkel .product-info {
  padding: 12px 12px 14px;
  display: grid;
  gap: 8px;
}

.page-winkel .product-name {
  color: var(--text-1) !important;
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.page-winkel .product-meta {
  color: var(--text-3) !important;
  margin: 0;
  font-size: 13px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-winkel .pill {
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  color: var(--text-1);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.pill-condition { border-color: rgba(236,72,153,0.30); }
.pill.pill-lang { border-color: rgba(168,85,247,0.30); }

.page-winkel .product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.page-winkel .product-price {
  color: rgba(236,72,153,0.95) !important;
  font-weight: 900;
  font-size: 16px;
}

.page-winkel .stock {
  color: var(--text-3) !important;
  font-size: 12px;
  font-weight: 800;
}

.page-winkel .product-btn {
  margin-top: 6px;
  width: 100%;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 8px;
}

.pagination-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  color: var(--text-1);
  cursor: pointer;
  font-weight: 900;
  min-width: 44px;
}

.pagination-btn:hover {
  border-color: rgba(236,72,153,0.35);
}

.pagination-btn.active {
  background: rgba(236,72,153,0.16);
  border-color: rgba(236,72,153,0.55);
}

.pagination-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Bottom info cards */
.shop-bottom-info {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-card {
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  border-radius: 16px;
  padding: 14px;
}

.info-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-1);
}

.info-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
}

/* Navbar tweaks */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Cart button in navbar */
.nav-cart {
  position: relative;
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  border-radius: 12px;
  padding: 10px 10px;
  cursor: pointer;
  color: var(--text-1);
}

.nav-cart .cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(236,72,153,0.95);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,0.45);
}

/* Off-canvas filters (mobile) */
.filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.filter-drawer.active {
  display: block;
}

.filter-drawer .drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.filter-drawer .drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100%;
  background: var(--dark-card);
  border-left: 1px solid var(--dark-border);
  padding: 14px 14px 10px;
  overflow: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dark-border);
}

.drawer-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-1);
}

.drawer-close {
  border: 1px solid var(--dark-border);
  background: var(--surface-1);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-1);
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  position: sticky;
  bottom: 0;
  background: var(--dark-card);
  padding: 10px 0 6px;
  border-top: 1px solid var(--dark-border);
}

/* Mobile + tablet */
@media (max-width: 980px) {
  .shop-hero-inner {
    grid-template-columns: 1fr;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-filters {
    display: none;
  }

  .filters-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .shop-header {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .shop-search input {
    width: 100%;
  }

  .sort-select {
    flex: 1;
    min-width: 220px;
  }

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

  .page-winkel .product-image {
    height: 150px;
    padding: 6px;
    aspect-ratio: auto;
  }

  .page-winkel .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  .product-name {
    font-size: 14px;
  }

  .product-meta {
    font-size: 12px;
  }

  .shop-bottom-info {
    grid-template-columns: 1fr;
  }

  .page-winkel .products-grid { gap: 10px; }
  .page-winkel .product-info { padding: 10px 10px 12px; }
  .page-winkel .product-name { font-size: 13px; }
  .page-winkel .product-meta { font-size: 11px; }
  .page-winkel .add-to-cart-btn { padding: 10px 12px; font-size: 13px; }
}

/* Very small phones */
@media (max-width: 420px) {
  .category-tabs {
    gap: 8px;
  }

  .category-tab {
    padding: 9px 12px;
    font-size: 13px;
  }

  .product-info {
    padding: 10px 10px 12px;
  }

  .pill {
    padding: 5px 8px;
  }

  .page-winkel .products-grid { gap: 8px; }
  .page-winkel .product-image { height: 135px; padding: 6px; }
  .page-winkel .add-to-cart-btn { padding: 9px 10px; font-size: 13px; }

}

/* Prevent background scroll when drawer is open */
body.modal-open { overflow: hidden; }

/* ═══════ Whatnot Store Banner ═══════ */
.whatnot-banner {
  padding: 0 0 8px;
}
.whatnot-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(168,85,247,0.12), rgba(236,72,153,0.12));
  border: 1px solid rgba(168,85,247,0.25);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}
.whatnot-banner-inner:hover {
  background: linear-gradient(135deg, rgba(168,85,247,0.22), rgba(236,72,153,0.22));
  border-color: rgba(168,85,247,0.45);
  transform: translateY(-1px);
}
.whatnot-banner-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(168,85,247,0.2);
  color: #d8b4fe;
}
.whatnot-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.whatnot-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #f3f4f6;
}
.whatnot-banner-sub {
  font-size: 13px;
  color: #9ca3af;
}
.whatnot-banner-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--primary-600, #a855f7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s;
}
.whatnot-banner-inner:hover .whatnot-banner-btn {
  background: var(--primary-500, #c084fc);
}
@media (max-width: 600px) {
  .whatnot-banner-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  .whatnot-banner-btn {
    width: 100%;
    text-align: center;
  }
}

/* Out of stock styling */
.product-card.out-of-stock .product-image img {
  opacity: 0.5;
  filter: grayscale(40%);
}

.btn-disabled,
.product-btn[disabled] {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.35) !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.stock-out {
  color: #ef4444 !important;
  font-weight: 600;
}
