/*
 * File: assets/css/shop.css, the shop styles of the printncopy theme.
 * Purpose: styles the parts the shop templates and scripts print inside the shared components: the category filter,
 * the card parts, the product page, the cart, the checkout, the request fields and the upload field with its modal.
 * Defines: the .shop-, .product-, .qty-control, .about-highlight, .pnc-faq, .cart-, .checkout-, .pnc-request-,
 * .delivery-options and .pnc-upload- classes
 * Doc: docs/notes/client-sites/printncopyglobal.com/assets/themes/printncopy/assets/css/shop.css.md
 */

/* The shop list: the category pills, the count line and the grid of components.css. */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
}

.shop-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.shop-filter a {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition);
}

.shop-filter a:hover {
  background: var(--line);
  color: var(--text);
}

.shop-filter a.is-active {
  background: var(--pnc-navy);
  color: var(--white);
}

.shop-count {
  margin: 0 0 0 auto;
  color: var(--text-2);
  font-size: 0.85rem;
}

/* The parts of 1 product card; components.css draws the outer box. */
.product-card-image {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

.product-badge {
  display: inline-block;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--pnc-navy);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-card-image .product-badge,
.product-gallery .product-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1rem;
}

.product-card--no-image .product-card-body {
  padding-top: var(--space-lg);
}

