:root {
  --text: #111;
  --muted: #6b7280;
  --thumb-bg: #faf7f2;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  padding-top: 60px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Promotional Banner */
.promo-banner {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  color: #ffffff;
  padding: 12px 16px;
  text-align: center;
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.promo-banner-highlight {
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

body.has-promo-banner {
  padding-top: 100px;
}

@media (max-width: 640px) {
  .promo-banner {
    top: 58px;
  }
  .promo-banner-content {
    font-size: 12px;
    flex-direction: column;
    gap: 4px;
  }

  .promo-banner-highlight {
    font-size: 12px;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 12px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo img {
  height: 32px;
  width: auto;
  display: block;
}

.left-nav {
  display: flex;
  align-items: left;
  gap: 8px;
  flex-wrap: wrap;
}

.right-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  transition: border-color .2s ease, transform .06s ease;
}

#header-login-btn {
  font-family: 'Arial', sans-serif;
  background: black;
  color: white;
  border: 2px solid black;
  border-radius: 20px;
  /* More rounded corners */
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 600;
  height: 40px;
  box-sizing: border-box;
  padding: 8px 12px;
}

#header-login-btn:hover {
  background: white;
  color: black;
}

#header-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  border-color: var(--text);
}

.btn:active {
  transform: translateY(1px);
}

/* Increase right padding for cart button */
#cart-btn {
  padding-right: 24px;
}

/* Profile dropdown */
.profile-dropdown-menu,
.cart-dropdown-menu {
  position: absolute;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  min-width: 180px;
  z-index: 1100;
}

.cart-dropdown-menu {
  padding: 8px;
  min-width: 280px;
}

.cart-dropdown-header {
  padding: 4px 6px 8px;
}

.cart-dropdown-title {
  margin: 0;
  font-size: 14px;
}

.cart-dropdown-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 4px;
}

.cart-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: center;
}

.cart-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f3f4f6;
  display: block;
}

.cart-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.cart-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-line-title {
  font-size: 13px;
  font-weight: 600;
}

.cart-line-sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-line-qty {
  font-size: 12px;
  color: var(--muted);
}

.cart-price {
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.cart-dropdown-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 8px;
  padding-top: 8px;
  display: grid;
  gap: 8px;
}

.cart-dropdown-total {
  font-weight: 600;
  font-size: 14px;
  text-align: right;
}

.original-price {
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 6px;
}

.discounted-price {
  font-weight: 700;
  color: #b91c1c;
}

.cart-payment {
  text-align: center;
}

.cart-payment img.payment-sprite {
  max-width: 250px;
  height: auto;
  opacity: 0.9;
}

.delivery-info {
  display: grid;
  gap: 2px;
  text-align: center;
}

.delivery-info small {
  color: var(--muted);
}

.cart-remove {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--muted);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.cart-remove:hover {
  background: #f5f5f7;
  color: #111;
}

.profile-dropdown-item {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  white-space: nowrap;
  font-weight: 500;
}

.profile-dropdown-item:hover {
  background: #f5f5f7;
}

/* Hero */
.hero {
  padding: 72px 24px 96px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 12px;
}

.hero p {
  margin: 0 auto 20px;
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.hero .actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Footer (minimal) */
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

/* Sections */
.section {
  padding: 16px 0 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 22px;
}

/* Carousel */
.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.carousel::-webkit-scrollbar {
  height: 8px;
}

.carousel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.product-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.product-meta {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* This should be in caps */
.product-title {
  font-size: 28px;
  font-weight: 600;
}

.product-card-title {
  font-size: 14px;
  font-weight: 600;
}

.product-price {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Featured and Explore sections on landing page: stack meta vertically so price is on a new line */
.hero~#featured .product-meta,
.hero~#explore .product-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}

/* Related section on product page should match featured layout */
#related .product-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}

/* Carousel controls */
.btn-icon {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  line-height: 1;
  font-size: 18px;
}

@media (max-width: 640px) {
  .product-card {
    flex-basis: 72%;
  }
  .product-card-title {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .carousel {
    padding: 4px 2px 4px;
  }
  .section-actions {
    margin-top: 4px;
  }
  .section .featured-section {
    padding-top: 0px;
  }
}


/* Product page related carousel - match index featured behavior with container queries */
#related .carousel {
  container-type: inline-size;
}
@container (max-width: 500px) {
  #related .product-card {
    flex-basis: 41%;
    
  }
}

/* Info section */
.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: center;
}

.info-text h1 {
  margin: 0 0 8px;
  font-size: 48px;
}

.info-text h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.info-items {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.info-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.info-item p {
  margin: 0;
  color: var(--muted);
}

.info-media {
  width: 75%;
}

.info-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.info-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Video variant for info media */
.info-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  padding: 0px 0 24px;
}

/* Featured sections: no padding */
.section.featured-section {
  padding: 0;
}

/* Two-image informative section */
.duo-header {
  text-align: left;
  /* Align with container width and left padding */
  max-width: 1200px;
  margin: 0 auto 12px;
  padding: 0 12px;
}

.duo-header h1 {
  margin: 0;
  font-size: 48px;
}

.duo-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: start;
}

