/* Custom Font Faces */
@font-face {
  font-family: 'Achafexp';
  src: url('fonts/Achafexp.ttf') format('truetype');
}

@font-face {
  font-family: 'Achafita';
  src: url('fonts/Achafita.ttf') format('truetype');
}

@font-face {
  font-family: 'Achaflft';
  src: url('fonts/Achaflft.ttf') format('truetype');
}

@font-face {
  font-family: 'Achafont';
  src: url('fonts/Achafont.ttf') format('truetype');
}

@font-face {
  font-family: 'Achafout';
  src: url('fonts/Achafout.ttf') format('truetype');
}

@font-face {
  font-family: 'Achafsex';
  src: url('fonts/Achafsex.ttf') format('truetype');
}

@font-face {
  font-family: 'Alegreya SC';
  src: url('fonts/AlegreyaSC-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Alegreya SC';
  src: url('fonts/AlegreyaSC-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Alegreya SC';
  src: url('fonts/AlegreyaSC-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Alegreya SC';
  src: url('fonts/AlegreyaSC-BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Alegreya SC';
  src: url('fonts/AlegreyaSC-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: 'Alegreya SC';
  src: url('fonts/AlegreyaSC-BlackItalic.ttf') format('truetype');
  font-weight: 900;
  font-style: italic;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('fonts/DancingScript-Regular.ttf') format('truetype');
  font-weight: normal;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('fonts/DancingScript-Medium.ttf') format('truetype');
  font-weight: 500;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('fonts/DancingScript-SemiBold.ttf') format('truetype');
  font-weight: 600;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('fonts/dancingscriptbold.ttf') format('truetype');
  font-weight: bold;
}

@font-face {
  font-family: 'Bloody Terror';
  src: url('fonts/Bloody_Terror_TTF_Personal.ttf') format('truetype');
}

@font-face {
  font-family: 'Clesgoth';
  src: url('fonts/Clesgoth_Demo.ttf') format('truetype');
}

@font-face {
  font-family: 'Collegiate';
  src: url('fonts/CollegiateFLF.ttf') format('truetype');
}

@font-face {
  font-family: 'Collegiate Black';
  src: url('fonts/CollegiateBlackFLF.ttf') format('truetype');
}

@font-face {
  font-family: 'Collegiate Border';
  src: url('fonts/CollegiateBorderFLF.ttf') format('truetype');
}

@font-face {
  font-family: 'Collegiate Inside';
  src: url('fonts/CollegiateInsideFLF.ttf') format('truetype');
}

@font-face {
  font-family: 'Collegiate Outline';
  src: url('fonts/CollegiateOutlineFLF.ttf') format('truetype');
}

@font-face {
  font-family: 'Enchanted Land';
  src: url('fonts/Enchanted_Land.otf') format('opentype');
}

@font-face {
  font-family: 'Freshman';
  src: url('fonts/Freshman.ttf') format('truetype');
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-ThinItalic.ttf') format('truetype');
  font-weight: 100;
  font-style: italic;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('fonts/Lato-BlackItalic.ttf') format('truetype');
  font-weight: 900;
  font-style: italic;
}

@font-face {
  font-family: 'Heorot';
  src: url('fonts/heorot.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Heorot';
  src: url('fonts/heoroti.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Heorot';
  src: url('fonts/heorote.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Heorot';
  src: url('fonts/heorotei.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Heorot';
  src: url('fonts/heorots.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Heorot';
  src: url('fonts/heorotsi.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
}

@font-face {
  font-family: 'Marlboro';
  src: url('fonts/Marlboro.ttf') format('truetype');
}

@font-face {
  font-family: 'Mostwasted';
  src: url('fonts/Mostwasted.ttf') format('truetype');
}

@font-face {
  font-family: 'Old London';
  src: url('fonts/Old_London.ttf') format('truetype');
}

@font-face {
  font-family: 'Old London Alternate';
  src: url('fonts/Old_London_Alternate.ttf') format('truetype');
}

@font-face {
  font-family: 'Plank';
  src: url('fonts/PLANK___.TTF') format('truetype');
}

@font-face {
  font-family: 'Playball';
  src: url('fonts/Playball-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Prince Valiant';
  src: url('fonts/Prince_Valiant.ttf') format('truetype');
}

@font-face {
  font-family: 'Remachine Script';
  src: url('fonts/RemachineScript_Personal_Use.ttf') format('truetype');
}

@font-face {
  font-family: 'Stardos Stencil';
  src: url('fonts/StardosStencil-Regular.ttf') format('truetype');
  font-weight: normal;
}

@font-face {
  font-family: 'Stardos Stencil';
  src: url('fonts/StardosStencil-Bold.ttf') format('truetype');
  font-weight: bold;
}

:root {
  --bg-main: #f4efe9;
  --text-main: #000000;
  --brand-primary: #3B693C;
  --brand-dark: #4b2e1a;
  --brand-light: #eadfce;
  --border-soft: #c8b49a;
  --light-nature-green: #d4e8d4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #000000;
  background-color: var(--bg-main);
  background-image:
    linear-gradient(120deg, rgba(139, 92, 60, 0.16), rgba(120, 64, 32, 0.10)),
    url("images/background-wood.png");
  background-size: auto, cover;
  background-repeat: repeat, no-repeat;
  background-attachment: fixed;
  background-position: center;
  line-height: 1.5;
  position: relative;
}

/* Floating notebook images - hidden on mobile */
.notebook-bg {
  position: fixed;
  width: 210px;
  height: auto;
  opacity: 0.80;
  z-index: 10;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: opacity 0.2s;
  display: none; /* Hidden by default on mobile */
}

.notebook-bg:hover {
  opacity: 1;
}

/* Left side notebooks */
.notebook-bg-1 {
  top: 10%;
  left: 65px;
  transform: rotate(-8deg);
  animation: float-1 20s ease-in-out infinite;
}

.notebook-bg-2 {
  top: 55%;
  left: 65px;
  transform: rotate(5deg);
  animation: float-2 18s ease-in-out infinite;
}

/* Right side notebooks */
.notebook-bg-3 {
  top: 15%;
  right: 65px;
  transform: rotate(12deg);
  animation: float-3 22s ease-in-out infinite;
}

.notebook-bg-4 {
  top: 60%;
  right: 65px;
  transform: rotate(-6deg);
  animation: float-4 19s ease-in-out infinite;
}

/* Floating animations */
@keyframes float-1 {
  0%, 100% {
    transform: rotate(-8deg) translateY(0px);
  }
  50% {
    transform: rotate(-5deg) translateY(-20px);
  }
}

@keyframes float-2 {
  0%, 100% {
    transform: rotate(5deg) translateY(0px);
  }
  50% {
    transform: rotate(8deg) translateY(15px);
  }
}

@keyframes float-3 {
  0%, 100% {
    transform: rotate(12deg) translateY(0px);
  }
  50% {
    transform: rotate(9deg) translateY(-15px);
  }
}

@keyframes float-4 {
  0%, 100% {
    transform: rotate(-6deg) translateY(0px);
  }
  50% {
    transform: rotate(-3deg) translateY(20px);
  }
}

/* Make sure main content is above background images */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Brand header (logo + business name) */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand-logo {
  max-width: 100px;
  height: auto;
  margin-bottom: 0.3rem;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1rem;
  color: #000000;
  background-color: var(--light-nature-green);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  display: inline-block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav a {
  text-decoration: none;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 700;
  background-color: var(--light-nature-green);
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  display: inline-block;
  white-space: nowrap;
}

.nav a:hover {
  text-decoration: none;
  color: #000000;
  background-color: #c0dcc0;
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
}

.hero-inner {
  text-align: center;
}

.hero h1 {
  color: #000000;
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  margin-bottom: 0.75rem;
  background-color: var(--light-nature-green);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  display: inline-block;
  max-width: 100%;
}

.hero p {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  color: #000000;
  background-color: var(--light-nature-green);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  border: none;
  background: var(--brand-primary);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #5e3822;
  opacity: 0.9;
  color: #ffffff !important;
}

/* Sections */
.section {
  padding: 2rem 0;
}

.section-alt {
  /* No background - removed banner */
}

/* Order section wrapper - includes heading, button, and form */
.order-section-wrapper {
  background-color: var(--light-nature-green);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.order-section-wrapper h2 {
  background-color: transparent;
  padding: 0;
  margin-top: 0;
  margin-bottom: 1rem;
  display: block;
}

.order-section-wrapper p {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1.5rem;
}

.order-section-wrapper .btn-primary {
  margin-bottom: 1.5rem;
}

/* All form elements inside wrapper should have no extra backgrounds */
.order-section-wrapper .form-group label {
  background-color: transparent;
  padding: 0;
  display: block;
}

.order-section-wrapper .small-note {
  background-color: transparent;
  padding: 0;
}

.section h2 {
  font-size: clamp(1.2rem, 4vw, 1.4rem);
  margin-bottom: 0.75rem;
  color: #000000;
  background-color: var(--light-nature-green);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  display: inline-block;
  max-width: 100%;
}

/* Also apply green background to h1 headings */
h1 {
  color: #000000;
  background-color: var(--light-nature-green);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  display: inline-block;
  max-width: 100%;
}

.section p {
  color: #000000;
  background-color: var(--light-nature-green);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
}

.section-intro {
  max-width: 560px;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-card {
  border: 2px solid var(--border-soft);
  background-color: #3B693C;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 0px solid #e5e7eb;
}

.product-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  background-color: var(--light-nature-green);
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  color: #000000;
}

.product-card p {
  color: #000000;
}

/* Category cards - force all text to black */
.category-card {
  text-decoration: none;
  color: #000000;
}

.category-card h3 {
  color: #000000;
}

.category-card p {
  color: #000000;
}

.category-card:hover {
  text-decoration: none;
  color: #000000;
}

.category-card:hover h3 {
  color: #000000;
}

.category-card:hover p {
  color: #000000;
}

.category-card:visited {
  color: #000000;
}

.category-card:visited h3 {
  color: #000000;
}

.category-card:visited p {
  color: #000000;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.option-card {
  padding: 1rem;
  border: 2px solid var(--border-soft);
  background: #ffffff;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.option-card:hover {
  border-color: #111827;
}

.option-card.selected {
  border-color: var(--brand-primary);
  background-color: var(--brand-light);
}

/* Checkbox indicator in lower left corner */
.option-card::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  border: 2px solid #000000;
  border-radius: 3px;
  background-color: #ffffff;
  transition: all 0.2s;
}

/* Red checkmark when selected */
.option-card.selected::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff0000;
  font-weight: bold;
  font-size: 22px;
  background-color: #ffffff;
}

/* Form */
.order-form {
  margin-top: 0;
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #000000;
}

input,
select,
textarea {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  padding: 0.65rem 0.75rem;
  font: inherit;
  width: 100%;
  background-color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.1);
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}

.option-group label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-submit {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 300px;
}

.small-note {
  font-size: 0.8rem;
  color: #000000;
  margin-top: 0.5rem;
  display: block;
}

.hidden {
  display: none;
}

/* Footer */
.site-footer {
  padding: 1rem 0;
  text-align: center;
}

.footer-inner {
  padding: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #000000;
  background-color: var(--light-nature-green);
  border-radius: 0.75rem;
  display: inline-block;
  padding: 0.75rem 1.5rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.font-thumb {
  width: 100%;
  height: 70px;
  object-fit: contain;
  border-radius: 0.5rem;
  margin-bottom: 0.4rem;
}

/* Smaller images for color swatches */
.color-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0.4rem;
  margin-left: auto;
  margin-right: auto;
}

/* Larger images for engraving designs */
.design-thumb {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  margin-bottom: 0.4rem;
}

/* Simple image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  background: #FFFFFF;
  padding: 1rem;
  border-radius: 0.75rem;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  object-fit: contain;
}

#lightbox-close {
  display: inline-block;
  border: none;
  background: #f9fafb;
  color: #111827;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .brand-logo {
    max-width: 80px;
  }

  .logo-text {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .nav {
    justify-content: center;
  }

  .nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero h1 {
    padding: 0.75rem 1rem;
    font-size: 1.4rem;
  }

  .hero p {
    padding: 0.75rem 1rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .section h2 {
    padding: 0.6rem 1rem;
  }

  .order-section-wrapper {
    padding: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-img {
    height: 250px;
  }

  .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* Show floating notebooks only on larger screens */
@media (min-width: 1200px) {
  .notebook-bg {
    display: block;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero h1 {
    font-size: 1.2rem;
    padding: 0.6rem 0.8rem;
  }

  .hero p {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }

  .nav a {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
  }

  .section h2 {
    font-size: 1.1rem;
  }

  .product-card {
    padding: 1rem;
  }

  .form-submit {
    max-width: 100%;
  }
}

/* Color-specific filters for preview design images */
.preview-design-white {
  filter: brightness(0) invert(1);
}

.preview-design-black {
  filter: brightness(0);
}

/* Preview text styling to ensure fonts display correctly */
#preview-text {
  font-weight: normal;
  font-style: normal;
  letter-spacing: normal;
  line-height: 1.2;
}

/* Remove green backgrounds from preview section */
#preview-section p {
  background-color: transparent !important;
  padding: 0.5rem 0 !important;
}
