/* Glide smoothly when a link jumps to a section, e.g. "View our work" */
html {
  scroll-behavior: smooth;
}

/* Page background: premium ivory white */
body {
  background-color: #F6F2EA;
  margin: 0;
}

/* Hero: the first full screen of the site */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  position: relative;   /* lets the background layers sit inside the hero */
  overflow: hidden;     /* hides the blurred photo's soft edges */
}

/* Layer 1: the shop photo, blurred */
.hero::before {
  content: "";
  position: absolute;
  inset: -30px;         /* a little bigger than the hero, so the blur has no faded edges */
  background-image: url("images/shop-interior.jpg");
  background-size: cover;
  background-position: center 30%;
  filter: blur(3px);
}

/* Layer 2: a soft ivory wash over the photo, so the charcoal text stands out.
   Towards the bottom it fades to solid ivory, blending into the rest of the page. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(246, 242, 234, 0.6) 0%,
    rgba(246, 242, 234, 0.6) 65%,
    rgba(246, 242, 234, 1) 100%
  );
}

/* Layer 3: the logo, headline, tagline and buttons sit on top */
.hero > * {
  position: relative;
  z-index: 1;
}

/* Logo above the headline */
.hero-logo {
  height: 150px;
  width: auto;
  margin-bottom: 36px;
  animation: breathe 6s ease-in-out infinite;
}

/* Main headline: charcoal black, large and spaced out */
h1 {
  color: #232323;
  font-size: 64px;
  letter-spacing: 8px;
  margin: 0;
}

/* A slow "breathing" pulse for the logo: it grows slightly and softens, then settles back */
@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.035);
    opacity: 0.8;
  }
}

/* Visitors who have asked their device for less motion get a still logo */
@media (prefers-reduced-motion: reduce) {
  .hero-logo {
    animation: none;
  }
}

/* The line under the headline */
.tagline {
  color: #6B655C;
  font-size: 18px;
  letter-spacing: 2px;
  margin-top: 20px;
}

/* The row that holds the two buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

/* Shared look for every button */
.button {
  display: inline-block;
  padding: 16px 36px;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #232323;
  transition: background-color 0.3s, color 0.3s;
}

/* "Book": filled charcoal, the main action */
.button-solid {
  background-color: #232323;
  color: #F6F2EA;
}

.button-solid:hover {
  background-color: transparent;
  color: #232323;
}

/* "View our work": outline only, the secondary action */
.button-outline {
  background-color: transparent;
  color: #232323;
}

.button-outline:hover {
  background-color: #232323;
  color: #F6F2EA;
}

/* Over the hero photo, outline buttons get a solid ivory fill so they stand out */
.hero .button-outline:not(:hover) {
  background-color: rgba(246, 242, 234, 0.9);
}

/* Hero on phones (placed after the main hero rules so these win) */
@media (max-width: 700px) {
  .hero-logo {
    height: 110px;
  }

  /* Smaller headline so it fits the screen */
  h1 {
    font-size: 36px;
    letter-spacing: 4px;
  }

  /* Stack the buttons as a neat column, all the same width */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
  }

  .hero-buttons .button {
    text-align: center;
  }
}

/* Gallery */
.gallery {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 20px;
  text-align: center;
}

.gallery h2 {
  color: #232323;
  font-size: 32px;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin: 0 0 60px;
}

/* Cards in a grid: three across, kept to a compact width so the pictures stay small */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

/* A single photo card */
.card {
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;   /* softly rounded corners */
  overflow: hidden;      /* keeps the photo (and its zoom) inside the rounded corners */
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Every photo gets the same frame, cropped neatly to fit */
.card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;   /* square photos, shorter than before */
  object-fit: cover;
  transition: transform 0.5s;
}

/* The card lifts with a soft shadow, and the photo zooms in slightly.
   On a computer this happens on hover; on phones it happens when tapped
   (gallery.js adds the "is-active" class). */
.card.is-active {
  transform: translateY(-6px);
  box-shadow: 0 12px 14px -6px rgba(0, 0, 0, 0.35);   /* small shadow just below the photo */
}

.card.is-active img {
  transform: scale(1.05);
}

/* Only devices with a real mouse use hover. Phones fake a "sticky" hover
   after a tap, which would fight with the tap effect above. */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 14px -6px rgba(0, 0, 0, 0.35);   /* small shadow just below the photo */
  }

  .card:hover img {
    transform: scale(1.05);
  }
}

/* Tapped cards show a pointer-style cursor hint and no grey tap flash on phones */
.card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Two across on phones, one across on very small screens */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 320px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Appointments (Square booking)
   ========================================================== */
