/* ══════════════════════════════════════════
   shop.html — page-specific styles
══════════════════════════════════════════ */
.shop-layout {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 2rem;
      align-items: start;
    }

    .shop-sidebar {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 1.5rem;
      position: sticky;
      top: calc(var(--nav-height) + 1.5rem);
    }

    .filter-heading {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 2px;
      color: var(--text-muted);
      margin-bottom: 0.75rem;
      margin-top: 1.25rem;
    }

    .filter-heading:first-child { margin-top: 0; }

    .filter-btn {
      display: block;
      width: 100%;
      text-align: left;
      background: none;
      border: 1px solid transparent;
      color: var(--text-secondary);
      padding: 7px 10px;
      border-radius: 7px;
      cursor: pointer;
      font-size: 0.88rem;
      transition: var(--transition);
      margin-bottom: 3px;
    }

    .filter-btn:hover {
      background: var(--bg-elevated);
      color: var(--text-primary);
    }

    .filter-btn.active {
      background: var(--bg-elevated);
      border-color: var(--border-glow);
      color: var(--purple-light);
      font-weight: 600;
    }

    .filter-count {
      float: right;
      background: var(--bg-base);
      border-radius: 10px;
      padding: 1px 7px;
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .price-filter {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 0.5rem;
    }

    .price-filter input {
      padding: 7px 10px;
      font-size: 0.82rem;
    }

    .shop-main-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.5rem;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .results-count {
      color: var(--text-muted);
      font-size: 0.85rem;
    }

    .sort-select {
      width: auto;
      padding: 8px 12px;
      font-size: 0.85rem;
      cursor: pointer;
    }

    .products-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 1.25rem;
    }

    .product-card.hidden { display: none; }

    .no-results {
      grid-column: 1/-1;
      text-align: center;
      padding: 4rem 1rem;
      color: var(--text-muted);
    }

    .no-results i { font-size: 2rem; margin-bottom: 1rem; display: block; }

    /* ── Mobile filter drawer ─────────────────────────────── */
    .mobile-filter-toggle {
      display: none;
      align-items: center;
      gap: 8px;
      background: var(--bg-elevated);
      border: 1px solid var(--border-color);
      color: var(--text-primary);
      padding: 9px 14px;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      white-space: nowrap;
    }
    .mobile-filter-toggle:hover,
    .mobile-filter-toggle.active {
      border-color: var(--border-glow);
      color: var(--purple-light);
    }
    .mobile-filter-header {
      display: none;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 1.25rem 0.75rem;
      border-bottom: 1px solid var(--border-color);
      margin: -1.5rem -1.5rem 1rem;
      background: var(--bg-surface);
      position: sticky;
      top: 0;
      z-index: 1;
    }
    .mobile-filter-header span {
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--text-primary);
    }
    .mobile-filter-header button {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 1.3rem;
      line-height: 1;
      cursor: pointer;
      padding: 4px 6px;
      border-radius: 6px;
    }
    .mobile-filter-header button:hover { color: var(--text-primary); }
    .filter-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.55);
      z-index: 1050;
    }
    .filter-overlay.visible { display: block; }

    @media (max-width: 900px) {
      .shop-layout { grid-template-columns: 1fr; }
      .shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(88vw, 310px);
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1100;
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
        border: none;
        border-right: 1px solid var(--border-glow);
        padding: 1.5rem;
        transform: translateX(-110%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        -webkit-overflow-scrolling: touch;
      }
      .shop-sidebar.mobile-open {
        transform: translateX(0);
      }
      .mobile-filter-toggle { display: flex; }
      .mobile-filter-header { display: flex; }
      .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
      }
      .product-card-img { height: 150px; }
      .skeleton-img { height: 150px; }
    }

    @media (max-width: 480px) {
      .shop-main-header { gap: 0.5rem; }
      .sort-select { font-size: 0.8rem; padding: 7px 8px; }
    }

    /* ── Product Card Image Wrap ─────────────────────────── */
    .product-card { cursor: pointer; }
    .product-card-img-wrap {
      position: relative;
      width: 100%;
      overflow: hidden;
      background: var(--bg-elevated);
      flex-shrink: 0;
    }
    .product-card-img {
      display: block;
      width: 100%;
      height: 220px;
      object-fit: cover;
      transition: transform 0.35s ease;
    }
    .product-card:hover .product-card-img { transform: scale(1.04); }
    .product-img-count {
      position: absolute;
      bottom: 8px;
      right: 8px;
      background: rgba(0,0,0,0.65);
      color: #fff;
      font-size: 0.72rem;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      gap: 4px;
      backdrop-filter: blur(4px);
      border: 1px solid rgba(124,77,255,0.4);
    }

    /* ── Product Detail Modal ────────────────────────────── */
    .pm-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.85);
      z-index: 2000;
      align-items: center;
      justify-content: center;
      backdrop-filter: blur(6px);
      padding: 1rem;
    }
    .pm-overlay.open { display: flex; }

    .pm-dialog {
      position: relative;
      width: min(90vw, 820px);
      max-height: 92vh;
      background: var(--bg-surface);
      border: 1px solid rgba(124,77,255,0.4);
      border-radius: var(--radius-lg);
      box-shadow: 0 0 70px rgba(124,77,255,0.25);
      display: flex;
      flex-direction: row;
      overflow: hidden;
    }

    /* Gallery side */
    .pm-gallery {
      position: relative;
      flex: 0 0 55%;
      overflow: hidden;
      /* aspect-ratio keeps a clean frame with no black bars */
      aspect-ratio: 4 / 3;
      max-height: 480px;
    }
    .pm-img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      background: var(--bg-elevated);
    }

    /* Prev/Next arrows */
    .pm-nav {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 0.5rem;
      pointer-events: none;
    }
    .pm-arrow {
      pointer-events: all;
      background: rgba(0,0,0,0.55);
      border: 1px solid rgba(124,77,255,0.45);
      color: #fff;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
      transition: background 0.2s, border-color 0.2s;
    }
    .pm-arrow:hover {
      background: rgba(124,77,255,0.5);
      border-color: var(--purple-bright);
    }

    /* Dot indicators */
    .pm-dots {
      position: absolute;
      bottom: 10px;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      gap: 6px;
    }
    .pm-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(255,255,255,0.35);
      border: 1px solid rgba(124,77,255,0.4);
      cursor: pointer;
      transition: background 0.2s, transform 0.2s;
    }
    .pm-dot.active {
      background: var(--purple-bright);
      transform: scale(1.25);
    }

    /* Info side */
    .pm-body {
      flex: 1;
      padding: 2rem 1.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      overflow-y: auto;
    }
    .pm-name {
      font-size: 1.3rem;
      font-weight: 800;
      color: var(--text-primary);
      line-height: 1.3;
      margin: 0;
    }
    .pm-price {
      font-size: 1.6rem;
      font-weight: 900;
      color: var(--purple-bright);
    }
    .pm-desc {
      font-size: 0.9rem;
      color: var(--text-secondary);
      line-height: 1.6;
      margin: 0;
    }
    .pm-badges {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .pm-add {
      margin-top: auto;
      width: 100%;
    }
    .pm-full-link {
      color: var(--text-muted);
      font-size: 0.82rem;
      font-weight: 700;
      text-align: center;
      text-decoration: none;
      transition: var(--transition);
    }
    .pm-full-link:hover {
      color: var(--purple-light);
    }
    .pm-full-link i {
      margin-right: 5px;
    }

    /* Close button */
    #pm-close {
      position: absolute;
      top: 10px;
      right: 12px;
      background: rgba(0,0,0,0.6);
      border: 1px solid rgba(124,77,255,0.4);
      color: #fff;
      font-size: 1rem;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      transition: background 0.2s;
    }
    #pm-close:hover { background: rgba(124,77,255,0.5); }

    /* ── Color Swatches (Product Modal) ────────────────── */
    .pm-swatches {
      display: none;
      margin: 1rem 0 0.5rem;
    }
    .pm-swatches-label {
      font-size: 0.78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text-muted);
      margin-bottom: 0.55rem;
    }
    .pm-selected-color {
      color: var(--purple-bright);
      font-weight: 700;
      font-style: normal;
      text-transform: none;
      letter-spacing: 0;
    }
    .pm-swatch-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .pm-swatch {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer;
      transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
      outline: none;
      padding: 0;
    }
    .pm-swatch:hover { transform: scale(1.18); border-color: var(--purple-bright); }
    .pm-swatch.selected {
      border-color: var(--purple-bright);
      box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--purple-bright);
      transform: scale(1.12);
    }
    .pm-swatch[data-color="White"] { border-color: rgba(255,255,255,0.3); }
    .pm-swatch[data-color="White"].selected { border-color: var(--purple-bright); }
    .pm-swatch[data-color="Glow"] { border-color: rgba(185,246,202,0.4); }
    .pm-swatch-custom {
      background: conic-gradient(
        red, orange, yellow, green, cyan, blue, violet, red
      ) !important;
      border-radius: 50% !important;
      border: none !important;
      overflow: hidden;
    }
    .pm-swatch-hint {
      margin-top: 0.5rem;
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.4;
    }
    .pm-swatch-hint i { color: var(--purple-bright); margin-right: 4px; }
    @keyframes pm-shake {
      0%,100% { transform: translateX(0); }
      20%      { transform: translateX(-7px); }
      40%      { transform: translateX(7px); }
      60%      { transform: translateX(-5px); }
      80%      { transform: translateX(5px); }
    }
    .pm-swatches.shake { animation: pm-shake 0.45s ease; }

    /* ── Quantity selector (Product Modal) ─────────────── */
    .pm-qty {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0.5rem;
      margin: 1rem 0 0.75rem;
    }
    .pm-qty-label {
      font-size: 0.78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-muted);
      margin-right: 0.25rem;
    }
    .pm-qty .qty-btn {
      width: 32px;
      height: 32px;
      font-size: 1.1rem;
      line-height: 1;
    }
    .pm-qty .qty-value {
      font-size: 1rem;
      font-weight: 600;
      min-width: 28px;
    }

    /* Mobile: stack vertically */
    @media (max-width: 620px) {
      .pm-dialog { flex-direction: column; width: 96vw; max-height: 95vh; }
      .pm-gallery { flex: 0 0 auto; aspect-ratio: 4/3; max-height: 55vw; }
      .pm-img { width: 100%; height: 100%; }
      .pm-body { padding: 1.25rem 1rem; }
      .pm-name { font-size: 1.1rem; }
    }
