/*
 * site.css
 * Navbar, hero buttons, product list and order form. Loaded after style.css.
 */

:root {
  --ccs-red: #fd4343;        /* brand script color */
  --ccs-red-dark: #d62f3a;   /* buttons: readable with white text */
  --ccs-cocoa: #3b2a20;
  --ccs-text: #5e4e42;
  --ccs-muted: #8b7b6e;
  --ccs-caramel: #c98a2e;
  --ccs-cream: #fff8ef;
  --ccs-sand: #f5eadb;
  --ccs-line: #eadcc8;
  --ccs-nav-height: 72px;
}

html {
  scroll-behavior: smooth;
}

/* People who ask their device for less motion get no animations or smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ccs-text);
}

/* Section links land below the fixed navbar. */
section[id] {
  scroll-margin-top: var(--ccs-nav-height);
}

/* ---------- Buttons ---------- */

.ccs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.ccs-btn:hover,
.ccs-btn:focus {
  text-decoration: none;
  transform: translateY(-1px);
}

.ccs-btn-primary {
  background-color: var(--ccs-red-dark);
  color: #fff;
}

.ccs-btn-primary:hover,
.ccs-btn-primary:focus {
  background-color: #b8232e;
  color: #fff;
}

.ccs-btn-light {
  border-color: rgba(255, 255, 255, 0.75);
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ccs-btn-light:hover,
.ccs-btn-light:focus {
  background-color: #fff;
  color: var(--ccs-cocoa);
}

/* ---------- Navbar ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1200px;
  height: var(--ccs-nav-height);
  margin: 0 auto;
  padding: 0 24px;
}

.site-brand {
  font-family: 'Satisfy', cursive;
  font-size: 30px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  transition: color 0.3s;
}

.site-brand:hover,
.site-brand:focus {
  color: var(--ccs-red);
  text-decoration: none;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-links a {
  position: relative;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

/* Animated underline on hover and for the section in view. */
.site-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background-color: var(--ccs-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.site-links a:hover,
.site-links a:focus,
.site-links a.is-active {
  color: #fff;
  text-decoration: none;
}

.site-links a:hover::after,
.site-links a.is-active::after {
  transform: scaleX(1);
}

.site-links .site-links-call {
  display: none;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-call {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  white-space: nowrap;
}

.site-call:hover,
.site-call:focus {
  color: #fff;
  text-decoration: none;
}

.site-cta {
  padding: 10px 20px;
}

.site-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.site-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background-color: #fff;
  transition: transform 0.25s, opacity 0.25s, background-color 0.3s;
}

/* Scrolled past the hero, or the phone menu is open: solid bar. */
.site-nav.is-scrolled,
.site-nav.is-open {
  background-color: rgba(255, 250, 243, 0.94);
  box-shadow: 0 6px 24px rgba(59, 42, 32, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-nav.is-scrolled .site-brand,
.site-nav.is-open .site-brand {
  color: var(--ccs-red);
}

.site-nav.is-scrolled .site-links a,
.site-nav.is-scrolled .site-call,
.site-nav.is-open .site-links a {
  color: var(--ccs-cocoa);
}

.site-nav.is-scrolled .site-toggle span,
.site-nav.is-open .site-toggle span {
  background-color: var(--ccs-cocoa);
}

.site-nav.is-open .site-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .site-toggle span:nth-child(2) {
  opacity: 0;
}

.site-nav.is-open .site-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1060px) {
  .site-call span {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-toggle {
    display: flex;
  }

  /* The links become a dropdown here, so push the buttons right ourselves. */
  .site-actions {
    margin-left: auto;
  }

  .site-call {
    display: none;
  }

  .site-links {
    position: absolute;
    top: var(--ccs-nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background-color: rgba(255, 250, 243, 0.98);
    box-shadow: 0 16px 24px rgba(59, 42, 32, 0.12);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .site-nav.is-open .site-links {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .site-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--ccs-line);
    font-size: 17px;
  }

  .site-links a::after {
    display: none;
  }

  .site-links .site-links-call {
    display: block;
    border-bottom: 0;
    color: var(--ccs-red-dark) !important;
    font-weight: 700;
  }
}

/* Phones up to 520px, including Pro Max / Plus (428–440px). The full-size brand
   pushes the menu toggle off-screen until about 490px. */
@media (max-width: 520px) {
  .site-nav-inner {
    gap: 12px;
    padding: 0 16px;
  }

  .site-brand {
    font-size: 23px;
  }

  .site-cta {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Very narrow phones: the menu and the hero buttons already offer ordering. */
@media (max-width: 370px) {
  .site-cta {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  padding: 0 16px;
}

/* The old template's link hover styles don't apply to these buttons. */
#banner .hero-actions a:hover {
  text-decoration: none;
}

#banner .hero-actions .ccs-btn-primary:hover {
  color: #fff;
}

@media (max-width: 600px) {
  .logo-name {
    margin-top: 200px;
    font-size: 56px;
  }
}

/* ---------- Products ---------- */

.products {
  background-color: var(--ccs-cream);
}

.products-head {
  max-width: 680px;
  margin: 0 auto 28px;
  text-align: center;
}

.products-intro {
  margin: 10px 0 22px;
  font-size: 17px;
  color: var(--ccs-text);
}

.products-intro a {
  color: var(--ccs-red-dark);
  font-weight: 700;
}

.products-search {
  position: relative;
  display: block;
  max-width: 460px;
  margin: 0 auto;
  font-weight: 400;
}

.products-search .fa {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: var(--ccs-muted);
}

.products-search input {
  width: 100%;
  height: 50px;
  padding: 0 18px 0 46px;
  border: 1.5px solid var(--ccs-line);
  border-radius: 999px;
  background-color: #fff;
  color: var(--ccs-cocoa);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.products-search input:focus {
  border-color: var(--ccs-caramel);
  box-shadow: 0 0 0 4px rgba(201, 138, 46, 0.15);
}

.products-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.products-tab {
  padding: 9px 18px;
  border: 1.5px solid var(--ccs-line);
  border-radius: 999px;
  background-color: #fff;
  color: var(--ccs-cocoa);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.products-tab:hover {
  border-color: var(--ccs-caramel);
}

.products-tab[aria-selected="true"] {
  border-color: var(--ccs-cocoa);
  background-color: var(--ccs-cocoa);
  color: #fff;
}

/* Phones: one scrollable row of tabs instead of a tall stack. */
@media (max-width: 767px) {
  .products-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0 -15px 20px;
    padding: 0 15px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .products-tabs::-webkit-scrollbar {
    display: none;
  }
}

.products-panel {
  padding: 32px;
  border-radius: 22px;
  background-color: #fff;
  box-shadow: 0 18px 40px rgba(59, 42, 32, 0.08);
  animation: products-in 0.35s ease;
}

@keyframes products-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.panel-head {
  margin-bottom: 22px;
}

.panel-head h2 {
  margin: 0;
  font-family: 'Satisfy', cursive;
  font-size: 44px;
  line-height: 1.1;
  color: var(--ccs-red);
}

.panel-head p {
  margin: 6px 0 0;
  font-size: 17px;
  color: var(--ccs-muted);
}

.panel-top {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.panel-top.photos-1 {
  grid-template-columns: 1.4fr 1fr;
}

.panel-top.photos-0 {
  grid-template-columns: 1fr;
}

.panel-notes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 22px 24px;
  border-radius: 16px;
  background-color: var(--ccs-sand);
}

.panel-notes li,
.group-notes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ccs-cocoa);
  font-size: 15px;
  line-height: 1.45;
}

.panel-notes .fa,
.group-notes .fa {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--ccs-caramel);
}

.panel-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background-color: var(--ccs-sand);
}

.panel-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s;
}

.panel-photo:hover img {
  transform: scale(1.04);
}

/* "whole" photos: the entire picture, centered over a soft blurred copy of itself. */
.panel-photo.is-whole {
  position: relative;
}

.panel-photo-backdrop {
  position: absolute;
  inset: -24px;
  background-position: center;
  background-size: cover;
  filter: blur(18px);
  opacity: 0.6;
}

.panel-photo.is-whole img {
  position: relative;
  object-fit: contain;
}

.panel-photo.is-whole:hover img {
  transform: none;
}

@media (max-width: 767px) {
  .products-panel {
    padding: 22px 18px;
  }

  .panel-head h2 {
    font-size: 36px;
  }

  .panel-top,
  .panel-top.photos-1 {
    grid-template-columns: 1fr 1fr;
  }

  .panel-notes {
    grid-column: 1 / -1;
  }

  .panel-photo img {
    min-height: 0;
  }
}

.product-group + .product-group {
  margin-top: 28px;
}

.product-group h3 {
  margin: 0 0 12px;
  color: var(--ccs-caramel);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.group-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 14px;
  padding: 0;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

/* Phones: two narrow columns so long lists (145 shelf candies) don't scroll forever. */
@media (max-width: 767px) {
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

.product-item {
  padding: 12px 14px;
  border: 1px solid var(--ccs-line);
  border-radius: 12px;
  background-color: var(--ccs-cream);
  transition: border-color 0.2s, transform 0.2s;
}

.product-item:hover {
  border-color: var(--ccs-caramel);
  transform: translateY(-1px);
}

.item-name {
  display: block;
  color: var(--ccs-cocoa);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
}

.item-detail,
.item-category {
  display: block;
  margin-top: 3px;
  color: var(--ccs-muted);
  font-size: 13.5px;
  line-height: 1.4;
}

.item-category {
  color: var(--ccs-caramel);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.products-empty,
.products-noscript {
  padding: 28px 0;
  text-align: center;
  font-size: 17px;
  color: var(--ccs-text);
}

.products-empty a,
.products-noscript a {
  color: var(--ccs-red-dark);
  font-weight: 700;
}

/* ---------- Contact and order form ---------- */

.contact-head {
  margin-bottom: 36px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 32px;
  align-items: start;
}

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

.contact-info {
  display: grid;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--ccs-line);
  border-radius: 16px;
  background-color: #fff;
}

.contact-icon-circle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #fdeceb;
  color: var(--ccs-red-dark);
  font-size: 18px;
}

.contact-item h4 {
  margin: 0 0 2px;
  color: var(--ccs-cocoa);
  font-size: 15px;
  font-weight: 700;
}

.contact-item p {
  margin: 0;
  color: var(--ccs-text);
}

.contact-item a {
  color: var(--ccs-red-dark);
  overflow-wrap: anywhere;
}

.order-form {
  position: relative;
  padding: 30px;
  border-radius: 22px;
  background-color: #fff;
  box-shadow: 0 18px 40px rgba(59, 42, 32, 0.1);
}

@media (max-width: 600px) {
  .order-form {
    padding: 22px 18px;
  }
}

.order-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.order-form fieldset {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.order-form legend {
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  color: var(--ccs-cocoa);
  font-size: 15px;
  font-weight: 700;
}

.order-type-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.order-type label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

/* The radio stays usable with the keyboard; the card around it is what people see. */
.order-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.order-type span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 12px 10px;
  border: 1.5px solid var(--ccs-line);
  border-radius: 12px;
  color: var(--ccs-cocoa);
  font-weight: 500;
  text-align: center;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.order-type label:hover span {
  border-color: var(--ccs-caramel);
}

.order-type input:checked + span {
  border-color: var(--ccs-red-dark);
  background-color: #fdeceb;
  color: var(--ccs-red-dark);
}

.order-type input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(214, 47, 58, 0.18);
}

@media (max-width: 480px) {
  .order-type-options {
    grid-template-columns: 1fr;
  }

  .order-type span {
    justify-content: flex-start;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  grid-template-columns: 2fr 1.2fr 1fr;
}

@media (max-width: 600px) {
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.field {
  position: relative;
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ccs-cocoa);
  font-size: 14px;
  font-weight: 700;
}

.field .optional {
  color: var(--ccs-muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--ccs-line);
  border-radius: 12px;
  background-color: #fff;
  color: var(--ccs-cocoa);
  font-size: 16px; /* 16px keeps iPhones from zooming in on focus */
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

/* Example text: lighter and italic so it isn't mistaken for something already typed. */
.field input::placeholder,
.field textarea::placeholder,
.products-search input::placeholder {
  color: #b3a597;
  font-style: italic;
  opacity: 1; /* Firefox fades placeholders on its own */
}

/* Same look for a dropdown still showing "Choose". */
.field select:has(option[value=""]:checked) {
  color: #b3a597;
  font-style: italic;
}

.field select option {
  color: var(--ccs-cocoa);
  font-style: normal;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ccs-caramel);
  box-shadow: 0 0 0 4px rgba(201, 138, 46, 0.15);
}

.field-error {
  display: none;
  margin: 6px 0 0;
  color: #c0392b;
  font-size: 13.5px;
}

/* Errors only show after a send attempt, so people aren't scolded while typing. */
.was-validated .field input:invalid,
.was-validated .field select:invalid,
.was-validated .field textarea:invalid {
  border-color: #c0392b;
}

.was-validated .field input:invalid ~ .field-error,
.was-validated .field select:invalid ~ .field-error,
.was-validated .field textarea:invalid ~ .field-error {
  display: block;
}

.ship-fields {
  padding: 18px 18px 2px !important;
  border-radius: 16px !important;
  background-color: var(--ccs-cream);
}

.ship-fields legend {
  float: left;
  width: 100%;
}

.order-submit {
  width: 100%;
  padding: 15px 24px;
  font-size: 16px;
}

.order-submit.is-sending {
  opacity: 0.7;
  pointer-events: none;
}

/* Address suggestions (Google Places) */

.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 4px 0 0;
  padding: 6px;
  border: 1px solid var(--ccs-line);
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 16px 32px rgba(59, 42, 32, 0.14);
}

.address-suggestions[hidden] {
  display: none;
}

.address-suggestions [role="option"] {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ccs-cocoa);
  cursor: pointer;
}

.address-suggestions [role="option"] small {
  display: block;
  color: var(--ccs-muted);
}

.address-suggestions [role="option"][aria-selected="true"],
.address-suggestions [role="option"]:hover {
  background-color: var(--ccs-cream);
}

.address-attribution {
  padding: 6px 12px 2px;
  color: var(--ccs-muted);
  font-size: 12px;
  text-align: right;
}

/* ---------- Footer ---------- */

/* This row has no .container, so Bootstrap's -15px margins made the page wider than
   the screen. iOS then widens the fixed navbar too, pushing the menu toggle off-screen. */
.footer .footer-top > .row {
  margin-left: 0;
  margin-right: 0;
}