.duo-photo-small {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.duo-caption {
  margin-top: 8px;
  font-weight: 600;
  font-size: 18px;
  font-style: italic;
}

.duo-photo-large {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, #e5e7eb 0%, #f9fafb 100%);
  overflow: hidden;
}

@media (max-width: 900px) {
  .duo-grid {
    grid-template-columns: 1fr;
  }
  .duo-right {
    display: none;
  }
  .duo-photo-small {
    cursor: pointer;
  }
  .duo-photo-small::after {
    content: 'Tap here';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffffff;
    font-family: 'Bradley Hand', 'Segoe Print', 'Marker Felt', 'Caveat', cursive;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    z-index: 3;
    pointer-events: none;
  }
}

/* Reviews */
.reviews-section {
  background: #f9f8f7;
  /* offwhite */
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .explore-page .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.products-grid .product-card {
  display: block;
  width: 100%;
}

.products-grid .product-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 14px;
  text-decoration: none;
}

.pagination .page-number.active {
  color: #000;
  cursor: default;
  pointer-events: none;
  font-weight: 600;
  text-decoration: underline;
  font-size: 16px;
}

.pagination .ellipsis {
  color: var(--muted);
  padding: 0 4px;
}

.review-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-stars {
  letter-spacing: 2px;
  font-size: 16px;
}

.review-text {
  margin: 0;
}

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

@media (max-width: 900px) {
  .reviews-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .reviews-grid .review-card {
    flex: 0 0 60%;
    max-width: 60%;
    scroll-snap-align: start;
  }
}

/* CTA Signup */
.cta-section {
  background: #f9f8f7;
  padding-top: 24px;
  margin-top: 24px;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cta-title {
  margin: 0;
  font-size: 22px;
}

.btn-primary {
  font-family: 'Arial', sans-serif;
  background: black;
  color: white;
  border: 2px solid black;
  border-radius: 20px;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  height: 40px;
  box-sizing: border-box;
}

.btn-primary:hover {
  background: white;
  color: black;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-reversed {
  font-family: 'Arial', sans-serif;
  background: white;
  color: black;
  border: 2px solid black;
  border-radius: 20px;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  height: 40px;
  box-sizing: border-box;
}

.btn-reversed:hover {
  background: black;
  color: white;
}

.btn-reversed:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  #learn-more .info-grid {
    justify-items: center;
    align-items: center;
    text-align: center;
  }
  #learn-more .info-media {
    margin: 0 auto;
  }
}

/* Secondary button (grey bg, white text) */
.btn-secondary {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: 12px;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-transform: uppercase;

  font-size: 12px;
  height: auto;
  line-height: 1.1;
  box-sizing: border-box;
}

.btn-secondary:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Section actions (centered) */
.section-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Explore actions: keep pagination centered with search aligned to the right */
.section-actions .explore-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.section-actions .explore-bar .explore-search {
  justify-self: end;
}

.section-actions .explore-bar .explore-filters {
  justify-self: start;
}

