/* -----------------------------------
   SHARED WEBSITE STYLES
   These rules can be used on every page.
----------------------------------- */

:root {
  --color-background: #fafaf9;
  --color-text: #1c1917;
  --color-text-light: #f5f5f4;
  --color-muted: #78716c;
  --color-border: #e7e5e4;
  --color-dark: #1c1917;
  --page-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
}

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

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

.page-width {
  width: min(100% - 48px, var(--page-width));
  margin-inline: auto;
}

.announcement-bar {
  background-color: var(--color-dark);
  color: var(--color-text-light);
}

.announcement-bar p {
  margin: 0;
}

.site-header {
  position: relative;
  z-index: 50;
  background-color: var(--color-background);
  border-color: var(--color-border);
}

.main-navigation {
  position: relative;
}

.mobile-navigation {
  display: none;
}

.mobile-navigation summary {
  list-style: none;
}

.mobile-navigation summary::-webkit-details-marker {
  display: none;
}

.mobile-menu-button {
  display: grid;
  width: 44px;
  height: 44px;
  cursor: pointer;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--color-border);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--color-text);
  transition: transform 200ms ease, opacity 200ms ease;
}

.mobile-navigation[open] .hamburger-line:first-of-type {
  transform: translateY(6.5px) rotate(45deg);
}

.mobile-navigation[open] .hamburger-line:nth-of-type(2) {
  opacity: 0;
}

.mobile-navigation[open] .hamburger-line:nth-of-type(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100svh - 120px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  box-shadow: 0 24px 45px rgb(28 25 23 / 16%);
}

.mobile-menu-link {
  display: block;
  padding: 13px 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 16px;
}

.mobile-menu-link:last-child {
  border-bottom: 0;
}

.touch-scrolling {
  cursor: grabbing;
}

/* Homepage product movement. JavaScript adds and removes these classes. */
@keyframes product-slide-out-left {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-70px);
    opacity: 0;
  }
}

@keyframes product-slide-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(70px);
    opacity: 0;
  }
}

