/* The product photograph and prices remain the focus of the brooch shop. */
.shop-section {
  --shop-panel: #171c16;
  --shop-panel-soft: #1c2319;
  --shop-border: #d7e8c526;
  --shop-copy: #b6c0ad;
  --shop-accent: #bad89f;
}

.shop-section .section-intro {
  align-items: end;
}

.shop-section .store-intro {
  max-width: 440px;
  color: var(--shop-copy);
  font-size: 16px;
  line-height: 1.8;
}

.shop-section .cart-trigger {
  min-height: 44px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  border-color: var(--shop-border);
}

.shop-section .cart-trigger [data-cart-count] {
  min-width: 25px;
  padding: 2px 7px;
  font-size: 12px;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(285px, .85fr);
  gap: 28px;
  align-items: start;
}

.shop-catalog,
.shop-product-body,
.shop-pricing-panel {
  min-width: 0;
}

.shop-product-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--shop-panel);
  border: 1px solid var(--shop-border);
  border-radius: 18px;
}

.shop-product-photo {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: #21231f;
}

.shop-product-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

.shop-photo-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 10px;
  color: #fff;
  background: #111b14cc;
  border: 1px solid #ffffff36;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(8px);
}

.shop-product-body {
  padding: 30px 26px;
}

.shop-product-body .resource-label {
  color: #ff9a61;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 1.4px;
}

.shop-product-body h3 {
  margin-top: 13px;
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.15;
  letter-spacing: -.9px;
  overflow-wrap: anywhere;
}

.shop-product-description {
  margin-top: 17px;
  color: var(--shop-copy);
  font-size: 14px;
  line-height: 1.8;
}

.shop-live-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--shop-border);
  font-variant-numeric: tabular-nums;
}

.shop-live-price strong {
  color: var(--text);
  font-size: 35px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -1.2px;
}

.shop-live-price small {
  color: var(--shop-copy);
  font-size: 14px;
}

.shop-product-form {
  margin-top: 23px;
}

.shop-product-form > label {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.shop-product-form > small {
  display: block;
  margin-top: 8px;
  color: var(--shop-copy);
  font-size: 14px;
  line-height: 1.6;
}

.shop-quantity-controls {
  display: flex;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  background: var(--shop-panel-soft);
  border: 1px solid var(--shop-border);
  border-radius: 8px;
}

.shop-quantity-controls button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 46px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
}

.shop-quantity-controls button:hover:not(:disabled) {
  background: #ff631c1a;
}

.shop-quantity-controls button:disabled {
  opacity: .35;
  cursor: default;
}

.shop-quantity-controls input,
.shop-product-form > input[name="quantity"] {
  width: 72px;
  min-height: 46px;
  padding: 10px 4px;
  color: var(--text);
  background: var(--shop-panel-soft);
  border: 0;
  border-inline: 1px solid var(--shop-border);
  border-radius: 0;
  font: 16px var(--font);
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.shop-quantity-controls input::-webkit-inner-spin-button,
.shop-product-form > input[name="quantity"]::-webkit-inner-spin-button {
  appearance: none;
}

.shop-quantity-controls input:focus-visible,
.shop-product-form > input[name="quantity"]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -3px;
}

.shop-product-math {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 23px;
  font-size: 14px;
  line-height: 1.6;
}

.shop-product-math > span {
  color: var(--shop-copy);
}

.shop-product-math strong {
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}

.shop-product-discount,
.shop-next-tier {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.shop-product-discount {
  color: var(--shop-accent);
}

.shop-next-tier {
  color: var(--shop-copy);
}

.shop-product-discount:empty,
.shop-next-tier:empty {
  display: none;
}

.shop-product-form .button {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  padding: 13px 17px;
  border: 0;
  font-size: 14px;
  line-height: 1.5;
  gap: 12px;
}

.shop-product-form .shop-request-status {
  min-height: 0;
  margin-top: 12px;
  color: var(--shop-copy);
  font-size: 14px;
  line-height: 1.6;
}

.shop-product-form .shop-request-status:empty {
  display: none;
}

.shop-pricing-panel {
  padding: 27px 25px 23px;
  background: var(--shop-panel);
  border: 1px solid var(--shop-border);
  border-radius: 18px;
}

.shop-pricing-panel > .eyebrow {
  color: var(--shop-accent);
  font-size: 10px;
  line-height: 1.6;
}

.shop-pricing-panel > h3 {
  margin-top: 12px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.7px;
}

.shop-pricing-panel > p:not(.eyebrow) {
  margin-top: 15px;
  color: var(--shop-copy);
  font-size: 14px;
  line-height: 1.7;
}

.shop-price-table {
  width: 100%;
  margin-top: 22px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.shop-price-table th,
.shop-price-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--shop-border);
  text-align: right;
  white-space: nowrap;
}

