/* Layout; colours and fonts come from brand.css. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--brand);
  font-family: var(--heading);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-hover);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 32px;
  }
}

.button {
  display: inline-block;
  padding: 15px 30px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  font: 400 15px var(--heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--on-brand);
}

.button:disabled {
  border-color: var(--line);
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.button.light {
  border-color: var(--on-brand);
  background: var(--on-brand);
  color: var(--brand);
}

.button.light:hover {
  background: var(--on-brand-muted);
  border-color: var(--on-brand-muted);
}

.button.outline {
  border-color: var(--on-brand-muted);
  background: transparent;
  color: var(--on-brand);
}

.button.outline:hover {
  background: rgb(255 255 255 / 0.1);
}

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-decoration: none;
}

/* Masthead */

.masthead {
  background: var(--brand);
  color: var(--on-brand);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

@media (min-width: 768px) {
  .header-row {
    padding-top: 28px;
    padding-bottom: 30px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--on-brand);
  text-decoration: none;
}

.brand:hover {
  color: var(--on-brand);
}

.brand picture {
  flex: none;
}

.brand-mark {
  width: auto;
  max-width: none;
  height: 60px;
  filter: brightness(0) invert(1);
}

@media (min-width: 768px) {
  .brand {
    gap: 18px;
  }
  .brand-mark {
    height: 84px;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--heading);
}

.brand-name {
  font-size: 26px;
  letter-spacing: 0.1em;
  line-height: 1.1;
}

.brand-tagline {
  color: var(--on-brand-muted);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .brand-name {
    font-size: 40px;
    letter-spacing: 0.12em;
  }
  .brand-tagline {
    font-size: 18px;
    letter-spacing: 0.24em;
  }
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  font-family: var(--heading);
  font-size: 16px;
  letter-spacing: 0.1em;
}

.main-nav a {
  color: var(--on-brand);
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--on-brand-muted);
}

.main-nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.main-nav .lang {
  color: var(--on-brand-muted);
}

.currency select {
  height: 38px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--on-brand-line);
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 12px;
  color: var(--on-brand);
  font: 400 14px var(--heading);
  letter-spacing: 0.06em;
  appearance: none;
  cursor: pointer;
}

.currency select:disabled {
  opacity: 0.6;
  cursor: default;
}

.currency option {
  color: var(--text);
}

.basket-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--on-brand-line);
}

/* Home: opening section */

.hero {
  background: var(--brand);
  color: var(--on-brand);
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 40px 56px;
  padding-bottom: 56px;
}

@media (min-width: 768px) {
  .hero-row {
    padding-bottom: 72px;
  }
}

.hero-text {
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

@media (min-width: 900px) {
  .hero-text {
    padding-bottom: 56px;
  }
}

.eyebrow {
  color: var(--on-brand-muted);
  font: 400 15px var(--heading);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--on-brand);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 44px;
  }
}

.lead {
  max-width: 520px;
  color: var(--on-brand-soft);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 8px;
}

.carousel {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 12px;
  max-width: 540px;
  min-width: 0;
}

.slide {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--on-brand);
  text-decoration: none;
}

.slide:hover {
  color: var(--on-brand);
}

.slide-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slide-track.instant {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .slide-track {
    transition: none;
  }
}

.slide-photo {
  display: block;
  flex: 0 0 100%;
}

.slide img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.slide-tag {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--brand-scrim);
  font-family: var(--heading);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.slide:hover .slide-tag,
.slide:focus-visible .slide-tag {
  opacity: 1;
}

@media (hover: none) {
  .slide-tag {
    opacity: 1;
  }
}