.booking {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 20px;
  color: #232323;
}

.booking h2 {
  font-size: 32px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 60px;
}

/* Underline the "Gallery" and "Appointments" headings */
.gallery h2,
.booking h2 {
  text-decoration: underline;
  text-decoration-thickness: 2px;   /* a fine, crisp line */
  text-underline-offset: 12px;      /* space between the letters and the line */
}

.booking-intro,
.booking-note {
  text-align: center;
  color: #6B655C;
}

.booking-intro {
  font-size: 17px;
  letter-spacing: 1px;
  margin: -36px 0 50px;
}

.booking-note {
  font-size: 14px;
  margin: 40px 0 0;
}

/* Service cards: three across on wide screens */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;   /* softly rounded corners, matching the gallery */
}

.service h3 {
  font-size: 18px;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.service-details {
  color: #6B655C;
  font-size: 14px;
  letter-spacing: 1px;
  margin: 0;
}

.service-price {
  font-size: 30px;
  margin: 18px 0 26px;
}

/* Pushes the button to the bottom so all cards line up */
.service .button {
  margin-top: auto;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Hover glow: a soft black glow around every clickable button
   ========================================================== */
.button,
.service {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.button:hover,
.button:focus-visible,
.service:hover {
  box-shadow: 0 0 16px 2px rgba(0, 0, 0, 0.25);
}

/* ==========================================================
   Site header (every page)
   ========================================================== */
html {
  scroll-padding-top: 80px;   /* anchor links (#book, #work) stop below the fixed header */
}

/* Hidden visually but still read out by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;               /* stays on top of the page content */
  background-color: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #DDD6C9;
}

/* Home page: the header is hidden over the hero, then slides down once you scroll past it.
   (site.js adds "has-hero" to the page and "is-visible" to the header.)
   "visibility: hidden" also stops keyboard users tabbing into the hidden links. */
.has-hero .site-header {
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease, visibility 0s linear 0.4s;
}

.has-hero .site-header.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.4s ease, opacity 0.4s ease, visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .has-hero .site-header,
  .has-hero .site-header.is-visible {
    transition: none;
  }
}

.site-header-inner {
  max-width: 1240px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  color: #232323;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.site-nav a {
  color: #232323;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: #232323;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Basket icon and its count badge */
.basket-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #232323;
  border-radius: 50%;
  transition: box-shadow 0.3s;
}

.basket-link:hover,
.basket-link:focus-visible {
  box-shadow: 0 0 16px 2px rgba(0, 0, 0, 0.18);
}

.basket-link svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.basket-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 9px;
  background-color: #232323;
  color: #F6F2EA;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  line-height: 18px;
  text-align: center;
}

.basket-count[hidden] {
  display: none;
}

.basket-count.is-bumped {
  animation: badge-bump 0.4s ease-out;
}

@keyframes badge-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* The ☰ menu button: only shown on phones */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.menu-bar {
  display: block;
  height: 2px;
  background-color: #232323;
}

@media (max-width: 700px) {
  .site-brand {
    font-size: 13px;
    letter-spacing: 3px;
  }

  .menu-toggle {
    display: flex;
  }

  /* The links drop down below the header when the menu is open */
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: #F6F2EA;
    border-bottom: 1px solid #DDD6C9;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 18px 20px;
    border-bottom: 1px solid #ECE6DB;
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: #ECE6DB;
    font-weight: bold;
  }
}

/* ==========================================================
   Shared layout for the Shop, Product and Basket pages
   ========================================================== */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 130px 20px 100px;   /* top padding clears the fixed header */
  color: #232323;
}

/* Page headings match the "Gallery" and "Appointments" headings */
.page-title {
  font-size: 32px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 12px;
  margin: 0 0 24px;
}

.page-intro {
  text-align: center;
  color: #6B655C;
  font-size: 17px;
  letter-spacing: 1px;
  margin: 0 0 50px;
}

/* <button> elements styled as .button use the page font, not the browser's default */
button.button {
  font-family: inherit;
  cursor: pointer;
}

.back-link {
  display: inline-block;
  color: #232323;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-underline-offset: 4px;
}

/* Small "Placeholder" label on placeholder products */
.placeholder-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: #ECE6DB;
  color: #6B655C;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ==========================================================
   Shop grid
   ========================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 14px -6px rgba(0, 0, 0, 0.35);
  }
}

.product-card-image {
  position: relative;
  display: block;
  background-color: #FFFFFF;
}

/* "contain" shows the whole product without cropping; works for bottles, tubs and tools */
.product-card-image img,
.product-detail-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 4%;            /* the product photos already have white space around them */
  box-sizing: border-box;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 20px 26px;
  border-top: 1px solid #ECE6DB;
  flex: 1;
}