.product-card-category {
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-card-title {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.product-card-title a {
  color: var(--text);
  text-decoration: none;
}

.product-card-title a:hover {
  text-decoration: underline;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: 0.4rem;
}

.product-card-price {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.product-card-price small {
  margin-left: 2px;
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card-price.is-quote {
  color: var(--text-2);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-card-add {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--pnc-navy);
  color: var(--white);
  text-decoration: none;
  transition: background-color var(--transition);
}

.product-card-add:hover {
  background: var(--accent);
  color: var(--on-accent);
}

/* The product page: the photo beside the order column, one column without a photo. */
.product-single {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}

.product-single--no-image {
  max-width: 760px;
}

.product-gallery {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-category-label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-title {
  margin-bottom: 0.4rem;
}

.product-price-display {
  margin: var(--space-md) 0;
  color: var(--text);
  font-family: var(--font-display);
}

.product-price-display strong {
  font-size: 2rem;
  font-weight: 800;
}

.product-price-display small {
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-price-display.is-quote strong {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-price-display span {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.product-excerpt {
  color: var(--text-2);
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.product-actions .form-field {
  margin-bottom: 0;
}

.product-qty label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.qty-control {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  width: fit-content;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.qty-control button {
  width: 40px;
  min-height: 42px;
  border: 0;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--transition);
}

.qty-control button:hover {
  background: var(--bg-alt);
}

.qty-control input {
  width: 64px;
  padding: 0.5rem 0.3rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-control input::-webkit-inner-spin-button,
.qty-control input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.product-added,
.product-turnaround {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  font-size: 0.9rem;
}

.product-added {
  color: var(--text);
  font-weight: 600;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  list-style: none;
}

.about-highlight {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* The icon well is a solid navy square with a white check. */
.about-highlight-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--pnc-navy);
  color: var(--white);
}

.product-body,
.product-faq {
  max-width: 820px;
  margin-top: var(--space-2xl);
}

.pnc-faq {
  margin-bottom: var(--space-sm);
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.pnc-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.pnc-faq summary::-webkit-details-marker {
  display: none;
}

.pnc-faq summary i {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.pnc-faq[open] summary {
  margin-bottom: var(--space-sm);
}

.pnc-faq[open] summary i {
  transform: rotate(45deg);
}

/* The cart page: the lines beside the summary, the empty state in their place. */
.cart-loading,
.checkout-loading {
  margin: 0;
  color: var(--text-2);
}

.cart-empty {
  padding: var(--space-2xl) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  text-align: center;
}

.cart-empty i {
  margin-bottom: var(--space-md);
  color: var(--text-3);
  font-size: 2.5rem;
}

.cart-empty p {
  max-width: 52ch;
  margin: 0 auto var(--space-lg);
  color: var(--text-2);
}

.cart-empty-actions {
  justify-content: center;
}

.cart-grid {
  display: grid;
  align-items: start;
  gap: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cart-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.cart-item-body {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}

.cart-item-category {
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cart-item-title {
  margin: 0;
  font-size: 1.05rem;
}

.cart-item-title a {
  color: var(--text);
  text-decoration: none;
}

.cart-item-title a:hover {
  text-decoration: underline;
}

.cart-item-specs {
  margin: 0;
  color: var(--text-2);
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  margin-left: auto;
  text-align: right;
}

.cart-item-price {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.cart-item-unit {
  color: var(--text-2);
  font-size: 0.8rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* The remove button is a light button: a white fill, a black icon, no border. */
.cart-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  transition: background-color var(--transition);
}

.cart-item-remove:hover {
  background: var(--bg-alt);
  color: var(--black);
}

[data-theme="dark"] .cart-item-remove:hover {
  background: var(--btn-light-hover);
}

.cart-summary,
.checkout-summary,
.checkout-section {
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cart-summary-title,
.checkout-summary-title,
.checkout-section-title {
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.cart-summary-row,
.checkout-total {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin: 0;
  color: var(--text-2);
  font-size: 0.92rem;
}

.cart-summary-total,
.checkout-total {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
}

.cart-summary-note,
.checkout-quote-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin: 0 0 var(--space-sm);
  color: var(--text-2);
  font-size: 0.85rem;
}

/* The checkout: the summary on the right from 900px, the fields on the left, the summary first on a phone. */
.checkout-grid {
  display: grid;
  align-items: start;
  gap: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}

.checkout-section {
  margin-bottom: var(--space-lg);
}

.checkout-lines {
  display: flex;
  flex-direction: column;
  margin: 0 0 var(--space-md);
  list-style: none;
}

.checkout-line {
  display: grid;
  gap: 0.15rem var(--space-sm);
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.checkout-line:last-child {
  border-bottom: 0;
}

.checkout-line-qty {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.checkout-line-title {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.checkout-line-price {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
}

.checkout-line-detail {
  grid-column: 2 / 4;
  color: var(--text-2);
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.checkout-empty {
  margin: 0 0 var(--space-md);
  color: var(--text-2);
}

.checkout-submit {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checkout-note {
  margin: 0 0 var(--space-sm);
  color: var(--text-2);
  font-size: 0.9rem;
}

.checkout-thanks-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.checkout-ref {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.checkout-ref span {
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.checkout-ref strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

/* The request fields of the checkout and contact forms; the honeypot sits off screen for people. */
.pnc-request-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pnc-request-row {
  display: grid;
  column-gap: var(--space-md);
  grid-template-columns: minmax(0, 1fr);
}

.delivery-options {
  align-items: start;
}

.pnc-request-required {
  color: var(--text-2);
}

/* The artwork field: the chosen-file list under the input, the error line under the list. */
.pnc-upload-field input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--btn-dark-fill);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
}

.pnc-upload-files {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: var(--space-sm) 0 0;
  list-style: none;
  color: var(--text-2);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.pnc-upload-files i {
  margin-right: 0.4rem;
  color: var(--text);
}

/* The progress modal over the page: 1 charcoal fill at an alpha, the card on the panel color. */
.pnc-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--modal-overlay);
}

.pnc-upload-card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.pnc-upload-title {
  margin: 0 0 var(--space-md);
  font-size: 1.15rem;
}

.pnc-upload-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
}

.pnc-upload-fill {
  width: 0;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent);
  transition: width 200ms ease;
}

.pnc-upload-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin: var(--space-sm) 0 0;
  color: var(--text-2);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.pnc-upload-note {
  margin: var(--space-sm) 0 0;
  color: var(--text-2);
  font-size: 0.85rem;
}

.pnc-upload-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 640px) {
  .pnc-request-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .product-single {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .product-single--no-image {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-grid,
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .checkout-summary {
    grid-column: 2;
    grid-row: 1;
  }

  .checkout-main {
    grid-column: 1;
    grid-row: 1;
  }
}
