* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #f8f8f5;
  color: #000;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

.app-page {
  display: none;
}

.app-page.active-page {
  display: flex;
}

.hidden {
  display: none !important;
}

/* TOP NAV */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 42px;
  background: #f8f8f5;
  z-index: 100;
}

.top-bar a {
  color: #000;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.top-bar a:hover {
  opacity: 0.55;
}

#cart-count {
  display: inline-block;
  margin-left: 4px;
  min-width: 18px;
  color: #000;
}

/* BACK BUTTON */

.top-left-back {
  position: fixed;
  top: 0;
  left: 42px;
  height: 82px;
  display: none;
  align-items: center;
  color: #000;
  text-decoration: none;
  font-size: 34px;
  font-weight: 300;
  z-index: 200;
  line-height: 1;
}

.top-left-back.visible {
  display: flex;
}

.top-left-back:hover {
  opacity: 0.55;
}

/* HOME */

.home-page {
  width: 100vw;
  height: 100vh;
  padding: 82px 32px 0;
  align-items: center;
  justify-content: center;
}

.logo-text {
  margin: 0;
  white-space: nowrap;
  color: #000;
  font-size: clamp(34px, 8.8vw, 145px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.06em;
  transform: scaleY(1.45) skewX(-7deg);
  text-align: center;
  line-height: 0.85;
}

/* NEWSLETTER */

.newsletter-page-simple {
  width: 100vw;
  min-height: 100vh;
  padding: 118px 64px 100px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.newsletter-login-button {
  position: fixed;
  top: 0;
  right: 42px;
  height: 82px;
  border: none;
  background: transparent;
  color: #000;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 260;
}

.newsletter-login-button:hover {
  color: #d10000;
  text-decoration: underline;
}

.newsletter-header h1 {
  margin: 0 0 44px;
  font-size: clamp(42px, 8vw, 120px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.07em;
  transform: scaleY(1.25) skewX(-7deg);
  text-transform: uppercase;
  line-height: 0.85;
  text-align: center;
}

.newsletter-status {
  width: min(920px, 88vw);
  min-height: 18px;
  margin-bottom: 22px;
  text-align: center;
  font-size: 13px;
}

.newsletter-status.error-message {
  color: #d10000;
}

.newsletter-control-bar {
  position: relative;
  width: min(1120px, 92vw);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 38px;
  padding: 0;
  border: none;
}

.newsletter-sort {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.newsletter-categories {
  width: min(920px, 78vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}

.category-filter,
.sort-button {
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.category-filter {
  color: #d10000;
  font-size: clamp(11px, 1.25vw, 16px);
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-decoration: none;
}

.sort-button {
  color: #000;
  font-size: 13px;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.category-filter:hover,
.sort-button:hover,
.category-filter.active,
.sort-button.active {
  opacity: 0.55;
  text-decoration: none;
}

.newsletter-article-list {
  width: min(920px, 88vw);
  padding-bottom: 0;
}

.newsletter-article-card {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: center;
  color: #000;
  padding: 42px 0;
  border-bottom: 1px solid #d4d4cc;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.newsletter-article-card:first-child {
  border-top: 1px solid #d4d4cc;
}

.newsletter-article-card:hover {
  opacity: 0.72;
}

.article-thumbnail {
  width: 330px;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #e5e5df;
}

.article-info {
  text-align: left;
}

.article-author-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.article-author-image {
  width: 76px;
  height: 76px;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #e5e5df;
}

.article-author {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-date {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  opacity: 0.65;
}

.article-info h2 {
  margin: 0 0 18px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  line-height: 0.95;
}

.article-category {
  margin: 0 0 8px;
  color: #d10000;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.article-views {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.55;
}

/* MEMBER / ADMIN */

.newsletter-member-panel,
.admin-panel {
  width: min(920px, 88vw);
  margin-bottom: 42px;
  border: 1px solid #d4d4cc;
  padding: 28px;
}

.newsletter-member-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
}

.newsletter-member-left {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.admin-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}

.admin-section h2,
.publish-article-form h2,
.saved-articles-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-row {
  border-top: 1px solid #d4d4cc;
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.admin-row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-row-meta {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.7;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-action-button {
  border: 1px solid #000;
  background: transparent;
  color: #000;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

.admin-action-button.primary {
  background: #000;
  color: #f8f8f5;
}

.admin-action-button.danger {
  border-color: #d10000;
  color: #d10000;
}

/* PRODUCT LIST */

.listing-page {
  width: 100vw;
  min-height: 100vh;
  padding: 82px 32px 32px;
  align-items: center;
  justify-content: center;
}

.two-product-grid {
  width: min(980px, 92vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
  justify-items: center;
}

.listing-item {
  color: #000;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.25s ease;
}

.listing-item:hover {
  opacity: 0.72;
}

.listing-item img {
  width: min(32vw, 340px);
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 24px;
}

.listing-item h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* PRODUCT PAGE */

.single-product-page {
  width: 100vw;
  min-height: 100vh;
  padding: 82px 32px 32px;
  align-items: center;
  justify-content: center;
}

.single-product-display {
  position: relative;
  text-align: center;
  transform: translateY(-6px);
}

.product-image-window {
  width: min(38vw, 430px);
  max-height: 54vh;
  margin: 0 auto 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-product-image {
  width: 100%;
  height: auto;
  max-height: 54vh;
  display: block;
  object-fit: contain;
  transform: translateX(0);
  transition: transform 0.28s ease;
}

.single-product-display h1 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.single-product-display p {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 900;
}

.image-arrow {
  position: absolute;
  top: 37%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #000;
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
}

.left-image-arrow {
  left: -78px;
}

.right-image-arrow {
  right: -78px;
}

.plus-button {
  border: none;
  background: transparent;
  color: #000;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.size-panel {
  display: none;
  margin-top: 14px;
}

.size-panel.open {
  display: block;
}

.size-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 16px;
}

.size-button {
  border: none;
  background: transparent;
  color: #000;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  opacity: 0.55;
}

.size-button:hover,
.size-button.selected-size {
  opacity: 1;
}

.add-to-cart-button {
  display: none;
  border: none;
  background: transparent;
  color: #000;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.add-to-cart-button.visible {
  display: inline-block;
}

.added-message {
  display: block;
  margin-top: 12px;
  font-size: 12px !important;
  font-weight: 400 !important;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.added-message.visible {
  opacity: 0.65;
}

/* CART */

.cart-page {
  width: 100vw;
  min-height: 100vh;
  padding: 120px 64px 48px;
  align-items: center;
  justify-content: center;
}

.cart-layout {
  width: min(1180px, 92vw);
  min-height: calc(100vh - 168px);
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 54px;
}

.cart-left {
  padding-right: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 52px;
  align-items: center;
  margin-bottom: 42px;
  width: 100%;
}

.cart-item-image-link {
  display: block;
  width: 240px;
  color: #000;
  text-decoration: none;
}

.cart-item-image {
  width: 240px;
  height: auto;
  object-fit: contain;
  display: block;
}

.cart-item-details {
  text-align: left;
  display: grid;
  grid-template-columns: 120px 100px 90px 95px;
  column-gap: 28px;
  row-gap: 8px;
  align-items: center;
}

.cart-item-name-link {
  color: #000;
  text-decoration: none;
}

.cart-item-name {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-item-line {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quantity-button {
  border: none;
  background: transparent;
  color: #000;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  padding: 0;
}

.quantity-number {
  font-size: 14px;
  font-weight: 900;
  min-width: 18px;
  text-align: center;
}

.cart-summary {
  align-self: end;
  text-align: right;
  width: 100%;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 14px;
  font-size: 14px;
  text-transform: uppercase;
}

.total-row {
  margin-top: 22px;
  font-weight: 900;
}

.checkout-button,
.clear-cart-button {
  width: 100%;
  margin-top: 18px;
  padding: 14px 0;
  border: 1px solid #000;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.checkout-button {
  background: #000;
  color: #fff;
}

.clear-cart-button {
  background: transparent;
  color: #000;
}

/* ARTICLE PAGE */

.article-page {
  width: min(720px, 88vw);
  margin: 0 auto;
  padding: 150px 0 100px;
  color: #000;
  flex-direction: column;
}

.article-hero {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #e5e5df;
  margin-bottom: 42px;
}

.article-page .article-meta {
  margin-bottom: 28px;
}

.article-title {
  margin: 0 0 36px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  line-height: 0.95;
}

.article-body {
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.article-body p {
  margin: 0 0 22px;
}

.article-list {
  margin: 0 0 22px;
  padding-left: 1.4em;
}

.article-list li {
  margin-bottom: 16px;
}

.article-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: 48px;
}

.save-article-button {
  border: 1px solid #000;
  background: #000;
  color: #f8f8f5;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.save-article-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.article-back-link {
  color: #000;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

/* COMMENTS */

.comments-section {
  margin-top: 64px;
  border-top: 1px solid #d4d4cc;
  padding-top: 28px;
}

.comments-section h2 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.comments-list {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.comment-card {
  border-bottom: 1px solid #ecece6;
  padding-bottom: 18px;
}

.comment-meta {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.comment-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.comment-form {
  display: grid;
  gap: 12px;
}

.comment-input {
  width: 100%;
  border: 1px solid #d4d4cc;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
}

/* MODALS / FORMS */

.auth-modal,
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-modal-backdrop,
.checkout-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.auth-modal-panel,
.checkout-modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #f8f8f5;
  padding: 28px 24px 32px;
  border: 1px solid #d4d4cc;
}

.checkout-modal-panel {
  width: min(560px, 100%);
}

.auth-modal-panel h2,
.checkout-modal-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-modal-close,
.checkout-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.oauth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.oauth-button {
  border: 1px solid #000;
  background: transparent;
  color: #000;
  padding: 12px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-divider {
  text-align: center;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.6;
}

.account-status {
  margin: 0 0 24px;
  font-size: 14px;
  text-align: center;
}

.account-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
}

.account-panel.logged-in-panel {
  grid-template-columns: 1fr;
}

.account-form,
.publish-article-form {
  border-top: 1px solid #d4d4cc;
  padding-top: 28px;
}

.account-form h2,
.publish-article-form h2,
.saved-articles-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-field span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid #d4d4cc;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
}

.form-hint,
.form-message {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
}

.form-message.error-message,
.error-message {
  color: #d10000;
}

.form-submit-button {
  border: 1px solid #000;
  background: #000;
  color: #f8f8f5;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.secondary-button {
  background: transparent;
  color: #000;
  margin-top: 18px;
}

.account-user-card,
.newsletter-profile-card {
  border-top: 1px solid #d4d4cc;
  padding-top: 28px;
}

.account-user-row,
.newsletter-profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-user-row img,
.newsletter-profile-card img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  background: #e5e5df;
}

.account-user-placeholder {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #f8f8f5;
  font-size: 28px;
  font-weight: 900;
}

.account-user-placeholder.small {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.account-user-name,
.account-user-email,
.account-user-status {
  margin: 0 0 6px;
}

.account-user-name {
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-user-status.verified {
  color: #1a7f37;
}

.account-user-status.unverified {
  color: #d10000;
}

.saved-articles-panel {
  border-top: 1px solid #d4d4cc;
  padding-top: 28px;
}

.saved-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-article-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #ecece6;
  padding-bottom: 12px;
}

.saved-article-row a {
  color: #000;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.unsave-article-button {
  border: none;
  background: transparent;
  color: #d10000;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

#checkout-embedded {
  min-height: 420px;
}

/* MOBILE */

@media (max-width: 800px) {
  .top-bar {
    height: 68px;
    gap: 18px;
    padding: 0 14px;
  }

  .top-bar a {
    font-size: 10px;
    white-space: nowrap;
  }

  .top-left-back {
    left: 16px;
    height: 68px;
    font-size: 30px;
  }

  .home-page {
    height: auto;
    min-height: 100vh;
    padding: 68px 18px 0;
  }

  .logo-text {
    width: min-content;
    white-space: normal;
    font-size: clamp(58px, 18vw, 92px);
    line-height: 0.78;
  }

  .newsletter-page-simple {
    padding: 100px 24px 70px;
  }

  .newsletter-login-button {
    right: 18px;
    height: 68px;
    font-size: 10px;
  }

  .newsletter-header h1 {
    font-size: clamp(42px, 15vw, 78px);
  }

  .newsletter-control-bar {
    width: 100%;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 18px;
  }

  .newsletter-sort {
    position: static;
  }

  .newsletter-categories {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px;
  }

  .newsletter-article-list,
  .newsletter-member-panel,
  .admin-panel {
    width: 100%;
  }

  .newsletter-member-panel {
    grid-template-columns: 1fr;
  }

  .newsletter-article-card {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 0;
  }

  .article-thumbnail {
    width: 100%;
  }

  .article-info h2 {
    font-size: clamp(25px, 9vw, 38px);
  }

  .listing-page {
    padding: 100px 24px 60px;
    align-items: flex-start;
  }

  .two-product-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .listing-item img {
    width: min(78vw, 330px);
  }

  .single-product-page {
    padding: 96px 24px 56px;
    align-items: flex-start;
  }

  .single-product-display {
    width: 100%;
    transform: none;
    margin-top: 20px;
  }

  .product-image-window {
    width: min(76vw, 360px);
  }

  .left-image-arrow {
    left: 0;
  }

  .right-image-arrow {
    right: 0;
  }

  .cart-page {
    display: none;
    padding: 100px 22px 50px;
  }

  .cart-page.active-page {
    display: block;
  }

  .cart-layout {
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .cart-item {
    grid-template-columns: 130px 1fr;
    gap: 22px;
  }

  .cart-item-image-link,
  .cart-item-image {
    width: 130px;
  }

  .cart-item-details {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    text-align: left;
  }

  .article-page {
    width: 100%;
    padding: 110px 24px 70px;
  }

  .account-panel,
  .oauth-buttons {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}