.shop-price-table :is(th, td):first-child {
  width: 35%;
  text-align: left;
}

.shop-price-table th {
  color: var(--shop-copy);
  font-size: 12px;
  font-weight: 500;
}

.shop-price-table td {
  font-weight: 400;
}

.shop-price-table tbody th {
  color: inherit;
  font-size: 14px;
  font-weight: 400;
}

.shop-price-table tbody tr:last-child :is(th, td) {
  color: var(--shop-accent);
  border-bottom: 0;
}

.shop-price-table tr.active,
.shop-price-table tr[data-current="true"],
.shop-price-table tr[aria-current="true"] {
  color: #ffad7e;
}

.shop-pricing-panel > p.shop-price-note {
  padding-top: 17px;
  margin-top: 10px;
  border-top: 1px solid var(--shop-border);
  font-size: 14px;
}

.shop-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 35px;
  padding-top: 25px;
  border-top: 1px solid var(--shop-border);
}

.shop-rules > * {
  min-width: 0;
}

.shop-rules :is(h3, strong) {
  display: block;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -.1px;
}

.shop-rules p {
  margin-top: 7px;
  color: var(--shop-copy);
  font-size: 14px;
  line-height: 1.7;
}

.material-art.brooch-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.material-art.brooch-art > img ~ .art-disclaimer {
  left: 15px;
  right: auto;
  padding: 5px 8px;
  color: #fff;
  background: #111b14cc;
  border: 1px solid #ffffff36;
  border-radius: 4px;
}

/* Real product details carry through to the cart and checkout. */
.cart-dialog {
  width: min(620px, calc(100vw - 28px));
}

.cart-item {
  gap: 18px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.cart-item:first-child {
  padding-top: 0;
}

.cart-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cart-item-image {
  flex: 0 0 96px;
  width: 96px;
  height: 120px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  background: #20251c;
}

.cart-item-details {
  min-width: 0;
}

.cart-item-details h3 {
  font-size: 18px;
  line-height: 1.4;
}

.cart-item-price,
.cart-item-subtotal,
.cart-item-savings {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.cart-item-price {
  color: #aebda2;
}

.cart-item-subtotal {
  color: var(--text);
  font-weight: 500;
}

.cart-item-savings {
  color: #bad89f;
}

.cart-quantity-controls {
  margin-top: 14px;
}

.cart-quantity-controls button {
  width: 42px;
  height: 42px;
}

.cart-quantity-controls input {
  width: 64px;
  height: 42px;
  font-size: 16px;
}

.cart-remove {
  min-height: 40px;
  margin-top: 3px;
  padding-block: 8px;
  font-size: 14px;
}

.cart-empty,
.cart-summary > p,
.cart-summary > .cart-secondary {
  font-size: 14px;
}

.cart-summary > div {
  gap: 20px;
  font-size: 16px;
}

.cart-summary > .button {
  min-height: 48px;
  font-size: 14px;
}

.cart-summary #cart-savings {
  color: #bad89f;
  font-size: 14px;
  line-height: 1.7;
}

.checkout-line-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--checkout-border);
}

.checkout-line-item:first-child {
  padding-top: 0;
}

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

.checkout-line-image {
  width: 56px;
  height: 70px;
  object-fit: cover;
  object-position: center;
  border-radius: 5px;
}

.checkout-line-copy {
  min-width: 0;
}

