/* Products app: filter chips, the product grid, item tables and card grids that wrap
   over several rows. Uses the tokens of static/css/site.css; never edits it. */

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1px solid var(--line); color: var(--muted-dark); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; transition: color .16s, background .16s, border-color .16s; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-current] { color: #fff; background: var(--ink); border-color: var(--ink); }
.filter-note { margin: 40px 0 -40px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }

/* the Morgan selection: three columns of photo cards; a short last row stretches */
.photo-grid.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-grid .photo-card { min-height: 440px; padding: 28px; }
.product-grid .photo-card .shade { background: linear-gradient(#030403b8 0%, #0304034d 22%, #0000 40%, #030403d9 100%); }
.product-grid .photo-card h3 { font-size: clamp(30px, 2.8vw, 44px); }
.product-grid .photo-card > .copy > p { font-size: 14px; margin-bottom: 22px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-grid .photo-card:last-child:nth-child(3n+1) { grid-column: span 3; }
.product-grid .photo-card:last-child:nth-child(3n+2) { grid-column: span 2; }

/* card grids that may wrap: hairlines come from the 1px gap, so every row is ruled */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: clamp(56px, 7vw, 100px); background: var(--line); border: 1px solid var(--line); }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid.cols-1 { grid-template-columns: 1fr; }
.card-grid > .hair-card { border: 0; min-height: 300px; background: var(--paper); }
.card-grid.on-bone > .hair-card { background: var(--bone); }
.card-grid > .hair-card h3 { margin-top: 48px; }
.card-grid > .hair-card > .kicker { margin: 10px 0 0; }
.card-grid.light { background: var(--line-light); border-color: var(--line-light); }
.card-grid.light > .hair-card { background: var(--ink); }
.card-grid.light > .hair-card > p { color: var(--white-70); }
.card-grid.light > .hair-card > .index { color: var(--gold); }
.card-grid.light > .hair-card > .kicker { color: var(--white-60); }

/* what we supply */
.item-table { width: 100%; border-collapse: collapse; margin-top: clamp(50px, 6vw, 90px); font-size: 15px; }
.item-table thead th { padding: 0 20px 14px 0; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-align: left; }
.item-table tbody th, .item-table tbody td { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.55; }
.item-table tbody th { width: 26%; font-weight: 500; }
.item-table tbody td { color: var(--muted-dark); }
.item-table td.forms { width: 30%; color: var(--muted); font-size: 13px; }
.item-table tr.group th { padding: 34px 0 10px; border-bottom: 1px solid var(--ink); color: var(--oxblood); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; width: auto; }
.item-table .placeholder-mark { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; }

/* pack formats and customers */
.pack-list { margin: 0; padding: 0; list-style: none; }
.pack-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.pack-list li:first-child { border-top: 1px solid var(--ink); }
.customer-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; margin-top: 38px; }
.section-ink .order-note { margin-top: 34px; max-width: 560px; color: var(--white-70); font-size: 14px; line-height: 1.7; }
.related-grid .hair-card > p { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.aside-box + .aside-box { margin-top: 24px; }
.aside-box .fact-table { margin: 0; font-size: 14px; }
.aside-box .fact-table th { width: 42%; }
.aside-box .fact-table tr:last-child th, .aside-box .fact-table tr:last-child td { border-bottom: 0; }

[dir="rtl"] .item-table thead th, [dir="rtl"] .item-table tbody th, [dir="rtl"] .item-table tbody td { text-align: right; padding-right: 0; padding-left: 20px; }
[dir="rtl"] .item-table .placeholder-mark { margin-left: 0; margin-right: 8px; }

@media (width <= 1220px) {
  .photo-grid.product-grid, .card-grid, .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .product-grid .photo-card:last-child:nth-child(3n+1), .product-grid .photo-card:last-child:nth-child(3n+2) { grid-column: auto; }
  .card-grid > .hair-card { min-height: 0; }
  .filter-note { margin-bottom: 0; }
}
@media (width <= 580px) {
  .item-table thead { display: none; }
  .item-table tbody tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .item-table tbody th, .item-table tbody td { display: block; width: auto; padding: 2px 0; border: 0; }
  .item-table tbody th { font-size: 16px; }
  .item-table td.forms { width: auto; padding-top: 6px; }
  .item-table tr.group { padding: 30px 0 6px; border-bottom: 1px solid var(--ink); }
  .item-table tr.group th { padding: 0; border: 0; }
}