@media (max-width: 600px) {
  .explore-page .section-actions .explore-bar {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .explore-page .section-actions .explore-bar .explore-filters {
    grid-column: 1;
    justify-self: start;
  }
  .explore-page .section-actions .explore-bar .explore-search {
    grid-column: 2;
    justify-self: end;
  }
  .explore-page .section-actions .explore-bar .pagination {
    grid-column: 1 / -1;
    justify-self: center;
    gap: 6px;
  }
  .explore-page .section-actions .explore-bar .pagination .page-number {
    padding: 4px 8px;
    font-size: 13px;
  }
  .explore-page .section-actions .explore-bar .pagination .page-number.active {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .explore-page .section.featured-section .container > .section-actions:first-of-type .pagination {
    display: none;
  }
}

/* Gallery page: mirror explore mobile behavior */
@media (max-width: 600px) {
  .gallery-page .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gallery-page .section.featured-section .container > .section-actions:first-of-type .pagination {
    display: none;
  }
  .gallery-page .section-actions .pagination {
    gap: 6px;
  }
  .gallery-page .section-actions .pagination .page-number {
    padding: 4px 8px;
    font-size: 13px;
  }
  .gallery-page .section-actions .pagination .page-number.active {
    font-size: 14px;
  }
}

/* Settings page: mobile enhancements */
@media (max-width: 600px) {
  .settings-page .page-hero .container p {
    font-size: 13px;
  }
  /* Make settings forms take full width on small screens */
  .settings-page form {
    max-width: none !important;
    width: 100%;
  }
  .settings-page form input[type="email"],
  .settings-page form input[type="password"],
  .settings-page form input[type="text"] {
    width: 100%;
  }
  .settings-page form .btn-reversed,
  .settings-page form .btn-primary {
    width: 100%;
  }
  /* Buy credits buttons full-width */
  .settings-page .buy-credits-btn {
    width: 100%;
  }
  /* Slightly tighter padding on cards for small screens */
  .settings-page .section .container > div {
    padding: 12px !important;
  }
}

/* Featured page: mobile tuning */
@media (max-width: 600px) {
  .featured-page .carousel-controls {
    display: none;
  }
  .featured-page .product-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Ensure original and discounted prices stay on one row in gallery cards (mobile) */
@media (max-width: 600px) {
  .gallery-page .product-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  .gallery-page .product-price .price-original,
  .gallery-page .product-price .price-discounted {
    white-space: nowrap;
  }
}

/* Gallery mobile: place Settings button on its own bottom row */
@media (max-width: 600px) {
  .gallery-page .products-grid .product-meta .product-settings {
    position: static;
    align-self: stretch;
    width: 100%;
    margin-top: 6px;
    padding: 8px 16px;
    font-size: 12px;
    line-height: 1.1;
    border-radius: 12px;
    font-style: normal;
    text-transform: uppercase;
  }
}

.explore-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.explore-filters .btn-icon {
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.explore-filters .btn-icon:hover {
  transform: scale(1.08);
}

.explore-filters .btn-icon:active {
  transform: scale(0.98);
}

.explore-search .btn-icon {
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  color: #111;
}

.explore-search .btn-icon:hover {
  transform: scale(1.08);
}

.explore-search .btn-icon:active {
  transform: scale(0.98);
}

.explore-search .btn-icon svg {
  display: block;
}

.explore-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.explore-search input[type="search"] {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  min-width: 220px;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  min-width: 0;
  flex: 1 1 auto;
}

.explore-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

@media (max-width: 600px) {
  .explore-search input[type="search"] {
    min-width: 140px;
  }
}

/* Product card wrapper for overlay actions */
.product-card-wrapper {
  position: relative;
}

.products-grid .product-meta .product-settings {
  /* Put this button bottom right corner of its container (product-meta) */
  position: absolute;
  bottom: 8px;
  right: 10px;
  padding: 2px 6px;
  font-size: 11px;
  text-transform: none;
  font-style: italic;
  border-radius: 8px;
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

/* Modal (generic) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 560px;
  padding: 16px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  min-height: 160px;
}

/* Modal content layout */
.modal-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.modal-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-thumb {
  width: 96px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f3f4f6;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.modal-line {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Clamp long prompt text to 4 lines */
.line-clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

/* "Show more" toggle */
.prompt-toggle {
  background: transparent;
  border: none;
  color: inherit;
  font-style: italic;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.modal-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-danger {
  background: #b91c1c;
  color: #ffffff;
  border: 2px solid #b91c1c;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.modal-actions .btn-danger,
/* Product Header Row */
.product-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.product-header-row .product-title {
  margin: 0;
  line-height: 1.2;
}

.product-header-row .share-container {
  margin-bottom: 0;
  flex-shrink: 0;
}

.product-header-row .share-dropdown {
  right: 0;
  left: auto;
}

.modal-actions .privacy-icon-btn {
  line-height: 1;
}

.btn-danger:hover {
  background: #ffffff;
  color: #b91c1c;
}

/* Privacy icon toggle */
.privacy-icon-btn {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 12px;
  margin-bottom: 0px;
  font-weight: 700;
  font-size: 12px;
}

.privacy-icon-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.privacy-icon-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: currentColor;
}

.privacy-icon-btn svg .slash {
  display: none;
}

.privacy-icon-btn.private svg .slash {
  display: inline;
}

/* Spacing/typography for text inside the privacy button */
.privacy-icon-btn .privacy-button-text {
  margin-left: 6px;
  font-weight: 700;
  font-size: 12px;
}

/* Explore filters dropdown tweaks */
.explore-filters-menu .profile-dropdown-item.active {
  background: #f5f5f7;
  text-decoration: underline;
}


/* Product view */
.product-view-grid {
  display: grid;
  grid-template-columns: 88px 1fr 1fr;
  /* thumbs, media, details */
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.product-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.product-thumb-btn {
  display: block;
  padding: 0;
  background: var(--thumb-bg, #faf7f2);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.product-thumb-btn.active {
  border-color: #000000;
  opacity: 1;
}

.product-thumb-img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: contain;
  background: var(--thumb-bg, #faf7f2);
  border-radius: 8px;
  opacity: 0.65;
  /* slightly transparent by default */
  transition: opacity .2s ease;
}

.product-thumbs .product-thumb-btn:first-child .product-thumb-img {
  object-fit: cover;
}

.product-thumb-btn:hover .product-thumb-img,
.product-thumb-btn.active .product-thumb-img {
  opacity: 1;
}

.product-thumb-btn.is-loading .product-thumb-img {
  opacity: 0.86;
}

.product-view-media {
  position: relative;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(520px, 70vh);
  /* fixed container height while respecting viewport */
  overflow: hidden;
}

.product-view-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  /* do not exceed container height */
  width: auto;
  height: auto;
  object-fit: contain;
  /* fully show image */
  border-radius: 12px;
  visibility: hidden;
  /* hidden until loaded */
}

.product-view-image.is-visible {
  visibility: visible;
}

.product-view-image.is-hidden {
  display: none;
}

.product-view-details {
  display: flex;
  flex-direction: column;
  height: 520px;
  /* match .product-view-media */
  margin-right: 20%;
}

.product-title {
  margin: 0 0 8px 0;
}

.product-subtitle {
  font-size: 20px;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 8px;
}

.price-original {
  color: black;
  text-decoration: line-through;
}

.price-discounted {
  color: #b91c1c;
  font-weight: 700;
  margin-left: 8px;
}

.product-description {
  margin-bottom: 8px;
  margin-top: 8px;
}

.image-details {
  margin-top: 0px;
  font-style: italic;
  color: #666;
  font-size: 14px;
}

.image-details .image-prompt {
  display: block;
  max-height: 80px;
  overflow-y: auto;
}

.product-options {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  font-size: 14px;
}

.product-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-option-row select {
  margin-left: auto;
}

.select-right {
  text-align: right;
  text-align-last: right;
  width: 50%;
  font-size: 14px;
}

.product-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: auto;
  /* push to bottom of .product-view-details */
}

/* Make the add-to-cart button wide and centered */
#add-to-cart-btn {
  width: 100%;
  max-width: 360px;
  font-size: 16px;
  padding: 10px 16px;
}

@media (max-width: 900px) {
  .product-view-grid {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "thumbs media"
      "details details";
    gap: 12px;
    align-items: start;
    margin-top: 0px;
  }

  .product-thumbs { grid-area: thumbs;}
  .product-view-media { grid-area: media; }
  .product-view-media {
    height: min(282px, 70vh);
  }

  .product-view-details {
    grid-area: details;
    height: auto;
    /* let content flow on mobile */
    margin-right: 0;
  }

  .product-view-details p {
    margin-bottom: 0px;
    margin-top: 0px;
    font-size: 12px;
    column-count: 2px;
    align-items: baseline;
    justify-content: baseline;
  }

  .product-options {
    font-size: 16px;
  }

  .select-right {
    font-size: 16px;
  }

  .product-thumb-img {
    height: 64px;
  }

  /* Hide product back button on mobile (specific to history.back link) */
  main.section .container > a.btn[onclick*="history.back"] {
    display: none;
  }

  /* Force black text for product dropdowns on iOS Chrome/Safari */
  .product-view-details select,
  .product-view-details select option {
    color: #111 !important;
    -webkit-text-fill-color: #111;
    background-color: #fff;
  }
}

/* How it works section: center content and use media as background */
#how-it-works {
  position: relative;
  overflow: hidden;
}

#how-it-works .container {
  position: relative;
  z-index: 1;
}

#how-it-works .info-grid {
  grid-template-columns: 1fr;
  /* single column */
}

#how-it-works .info-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#how-it-works .info-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#how-it-works .info-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  /* subtle background */
  aspect-ratio: auto;
  /* override default */
}

/* Currency switcher */
.currency-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.currency-switcher .currency-option {
  padding: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.currency-switcher .currency-option.active {
  color: var(--text);
  text-decoration: underline;
}

.currency-switcher .separator {
  color: var(--muted);
  opacity: 0.6;
}

/* Header Mobile Responsiveness */
@media (max-width: 900px) {
  .left-nav .btn[href="/learn-more"],
  .left-nav .btn[href="/collaborate"] {
    display: none;
  }
}

@media (max-width: 600px) {
  
  .site-header .container {
    border-bottom: none;
  }

  .left-nav {
    gap: 4px;
  }

  .left-nav .btn[href="/featured"],
  .left-nav .btn[href="/explore"] {
    display: none;
  }

  .right-nav {
    gap: 4px;
  }

  .right-nav .currency-switcher {
    display: none;
  }

  #header-login-btn {
    padding: 6px 12px;
    font-size: 13px;
    height: 32px;
  }

  .logo img {
    height: 24px;
  }
}

/* Simple spinner overlay for product main image */
.product-view-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: transparent;
  z-index: 1;
}

.product-view-spinner::after {
  content: "";
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: #000000;
  border-radius: 50%;
  animation: pb-spin 0.9s linear infinite;
}

@keyframes pb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Try now section: place media behind text */
#try-now {
  position: relative;
  overflow: hidden;
}

#try-now .container.info-grid {
  position: relative;
  z-index: 1;
  min-height: 50vh;
}