.checkout-line-copy h4 {
  margin: 0;
  color: var(--checkout-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.checkout-line-copy p,
.checkout-line-copy small,
.checkout-line-price {
  display: block;
  margin: 5px 0 0;
  color: var(--checkout-muted);
  font-size: 14px;
  line-height: 1.6;
}

.checkout-line-price {
  margin-top: 0;
  color: var(--checkout-text);
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.checkout-line-price strong {
  display: block;
  color: var(--checkout-text);
  font-size: 16px;
  font-weight: 500;
}

.checkout-order .checkout-line-item {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px 11px;
  padding-block: 15px;
}

.checkout-order .checkout-line-image {
  width: 40px;
  height: 50px;
}

.checkout-order .checkout-line-copy h4 {
  font-size: 14px;
}

.checkout-order .checkout-line-price {
  grid-column: 2;
  text-align: left;
}

.checkout-order :is(.checkout-line-copy p, .checkout-line-copy small, .checkout-line-price) {
  font-size: 14px;
}

html[data-theme="light"] .shop-section {
  --shop-panel: #fffefb;
  --shop-panel-soft: #f2f5ec;
  --shop-border: #5d784b30;
  --shop-copy: #5a6b50;
  --shop-accent: #4d782d;
}

html[data-theme="light"] .shop-product-body .resource-label {
  color: #ab450d;
}

html[data-theme="light"] .shop-product-card,
html[data-theme="light"] .shop-pricing-panel {
  box-shadow: 0 10px 30px #38551b06;
}

html[data-theme="light"] .shop-price-table tr.active,
html[data-theme="light"] .shop-price-table tr[data-current="true"],
html[data-theme="light"] .shop-price-table tr[aria-current="true"] {
  color: #a54310;
}

html[data-theme="light"] .cart-item-subtotal {
  color: #273920;
}

html[data-theme="light"] :is(.cart-item-savings, .cart-summary #cart-savings) {
  color: #4d782d;
}

@media (max-width: 1060px) {
  .shop-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-product-card {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  }

  .shop-product-body {
    padding: 34px;
  }

  .shop-product-body h3 {
    max-width: 380px;
    font-size: 36px;
  }

  .shop-pricing-panel {
    padding: 28px 34px;
  }

  .shop-price-table {
    table-layout: auto;
  }

  .shop-price-table :is(th, td):first-child {
    width: auto;
  }
}

@media (max-width: 620px) {
  .shop-section .section-intro h2 {
    font-size: 36px;
    line-height: 1.15;
  }

  .shop-section .store-intro {
    font-size: 15px;
    line-height: 1.8;
  }

  .shop-layout {
    gap: 22px;
  }

  .shop-product-card {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 14px;
  }

  .shop-product-photo {
    min-height: 0;
  }

  .shop-product-photo > img {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .shop-product-body {
    padding: 25px 23px 26px;
  }

  .shop-product-body h3 {
    font-size: 32px;
    line-height: 1.2;
  }

  .shop-live-price strong {
    font-size: 35px;
  }

  .shop-pricing-panel {
    padding: 25px 23px;
    border-radius: 14px;
  }

  .shop-pricing-panel > h3 {
    font-size: 25px;
  }

  .shop-price-table :is(th, td) {
    padding-block: 9px;
  }

  .shop-rules {
    grid-template-columns: minmax(0, 1fr);
    gap: 23px;
    margin-top: 30px;
    padding-top: 25px;
  }

  .shop-rules p {
    max-width: 470px;
  }

  .cart-item {
    gap: 14px;
  }

  .cart-item-image {
    flex-basis: 70px;
    width: 70px;
    height: 91px;
    border-radius: 6px;
  }

  .cart-item-details h3 {
    font-size: 17px;
    line-height: 1.4;
  }

  .cart-item-price,
  .cart-item-subtotal,
  .cart-item-savings {
    font-size: 14px;
  }

  .cart-quantity-controls button {
    width: 40px;
  }

  .cart-quantity-controls input {
    width: 56px;
  }

  .checkout-line-item {
    grid-template-columns: 47px minmax(0, 1fr);
    gap: 10px 13px;
  }

  .checkout-line-image {
    width: 47px;
    height: 59px;
  }

  .checkout-line-price {
    grid-column: 2;
    text-align: left;
  }
}
