/* Lekhvi by SkillNest — mobile catalogue layout fix (V21)
   This stylesheet intentionally loads after store.css and skillnest-theme.css. */

@media (max-width: 600px) {
  #shop.section {
    width: 100%;
    max-width: 100%;
    padding: 32px 14px 38px;
    overflow: clip;
  }

  #shop > .head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    margin: 0 0 18px;
  }

  #shop > .head > div {
    min-width: 0;
    width: 100%;
  }

  #shop > .head h2 {
    margin: 0;
    font-size: clamp(25px, 7.2vw, 33px);
    line-height: 1.12;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
  }

  #shop > .head p {
    margin: 7px 0 0;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  #shop #filterCount {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* Collection pills occupy a full-width row; selects must never sit beside them. */
  #shop .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 9px;
    width: 100%;
    min-width: 0;
    margin: 0 0 18px;
  }

  #shop .filters {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #shop .filters .filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 9px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  #shop .toolbar > select {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 46px;
    margin: 0;
    padding: 10px 27px 10px 11px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #shop #sort {
    grid-column: 1 / -1;
  }

  #shop .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  #shop .product {
    min-width: 0;
  }

  #shop .pimg {
    padding: 7px;
  }

  #shop .productBody {
    min-width: 0;
    padding: 10px;
  }

  #shop .productBody h3 {
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #shop .productBody p {
    min-height: 0;
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  #shop .priceRow {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  #shop .priceRow .btn {
    min-width: 0;
    flex: 1 1 70px;
    padding: 9px 10px;
    font-size: 12px;
  }

  #shop .pager {
    gap: 6px;
    margin-top: 18px;
  }
}

@media (max-width: 360px) {
  #shop.section {
    padding-right: 11px;
    padding-left: 11px;
  }

  #shop .filters {
    grid-template-columns: minmax(0, 1fr);
  }

  #shop .filters .filter {
    min-height: 42px;
  }

  #shop .toolbar > select {
    font-size: 11px;
    padding-left: 8px;
  }
}