.product-card-name {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.product-card-name a {
  color: #232323;
  text-decoration: none;
}

.product-card-name a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-card-tagline,
.product-detail-tagline {
  color: #6B655C;
  font-size: 13px;
  letter-spacing: 1px;
  margin: 0 0 12px;
}

.product-detail-tagline {
  font-size: 15px;
  margin-top: -4px;
}

.product-card-price {
  font-size: 20px;
  margin: 0 0 20px;
}

/* Hold / Shine ratings on the product page: ●●○ Hold   ●●○ Shine */
.product-ratings {
  display: flex;
  gap: 28px;
  margin: -8px 0 24px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.rating-dots {
  letter-spacing: 3px;
  margin-right: 6px;
}

.product-card .button {
  margin-top: auto;
  width: 100%;
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Product page
   ========================================================== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 28px;
}

.product-detail-image {
  position: relative;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;
  overflow: hidden;
}

.product-detail-info .page-title {
  text-align: left;
  text-decoration: none;
  margin-bottom: 12px;
}

.product-detail-price {
  font-size: 26px;
  margin: 0 0 24px;
}

.product-detail-description {
  color: #4A453E;
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 36px;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 760px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Quantity control:  − 1 +  (product page and basket) */
.quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #232323;
  background-color: #FFFFFF;
}

.quantity-button {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: #232323;
  font-size: 20px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.quantity-button:hover:not(:disabled) {
  background-color: #ECE6DB;
}

.quantity-button:disabled {
  color: #C9C2B6;
  cursor: default;
}

.quantity-value {
  min-width: 36px;
  text-align: center;
  font-size: 16px;
}

/* ==========================================================
   Basket page
   ========================================================== */
.basket-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}

.basket-items {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #DDD6C9;
}

.basket-item {
  display: grid;
  grid-template-columns: 88px 1fr auto 90px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #DDD6C9;
}

.basket-item-image {
  display: block;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 8px;
  overflow: hidden;
}

.basket-item-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 2%;
  box-sizing: border-box;
}

.basket-item-name {
  color: #232323;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
}

.basket-item-name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.basket-item-price {
  color: #6B655C;
  font-size: 14px;
  margin: 6px 0 8px;
}

.basket-remove {
  padding: 4px 0;
  background: none;
  border: none;
  color: #6B655C;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.basket-remove:hover {
  color: #232323;
}

.basket-item-total {
  font-size: 17px;
  text-align: right;
  margin: 0;
}

.basket-summary {
  position: sticky;
  top: 90px;
  padding: 28px;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  border-radius: 12px;
}

.basket-summary h2 {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.basket-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
}

.basket-subtotal {
  padding-top: 14px;
  border-top: 1px solid #ECE6DB;
  font-size: 20px;
}

.basket-summary-note {
  color: #6B655C;
  font-size: 13px;
  margin: 4px 0 22px;
}

.basket-checkout {
  width: 100%;
  margin-bottom: 18px;
}

.checkout-message {
  margin: -6px 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background-color: #F6F2EA;
  color: #4A453E;
  font-size: 14px;
  line-height: 1.5;
}

.basket-notice {
  margin: 30px 0 0;
  padding: 14px 18px;
  border-radius: 8px;
  background-color: #FFFFFF;
  border: 1px solid #DDD6C9;
  color: #4A453E;
  text-align: center;
}

/* Empty basket (and "product not found") */
.empty-state {
  max-width: 440px;
  margin: 40px auto 0;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: #6B655C;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state h2 {
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 20px 0 12px;
}

.empty-state p {
  color: #6B655C;
  margin: 0 0 30px;
}

@media (max-width: 860px) {
  .basket-layout {
    grid-template-columns: 1fr;
  }

  .basket-summary {
    position: static;
  }
}

/* On phones each item becomes two rows: photo + details, then quantity + total */
@media (max-width: 560px) {
  .basket-item {
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "image info info"
      "image qty  total";
    row-gap: 12px;
  }

  .basket-item-image { grid-area: image; align-self: start; }
  .basket-item-info  { grid-area: info; }
  .basket-item .quantity { grid-area: qty; justify-self: start; }
  .basket-item-total { grid-area: total; }
}

/* ==========================================================
   "Added to basket" pop-up
   ========================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: calc(100% - 40px);
  box-sizing: border-box;
  padding: 14px 20px;
  border-radius: 8px;
  background-color: #232323;
  color: #F6F2EA;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast-link {
  color: #F6F2EA;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .basket-count.is-bumped {
    animation: none;
  }

  .toast {
    transition: none;
  }
}