#try-now .info-text {
  position: relative;
  z-index: 1;
}

#try-now .info-media {
  padding-top: 36px;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

#try-now .info-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#try-now .info-cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Private Badge */
.private-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Share Button */
.share-container {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #111;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: #f9fafb;
  border-color: #111;
  transform: scale(1.05);
}

.share-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 180px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideDown 0.2s ease-out;
}

.share-dropdown.hidden {
  display: none;
}

.share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.share-item:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.share-item img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Collaborate Page */
.collaborate-page {
  padding: 60px 0;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.collaborate-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.collaborate-content h1 {
  font-size: 32px;
  margin-bottom: 16px;
  font-weight: 700;
}

.collaborate-intro {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
}

.collaborate-form {
  text-align: left;
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.collaborate-form .form-group {
  margin-bottom: 20px;
}

.collaborate-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.collaborate-form .required {
  color: #e11d48;
}

.collaborate-form input,
.collaborate-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.2s;
}

.collaborate-form input:focus,
.collaborate-form textarea:focus {
  outline: none;
  border-color: #111;
}

.collaborate-submit {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s;
}

.collaborate-submit:hover {
  background: #333;
}

.collaborate-submit:disabled {
  background: #666;
  cursor: not-allowed;
}

.success-message {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 40px;
  margin-top: 20px;
}

.success-message h3 {
  color: #166534;
  margin-bottom: 8px;
}

.success-message p {
  color: #15803d;
}