* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  color: #2f241d;
  background: #f6f0e7;
}

.navbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1.25rem 5%;
  background: rgba(246, 240, 231, 0.94);
  box-shadow: 0 2px 18px rgba(47, 36, 29, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: #8c3b2a;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin-left: auto;
}

.auth-status {
  margin-left: 1.25rem;
  color: #5f5046;
  font-size: 0.95rem;
  white-space: nowrap;
}

.profile-menu {
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #5b4a3d;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #8c3b2a;
}

.nav-links a.active {
  color: #8c3b2a;
}

.profile-link {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 1.25rem;
  border-radius: 999px;
  color: #5b4a3d;
  border: 1px solid rgba(140, 59, 42, 0.2);
  background: #fcf7f0;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.profile-link:hover,
.profile-link.active {
  color: #8c3b2a;
  border-color: rgba(140, 59, 42, 0.45);
  box-shadow: 0 8px 22px rgba(47, 36, 29, 0.12);
}

.profile-link svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 10rem;
  padding: 0.5rem;
  border-radius: 16px;
  background: #fcf7f0;
  box-shadow: 0 16px 32px rgba(47, 36, 29, 0.12);
  border: 1px solid rgba(140, 59, 42, 0.18);
}

.profile-dropdown a {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  color: #5b4a3d;
  text-decoration: none;
  font-weight: 600;
}

.profile-dropdown a:hover {
  background: #f6f0e7;
  color: #8c3b2a;
}

.profile-menu:not(.profile-menu-signed-in) .profile-dropdown {
  display: none !important;
}

.hero {
  padding: 5rem 5% 4rem;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.page-hero {
  padding: 5rem 5% 3rem;
}

.page-hero-content {
  max-width: 760px;
}

.artist-page-header {
  max-width: 900px;
}

.artist-name-row {
  display: block;
  margin-bottom: 1rem;
  max-width: 100%;
}

.artist-name-row h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0;
}

.artist-page-favorite {
  flex: 0 0 auto;
}

.page-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.15rem;
  color: #5f5046;
}

