/* =============================================
   Red Dog Craftworks — Main Stylesheet
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red:       #b91c1c;
  --red-dark:  #7f1d1d;
  --cream:     #EDE8DC;
  --brown:     #5c3d2e;
  --text:      #1c1917;
  --muted:     #78716c;
  --border:    #e7e5e4;
  --card-bg:   #ffffff;
  --radius:    6px;
  --shadow:    0 2px 8px rgba(0,0,0,0.08);
}

body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
}

/* ---- Header ---- */
header {
  background: #152616;
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 2rem 0.5rem;
}

.header-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
}

.site-logo {
  height: 110px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.header-brand a {
  display: contents;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  letter-spacing: 0.04em;
  color: #b07b53;
}

.tagline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #EDE8DC;
}

/* ---- Intro section ---- */
.intro-section {
  background: #152616;
  padding: 2.5rem 1.25rem;
}

.intro-inner {
  max-width: 850px;
  margin: 0 auto;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #d6c5b7;
}

.intro-section a {
  color: #bf6725;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.intro-section a:hover {
  color: #d4894a;
}

/* ---- Main / Gallery ---- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.gallery-section h2 {
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Responsive grid: 1 col → 2 col → 3 col */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ---- Product Card ---- */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

/* ---- Card media / carousel wrapper ---- */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--border);
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-media img.active {
  opacity: 1;
}

/* Single-image cards: no absolute positioning needed */
.card-media:not(.carousel) img {
  position: relative;
  opacity: 1;
}

/* Prev / Next arrow buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.carousel-btn.prev { left: 0.4rem; }
.carousel-btn.next { right: 0.4rem; }

.card-media:hover .carousel-btn,
.card-media:focus-within .carousel-btn,
.product-section-media:hover .carousel-btn,
.product-section-media:focus-within .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Dot indicators */
.carousel-dots {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s ease;
}

.dot.active {
  background: #fff;
}

/* Placeholder shown when image is missing */
.product-card .img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.card-body {
  padding: 1rem 1.1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-body h3 {
  font-size: 1.05rem;
  color: var(--brown);
}

.card-body p {
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Loading / Error states ---- */
.loading, .error-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
  font-style: italic;
}

.error-msg {
  color: var(--red);
}

/* ---- Products page ---- */
.products-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.products-main h2 {
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.product-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
  scroll-margin-top: 1.5rem;
}

.product-section-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--border);
  border-radius: var(--radius);
}

.product-section-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-section-media img.active {
  opacity: 1;
}

.product-section-media:not(.carousel) img {
  position: relative;
  opacity: 1;
}

.product-section-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.product-section-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  color: var(--brown);
}

.product-section-body p {
  color: var(--text);
  line-height: 1.75;
}

.product-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 4rem;
}

@media (max-width: 700px) {
  .product-section {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ---- About page ---- */
.about-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.about-main h2 {
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.about-intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

.about-body {
  display: block;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

.about-body p {
  margin-bottom: 1rem;
}

.about-img-float {
  float: right;
  width: 260px;
  margin: 0 0 1.25rem 2rem;
}

.about-img-float img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.about-img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--border);
  border: 2px dashed #c5bfbb;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.about-img-float figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin-top: 0.4rem;
}

.about-body::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 560px) {
  .about-img-float {
    float: none;
    width: 100%;
    margin: 0 0 1.25rem 0;
  }
}

.about-cta {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.about-cta a {
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.about-cta a:hover {
  color: var(--red);
}

/* ---- Inquire button on product cards ---- */
.btn-inquire {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 1rem;
  background: var(--red-dark);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: var(--radius);
  font-family: 'Source Sans 3', sans-serif;
  transition: background 0.15s ease;
  align-self: flex-start;
}

.btn-inquire:hover {
  background: var(--red);
}

/* ---- Site navigation ---- */
nav {
  background: #414535;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

nav a {
  color: #a9b192;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 0.45rem 1.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: inline-block;
}

nav a:hover {
  color: #EDE8DC;
  border-bottom-color: transparent;
  background: rgba(255, 255, 255, 0.04);
}

nav a.active {
  color: #b07b53;
  border-bottom-color: #b07b53;
  background: rgba(255, 255, 255, 0.04);
}

/* ---- Inquiry page layout ---- */
.inquiry-main {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.inquiry-main h2 {
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.inquiry-intro {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ---- How it works ---- */
.how-it-works {
  margin-bottom: 2rem;
}

.how-it-works h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.steps {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.step {
  flex: 1;
  display: flex;
  gap: 0.75rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #152616;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-body strong {
  display: block;
  font-size: 0.95rem;
  color: var(--brown);
  margin-bottom: 0.3rem;
}

.step-body p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 600px) {
  .steps {
    flex-direction: column;
  }
}

/* ---- Form fieldsets ---- */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--cream);
}

legend {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--brown);
  padding: 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.9rem;
}

.field:first-of-type {
  margin-top: 0.5rem;
}

.field-row {
  display: grid;
  gap: 1rem;
  margin-top: 0.9rem;
}

.field-row .field {
  margin-top: 0;
}

.field-row.two-col {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 520px) {
  .field-row.two-col {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: bold;
}

.req {
  color: var(--red);
}

.optional {
  color: var(--muted);
  font-weight: normal;
  font-size: 0.82rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid #a8a29e;
  border-radius: var(--radius);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: #ffffff !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(92, 61, 46, 0.12);
}

input[type="file"] {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

textarea {
  resize: vertical;
}

/* ---- Radio group ---- */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-top: 0.3rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: normal;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ---- Submit button ---- */
.form-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.btn-submit {
  padding: 0.65rem 2rem;
  background: var(--red-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-submit:hover:not(:disabled) {
  background: var(--red);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---- Form status messages ---- */
.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.form-status.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ---- Mobile header ---- */
@media (max-width: 700px) {
  .header-inner {
    padding: 1rem 1rem 0.75rem;
  }

  .site-logo {
    height: 60px;
  }

  header h1 {
    font-size: 1.3rem;
  }

  .nav-inner {
    padding: 0 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }
}

/* ---- Footer ---- */
footer {
  background: #152616;
  color: #d6c5b7;
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.footer-social a {
  color: #d6c5b7;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-social a:hover {
  color: #fff;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}