.slide-category {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.slide-title {
  font-size: 22px;
  font-weight: 300;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.dots button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dots span {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--on-brand);
  border-radius: 50%;
}

.dots button[aria-current] span {
  background: var(--on-brand);
}

/* Products */

.category-tabs {
  border-bottom: 1px solid var(--line);
}

.category-tabs .wrap {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 0 8px;
  font-family: var(--heading);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.category-tabs a {
  flex: none;
  padding: 18px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

@media (min-width: 900px) {
  .category-tabs .wrap {
    justify-content: center;
  }
}

.category-tabs a:hover {
  color: var(--brand);
}

.category-tabs a[aria-current] {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.products {
  padding-top: 48px;
  padding-bottom: 24px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 48px 32px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.product-card:hover .product-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-image {
  display: block;
  margin-bottom: 8px;
  background: var(--wash);
}

.product-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-title {
  color: var(--brand);
  font-family: var(--heading);
  font-size: 18px;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.sold-out {
  color: var(--bad);
  font-size: 14px;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 64px;
  padding-top: 36px;
  padding-bottom: 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.highlights h2 {
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: 0;
}

/* Product page */

.product-page {
  padding-top: 32px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 1024px) {
  .product {
    flex-direction: row;
    gap: 56px;
  }
  .product > * {
    flex: 0 0 calc(50% - 28px);
  }
}

.gallery-main {
  margin: 0;
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}

.gallery-thumbs button {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  background: none;
  cursor: pointer;
}

.gallery-thumbs button:hover,
.gallery-thumbs button[aria-current] {
  border-color: var(--brand);
}

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

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-info h1 {
  font-size: 34px;
}

.product-info .product-price {
  font-size: 22px;
}

.stock-badge {
  display: inline-block;
  padding: 2px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.stock-badge.out {
  border-color: var(--bad);
  color: var(--bad);
}

.add-to-basket {
  width: 100%;
}

.availability {
  color: var(--muted);
  font-style: italic;
}

.availability:empty {
  display: none;
}

.availability.out {
  color: var(--bad);
  font-style: normal;
}

.basket-hint:empty {
  display: none;
}

.basket-hint {
  margin-top: -8px;
  color: var(--bad);
  font-size: 15px;
}

.size-picker {
  position: relative;
}

.size-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font: 400 16px var(--heading);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.size-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.size-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 32px var(--brand-shadow);
}

.size-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.size-tabs button {
  margin-bottom: -1px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  background: none;
  color: var(--muted);
  font: 400 13px var(--heading);
  letter-spacing: 0.15em;
  cursor: pointer;
}

.size-tabs button[aria-selected="true"] {
  border-color: var(--line);
  border-bottom-color: #fff;
  color: var(--brand);
}

.size-system {
  margin-bottom: 8px;
  color: var(--muted);
  font: 400 13px var(--heading);
  letter-spacing: 0.2em;
}

.size-tags {
  display: grid;
  grid-template-columns: repeat(auto-fill, 52px);
  gap: 6px;
}

.size-tags button {
  width: 52px;
  height: 36px;
  padding: 0;
  text-align: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: 400 15px var(--body);
  cursor: pointer;
}

.size-tags button:hover {
  border-color: var(--brand);
}

.size-tags.wide {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.size-tags.wide button {
  width: auto;
}

.size-tags.wide:has(img:not([hidden])) {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.size-tags button:has(img:not([hidden])) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: auto;
  padding: 5px 5px 8px;
  font-size: 14px;
  line-height: 1.25;
}

.size-tags button img:not([hidden]) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.variant-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.size-tags button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.size-tags button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

.size-help {
  font-size: 14px;
}

.product-details {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.product-details h2 {
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-details p + p {
  margin-top: 1em;
}

/* Pages */

.page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 40px 16px 0;
}

@media (min-width: 640px) {
  .page {
    padding: 48px 32px 0;
  }
}

.page > h1 {
  margin-bottom: 2rem;
  font-size: 36px;
}

.prose {
  font-size: 17px;
  line-height: 1.8;
}

.prose > * + * {
  margin-top: 1.4rem;
}

.prose h2 {
  margin-top: 2.2rem;
  font-size: 24px;
}

.prose h3 {
  margin-top: 1.6rem;
  font-size: 20px;
}

.prose ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.prose ol {
  padding-left: 1.5rem;
}

@media (min-width: 768px) {
  .prose > picture,
  .prose > img,
  .prose > p:has(> img:only-child) {
    float: right;
    max-width: 300px;
    margin: 0 0 1rem 1.5rem;
  }
}

.prose::after {
  content: "";
  display: block;
  clear: both;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

/* Contact */

.contact-form {
  display: grid;
  gap: 16px;
  max-width: 36rem;
  margin-top: 2rem;
}

.contact-form label {
  display: grid;
  gap: 4px;
}

.contact-form span {
  color: var(--brand);
  font-family: var(--heading);
  letter-spacing: 0.04em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font: inherit;
  line-height: 1.5;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.contact-form .button {
  justify-self: start;
}

/* Basket */

.basket-items li {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.basket-items img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.basket-items a {
  font-family: var(--heading);
  font-size: 18px;
  text-decoration: none;
}

.basket-items input {
  width: 4rem;
  padding: 6px;
  border: 1px solid var(--line);
  font: inherit;
}

.line-size,
.line-note {
  color: var(--muted);
  font-size: 14px;
}

.line-note {
  font-style: italic;
}

.line-note.problem {
  color: var(--bad);
  font-style: normal;
}

.basket-items .remove {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.basket-summary {
  display: grid;
  justify-items: end;
  gap: 8px;
  margin-top: 24px;
  text-align: right;
}

.deliver-to select {
  padding: 6px 8px;
  border: 1px solid var(--line);
  font: inherit;
}

.basket-summary .note {
  max-width: 28rem;
}

.basket-total {
  font-size: 20px;
}

.basket-message:empty {
  display: none;
}

.basket-message {
  color: var(--bad);
}

/* Footer */

.site-footer {
  margin-top: 80px;
  background: var(--brand);
  color: var(--on-brand-soft);
  font-size: 15px;
  line-height: 1.9;
}

.site-footer a {
  color: var(--on-brand-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--on-brand);
  text-decoration: underline;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-title {
  margin-bottom: 8px;
  color: var(--on-brand);
  font-family: var(--heading);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.footer-heading {
  padding-bottom: 6px;
  color: var(--on-brand);
  font-family: var(--heading);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--brand-rule);
  font-size: 14px;
}

.contact-form .trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