@keyframes product-slide-in-right {
  from {
    transform: translateX(70px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes product-slide-in-left {
  from {
    transform: translateX(-70px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.product-slide-out-left {
  animation: product-slide-out-left 220ms ease-in forwards;
}

.product-slide-out-right {
  animation: product-slide-out-right 220ms ease-in forwards;
}

.product-slide-in-right {
  animation: product-slide-in-right 380ms ease-out;
}

.product-slide-in-left {
  animation: product-slide-in-left 380ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .product-slide-out-left,
  .product-slide-out-right,
  .product-slide-in-right,
  .product-slide-in-left {
    animation-duration: 1ms;
  }
}

.navigation-link {
  padding-block: 28px;
  transition: color 200ms ease;
}

.navigation-link:hover {
  color: var(--color-muted);
}

.active-link {
  font-weight: 600;
}

/* Remove the browser's default triangle from the Products button. */
.product-menu summary {
  list-style: none;
}

.product-menu summary::-webkit-details-marker {
  display: none;
}

.product-menu[open] .menu-arrow {
  transform: rotate(180deg);
}

.menu-arrow {
  transition: transform 200ms ease;
}

.dropdown-link {
  display: block;
  padding: 12px 14px;
  transition: background-color 200ms ease;
}

.dropdown-link:hover,
.dropdown-link:focus {
  background-color: #f5f5f4;
  outline: none;
}

.placeholder-page {
  min-height: 65vh;
}

.category-mobile-controls {
  display: none;
}

/* -----------------------------------
   PRODUCT CATALOGS
   Shared by every category page.
----------------------------------- */

.catalog-hero {
  border-bottom: 1px solid var(--color-border);
}

.catalog-toolbar {
  border-bottom: 1px solid var(--color-border);
}

.filter-chip {
  border: 1px solid var(--color-border);
  background-color: transparent;
}

.filter-chip:hover,
.filter-chip.active-filter {
  border-color: var(--color-dark);
  background-color: var(--color-dark);
  color: var(--color-text-light);
}

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

.product-card {
  overflow: hidden;
  background-color: #ffffff;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgb(28 25 23 / 10%);
}

.product-art {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
}

.product-art::before {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background-color: rgb(255 255 255 / 38%);
  content: "";
}

.jar-mockup {
  position: relative;
  z-index: 1;
  display: grid;
  width: 132px;
  height: 178px;
  place-items: center;
  border-radius: 4px 4px 24px 24px;
  background: linear-gradient(90deg, var(--product-dark), var(--product-color), var(--product-dark));
  box-shadow: 0 28px 34px rgb(28 25 23 / 24%);
}

.jar-mockup::before {
  position: absolute;
  top: -13px;
  width: 138px;
  height: 24px;
  border-radius: 50%;
  background-color: #292524;
  content: "";
}

.product-label {
  width: 96px;
  padding: 24px 8px;
  background-color: #f5f5f4;
  text-align: center;
}

.plug-mockup {
  position: relative;
  z-index: 1;
  width: 100px;
  height: 185px;
  border-radius: 38px 38px 26px 26px;
  background: linear-gradient(90deg, #e7e5e4, #ffffff, #d6d3d1);
  box-shadow: 0 28px 34px rgb(28 25 23 / 18%);
}

.plug-mockup::before {
  position: absolute;
  bottom: 0;
  left: 17px;
  width: 66px;
  height: 82px;
  border-radius: 16px 16px 25px 25px;
  background: linear-gradient(90deg, var(--product-dark), var(--product-color), var(--product-dark));
  content: "";
}

.plug-mockup::after {
  position: absolute;
  bottom: -42px;
  left: 35px;
  width: 30px;
  height: 45px;
  background-color: #d6d3d1;
  content: "";
}

.wax-mockup {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 150px;
  transform: rotate(-7deg);
  border: 10px solid rgb(255 255 255 / 48%);
  border-radius: 18px;
  background-color: var(--product-color);
  background-image: radial-gradient(circle, rgb(255 255 255 / 18%) 0 42%, transparent 44%);
  background-position: 0 0;
  background-size: 66px 66px;
  box-shadow: 0 28px 34px rgb(28 25 23 / 18%);
}

.custom-mockup {
  position: relative;
  z-index: 1;
  display: grid;
  width: 145px;
  height: 190px;
  place-items: center;
  border-radius: 8px 8px 30px 30px;
  background: linear-gradient(90deg, var(--product-dark), var(--product-color), var(--product-dark));
  box-shadow: 0 28px 34px rgb(28 25 23 / 20%);
}

.custom-mockup::before {
  position: absolute;
  top: -9px;
  width: 151px;
  height: 20px;
  border-radius: 50%;
  background-color: #d6d3d1;
  content: "";
}

.quick-view-button {
  border: 1px solid var(--color-border);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.quick-view-button:hover {
  border-color: var(--color-dark);
  background-color: var(--color-dark);
  color: white;
}

.quick-view-dialog {
  width: min(900px, calc(100% - 32px));
  max-width: none;
  border: 0;
}

.quick-view-dialog::backdrop {
  background-color: rgb(28 25 23 / 62%);
  backdrop-filter: blur(4px);
}

.site-search-dialog {
  width: min(820px, calc(100% - 32px));
  max-width: none;
  border: 0;
}

.site-search-dialog::backdrop {
  background-color: rgb(28 25 23 / 62%);
  backdrop-filter: blur(4px);
}

.button-light {
  background-color: var(--color-text-light);
  color: var(--color-text);
}

.button-light:hover {
  background-color: #e7e5e4;
}

/* Keeps important dark actions readable regardless of stylesheet order. */
.primary-action {
  background-color: #1c1917;
  color: #ffffff !important;
}

.primary-action:hover {
  background-color: #44403c;
  color: #ffffff !important;
}

/* Tailwind dark-background controls must always retain readable text. */
[class~="bg-stone-900"] {
  color: #ffffff;
}

/* Shared footer styling used across every storefront page. */
.site-footer { background-color: #1c1917; color: #e7e5e4; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.75fr 0.75fr 1.2fr; gap: 56px; padding-top: 64px; padding-bottom: 52px; }
.footer-heading { margin-bottom: 18px; color: #a8a29e; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.footer-links { display: grid; gap: 12px; font-size: 14px; }
.footer-links a, .footer-social-link, .footer-legal a { transition: color 180ms ease, opacity 180ms ease; }
.footer-links a:hover, .footer-social-link:hover, .footer-legal a:hover { color: #ffffff; }
.footer-socials { display: flex; gap: 10px; margin-top: 24px; }
.footer-social-link { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #57534e; border-radius: 50%; }
.footer-social-link:hover { border-color: #ffffff; }
.footer-social-link svg { width: 18px; height: 18px; fill: currentColor; }
.footer-newsletter-form { display: flex; margin-top: 18px; }
.footer-newsletter-form input { min-width: 0; flex: 1; border: 1px solid #57534e; border-right: 0; background: transparent; padding: 12px 14px; color: #ffffff; outline: none; }
.footer-newsletter-form input:focus { border-color: #ffffff; }
.footer-newsletter-form button { background-color: #f5f5f4; padding: 12px 18px; color: #1c1917; font-size: 13px; font-weight: 700; }
.footer-newsletter-status { min-height: 20px; margin-top: 10px; color: #d6d3d1; font-size: 12px; }
.footer-legal { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid #44403c; padding-top: 22px; padding-bottom: 22px; color: #a8a29e; font-size: 12px; }
.compact-footer .footer-legal { border-top: 0; }
.checkout-footer { border-top: 1px solid #e7e5e4; background-color: #fafaf9; color: #78716c; }