.page-hero-shop {
  background: linear-gradient(180deg, #f6f0e7 0%, #efe3d3 100%);
}

.page-hero-artists {
  background: linear-gradient(180deg, #f6f0e7 0%, #f1e7db 100%);
}

.page-hero-art {
  background: linear-gradient(180deg, #f6f0e7 0%, #e8ddcf 55%, #efe3d3 100%);
}

.page-hero-about {
  background: linear-gradient(180deg, #f6f0e7 0%, #fcf7f0 100%);
}

.page-section {
  min-height: calc(100vh - 12rem);
}

.profile-section {
  background: #fcf7f0;
}

.signup-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(320px, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.auth-forms {
  display: grid;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f6f0e7;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(47, 36, 29, 0.08);
}

.profile-avatar {
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #8c3b2a;
  color: #fcf7f0;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.profile-email {
  color: #5f5046;
}

.signup-card {
  margin-bottom: 0;
}

.account-panel {
  justify-content: space-between;
  margin-top: -4.5rem;
  margin-bottom: 2rem;
}

.signup-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: #f6f0e7;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(47, 36, 29, 0.08);
}

.signup-field {
  display: grid;
  gap: 0.45rem;
  color: #5b4a3d;
  font-weight: 700;
}

.signup-field input,
.signup-field select {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(91, 74, 61, 0.22);
  border-radius: 16px;
  background: #fcf7f0;
  color: #2f241d;
  font: inherit;
}

.signup-field input:focus,
.signup-field select:focus {
  outline: 2px solid rgba(140, 59, 42, 0.24);
  outline-offset: 2px;
  border-color: #8c3b2a;
}

.signup-submit {
  border: 0;
  cursor: pointer;
}

.signup-note {
  color: #5f5046;
}

.auth-toggle {
  padding: 0;
  margin-left: 0.35rem;
  border: 0;
  background: transparent;
  color: #8c3b2a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-toggle:hover {
  text-decoration: underline;
}

.signup-helper {
  color: #5f5046;
  font-size: 0.95rem;
  margin-top: -0.25rem;
}

.signup-status {
  min-height: 1.5rem;
  font-weight: 700;
}

.signup-status-success {
  color: #2f6b45;
}

.signup-status-error {
  color: #8c3b2a;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.hero-content {
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.02;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #5f5046;
 }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #8c3b2a;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #8c3b2a;
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(140, 59, 42, 0.28);
}

.btn-secondary {
  background: transparent;
  color: #8c3b2a;
  border: 1px solid rgba(140, 59, 42, 0.35);
}

.btn-secondary:hover {
  box-shadow: 0 8px 22px rgba(47, 36, 29, 0.12);
 }

.hero-art {
  position: relative;
  width: min(420px, 100%);
  min-height: 460px;
}

.art-card {
  position: absolute;
  width: 220px;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(47, 36, 29, 0.18);
  border: 8px solid #fcf7f0;
}

.art-card span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.35rem 0.65rem;
  background: rgba(252, 247, 240, 0.92);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.art-card-one {
  top: 0;
  right: 2.5rem;
  background: linear-gradient(180deg, #d26a4d 0%, #f6c56f 100%);
}

.art-card-two {
  top: 7rem;
  left: 0;
  background: linear-gradient(180deg, #6f8f67 0%, #d8d1ab 100%);
}

.art-card-three {
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #243147 0%, #838fb5 100%);
}

.features,
.collection,
.artists,
.cta-section {
  padding: 5rem 5%;
}

.features {
  background: #fcf7f0;
}

.features h2,
.section-heading h2,
.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.collection .section-heading {
  max-width: none;
}

.collection .section-heading h2 {
  max-width: 820px;
}

.collection-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 1rem;
  align-items: end;
  margin-top: 1.5rem;
  max-width: 1120px;
}

.filter-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.filter-group-search {
  grid-column: auto;
}

.search-label {
  display: block;
  margin-bottom: 0.5rem;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5b4a3d;
  text-align: left;
}

.search-input {
  width: 100%;
  min-height: 3.95rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(91, 74, 61, 0.22);
  border-radius: 999px;
  background: #fcf7f0;
  color: #2f241d;
  font: inherit;
}

.search-input:focus {
  outline: 2px solid rgba(140, 59, 42, 0.24);
  outline-offset: 2px;
  border-color: #8c3b2a;
}

.filter-select {
  width: 100%;
  min-height: 3.95rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(91, 74, 61, 0.22);
  border-radius: 999px;
  background: #fcf7f0;
  color: #2f241d;
  font: inherit;
}

.filter-select:focus {
  outline: 2px solid rgba(140, 59, 42, 0.24);
  outline-offset: 2px;
  border-color: #8c3b2a;
}

.filter-actions {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  padding-left: 1.4rem;
  padding-bottom: 1.1rem;
}

.filter-reset {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.filter-reset:hover {
  transform: none;
  box-shadow: none;
  text-decoration: underline;
}

.search-results-count {
  margin-top: 0.75rem;
  padding-left: 1.4rem;
  color: #5f5046;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: #f6f0e7;
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(47, 36, 29, 0.06);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 1rem;
  color: #8c3b2a;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: #5f5046;
}

.collection {
  background: #efe3d3;
}

.collection-grid,
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.collection-card,
.artist-card {
  background: #fcf7f0;
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 10px 28px rgba(47, 36, 29, 0.08);
}

.collection-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(47, 36, 29, 0.12);
}

.collection-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.collection-card-link:focus-visible {
  outline: 2px solid rgba(140, 59, 42, 0.4);
  outline-offset: 6px;
  border-radius: 18px;
}

.artwork-card {
  position: relative;
  padding-top: 3.5rem;
}

.artist-card {
  position: relative;
  padding-top: 3.5rem;
}

.artist-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.artist-card-link:focus-visible {
  outline: 2px solid rgba(140, 59, 42, 0.4);
  outline-offset: 6px;
  border-radius: 12px;
}

.favorite-star {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(140, 59, 42, 0.2);
  border-radius: 999px;
  background: #f6f0e7;
  color: #b7aa97;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.favorite-star:hover {
  transform: translateY(-1px);
  border-color: rgba(140, 59, 42, 0.45);
  box-shadow: 0 8px 22px rgba(47, 36, 29, 0.12);
}

.favorite-star-active {
  color: #d4a017;
  border-color: rgba(212, 160, 23, 0.5);
}

.artist-page-header .artist-page-favorite {
  position: static !important;
  top: auto !important;
  right: auto !important;
  display: inline-flex !important;
  vertical-align: middle;
  margin-top: 0.15rem;
}

.collection-art {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.sunrise {
  background: linear-gradient(180deg, #bf5438 0%, #f0b55e 100%);
}

.meadow {
  background: linear-gradient(180deg, #71885d 0%, #d7cca0 100%);
}

.moon {
  background: linear-gradient(180deg, #26314e 0%, #949ec1 100%);
}

.artwork-skyline {
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 219, 170, 0.9) 0 10%, transparent 11%),
    linear-gradient(180deg, #3c5d82 0%, #6f7d86 38%, #9e6d55 38%, #644635 100%);
}

.artwork-terracotta {
  background:
    linear-gradient(90deg, rgba(91, 55, 42, 0.3) 0 18%, transparent 18% 100%),
    linear-gradient(180deg, #cf7a49 0%, #b6543d 48%, #6e4133 100%);
}

.artwork-fern {
  background:
    radial-gradient(circle at 28% 68%, rgba(247, 238, 221, 0.9) 0 12%, transparent 13%),
    linear-gradient(180deg, #95a77c 0%, #6d805d 45%, #d4cab0 45%, #ede4d6 100%);
}

.artwork-sage {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0 30%, transparent 30% 100%),
    linear-gradient(180deg, #b8c2a5 0%, #8ea27e 42%, #d8cfb8 100%);
}

.artwork-midnight {
  background:
    radial-gradient(circle at 50% 40%, rgba(15, 17, 31, 0.9) 0 18%, transparent 19%),
    linear-gradient(180deg, #4a5676 0%, #21283e 52%, #121723 100%);
}

.artwork-blush {
  background:
    linear-gradient(135deg, rgba(88, 60, 65, 0.28) 0 22%, transparent 22% 100%),
    linear-gradient(180deg, #d4b1ab 0%, #c88c8c 40%, #756276 100%);
}

.collection-card h3,
.artist-card h3 {
  margin-bottom: 0.5rem;
}

.detail-actions {
  margin-top: 2rem;
}

.detail-summary {
  background: #fcf7f0;
}

.detail-overview {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(320px, 1fr);
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.detail-cover-art {
  min-height: 460px;
  margin-bottom: 0;
  box-shadow: 0 18px 40px rgba(47, 36, 29, 0.14);
}

.detail-copy h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}

.detail-copy p {
  color: #5f5046;
}

.detail-meta {
  margin-top: 1.25rem;
}

.purchase-section {
  background: #fcf7f0;
}

.purchase-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(320px, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.purchase-card {
  background: #f6f0e7;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 28px rgba(47, 36, 29, 0.08);
}

.purchase-summary-card {
  display: grid;
  gap: 1rem;
}

.purchase-art {
  min-height: 360px;
  margin-bottom: 0;
}

.purchase-breakdown {
  display: grid;
  gap: 0.75rem;
}

.purchase-breakdown div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(91, 74, 61, 0.15);
}

.purchase-breakdown span {
  color: #5f5046;
}

.purchase-form {
  background: #f6f0e7;
}

.detail-months .section-heading {
  max-width: 820px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.month-card {
  background: #fcf7f0;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(47, 36, 29, 0.08);
}

.month-art {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.month-card h3 {
  margin-bottom: 0.35rem;
}

.month-card p {
  color: #5f5046;
}

.collection-card p,
.artist-card p,
.cta-section p {
  color: #5f5046;
}

.collection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
  list-style: none;
}

.collection-meta li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #efe3d3;
  color: #5b4a3d;
  font-size: 0.9rem;
}

.collection-card span {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: #8c3b2a;
}

.no-results {
  margin-top: 2rem;
  color: #5f5046;
}

.cta-section {
  text-align: center;
  background: #2f241d;
  color: #fcf7f0;
}

.cta-section p {
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(252, 247, 240, 0.78);
}

footer {
  padding: 2rem 5%;
  text-align: center;
  background: #221914;
  color: rgba(252, 247, 240, 0.78);
}

.footer-brand {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fcf7f0;
}

footer p + p {
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-links {
    margin-left: 0;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .auth-status {
    order: 3;
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .profile-menu {
    margin-left: auto;
  }

  .profile-link {
    margin-left: 0;
  }

  .collection-filters {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    width: 100%;
  }

  .filter-reset {
    width: 100%;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    text-align: center;
  }

  .hero-art {
    min-height: 360px;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .signup-layout {
    grid-template-columns: 1fr;
  }

  .account-panel {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0;
  }

  .detail-overview {
    grid-template-columns: 1fr;
  }

  .purchase-layout {
    grid-template-columns: 1fr;
  }

  .detail-cover-art {
    min-height: 360px;
  }

  .art-card {
    width: 170px;
    border-width: 6px;
  }

  .art-card-one {
    right: 1rem;
  }

  .art-card-two {
    top: 5rem;
  }

  .art-card-three {
    bottom: 0.5rem;
  }
}
