/* shared.css - styled to match the Figma wireframes */
:root {
  --bg: #f5f6f7;
  --muted: #e9ebee;
  --terracotta: #A04000;
  --nav-text: #33373a;
  --accent: #0b1220;
  --card: #ffffff;
  --maxw: 1200px;
  --gap: 24px;
}

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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--nav-text);
  line-height: 1.6;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px;
}

.topbar {
  background: transparent;
  border-bottom: 1px solid rgba(11, 18, 32, 0.04);
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.logo {
  display: flex;
  align-items: flex-start;
  font-weight: 700;
  border: 1px solid rgba(11, 18, 32, 0.08);
  padding: 8px 10px;
  background: white;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 8px 6px;
  font-size: 15px;
}

.nav-links a.active {
  border-bottom: 3px solid var(--accent);
  padding-bottom: 5px;
}

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 20px;
  text-align: center;
  display: flex;
  align-items: center;
  min-height: 320px;
  color: white
}

.hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(0.02) contrast(.95);
  opacity: 0.85;
  transform: scale(1.03);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(6, 10, 18, 0.38), rgba(6, 10, 18, 0.38));
  pointer-events: none
}

.hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px
}

.hero .hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer
}

.hero .hero-prev {
  left: 18px
}

.hero .hero-next {
  right: 18px
}

.hero .hero-nav:focus {
  outline: 2px solid rgba(255, 255, 255, 0.25)
}

.hero .hero-nav:hover {
  background: rgba(0, 0, 0, 0.6)
}

/* slide elements: full-bleed slides that sit behind content */
.hero .slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: none
}

.hero .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

/* small screens: reduce nav button size */
@media(max-width:600px) {
  .hero .hero-nav {
    width: 36px;
    height: 36px;
    font-size: 20px
  }

  .hero h1 {
    font-size: 22px
  }
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25)
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 18px;
  font-size: 18px
}

.cta {
  background: var(--accent);
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block
}

/* three cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(11, 18, 32, 0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(11, 18, 32, 0.05);
}

.card .img {
  background: #e6e8ea;
  height: 200px;
  overflow: hidden;
  display: block
}

.card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px
}

.card .card-body {
  padding: 18px;
  background: var(--card)
}

.card .card-body h3 {
  font-size: 19px;
  margin-bottom: 8px;
  color: #111
}

.card .card-body p {
  color: #555;
  margin-bottom: 12px
}

.card .card-body .btn {
  background: white;
  border: 1px solid rgba(11, 18, 32, 0.08);
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--accent)
}

/* process */
.process {
  background: transparent;
  padding: 40px 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
}

@media(min-width:900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card .img {
    height: 260px;
  }
}

@media(max-width:420px) {
  .card .img {
    height: 150px
  }

  .hero h1 {
    font-size: 20px
  }
}

/* process images inside cards: make container and image heights match to avoid gaps */
.process .card .img {
  height: 120px;
  overflow: hidden;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px
}

.process .card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.process .card .card-body {
  padding: 14px
}

.process .card .card-body strong {
  display: block;
  margin-bottom: 6px;
  color: #111
}

.process .card .card-body p {
  color: #555;
  margin: 0
}

@media(min-width:900px) {
  .process .card .img {
    height: 140px
  }
}

/* map & contact */
.map-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 40px 0;
}

.map {
  background: #e6e8ea;
  border-radius: 6px;
  border: 1px solid rgba(11, 18, 32, 0.04);
  overflow: hidden
}

.map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block
}

@media(min-width:900px) {
  .map iframe {
    height: 300px
  }
}

.contact-box {
  background: white;
  border: 1px solid rgba(11, 18, 32, 0.04);
  padding: 18px;
  border-radius: 6px;
}

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

/* gallery grid */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media(min-width:700px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width:1100px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product {
  background: white;
  border: 1px solid rgba(11, 18, 32, 0.05);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product .pimg {
  height: 220px;
  background: #e6e8ea;
  overflow: hidden;
  display: block
}

.product .pimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.product .pinfo {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.price {
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.add-btn {
  background: var(--accent);
  color: white;
  padding: 10px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* form */
.form-card {
  background: white;
  border: 1px solid rgba(11, 18, 32, 0.04);
  padding: 20px;
  border-radius: 6px;
}

.form input, .form textarea, .form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 12px;
}

/* footer */
footer {
  background: #fafbfc;
  padding: 40px 20px;
  margin-top: 40px;
  border-top: 1px solid rgba(11, 18, 32, 0.04);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start
}

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

.footer-grid a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

/* small helpers */
.section-title {
  text-align: center;
  margin-bottom: 18px;
  color: #333;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

/* History timeline for Meet the Potters */
.history-card {
  background: linear-gradient(180deg, #fff, #fbfbfd);
  border-radius: 8px
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 12px 0
}

.timeline li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(11, 18, 32, 0.04)
}

.timeline li:last-child {
  border-bottom: 0
}

.timeline .year {
  flex: 0 0 86px;
  background: #f3f4f6;
  color: #333;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 700;
  text-align: center
}

.timeline p {
  margin: 0;
  color: #555
}



/* Sticky mobile header, slide-in menu and hamburger animation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
}


.mobile-logo-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slide-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background: #fff;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.12);
  transition: right .35s ease;
  z-index: 1000;
  padding: 20px;
  overflow: auto;
}

.slide-menu.open {
  left: 0;
}

.slide-menu a {
  display: block;
  padding: 12px 8px;
  color: var(--nav-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 18, 32, 0.03);
}

.slide-menu .slide-close {
  position: absolute;
  right: 12px;
  top: 10px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--nav-text);
  cursor: pointer
}

.slide-menu .slide-close:focus {
  outline: 2px solid rgba(11, 18, 32, 0.08);
  border-radius: 6px
}

.hamburger-open .bar1 {
  transform: translateY(5px) rotate(45deg);
}

.hamburger-open .bar2 {
  opacity: 0;
}

.hamburger-open .bar3 {
  transform: translateY(-5px) rotate(-45deg);
}

/* small layout tweaks for logo square on right */
.topnav .logo {
  order: 1;
}

.topnav .nav-links {
  order: 2;
}

@media(max-width:899px) {
  .nav-links {
    display: none !important;
  }

  /* On mobile: show topbar with logo on left and hamburger on right */
  .topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    position: relative;
  }

  .topbar .logo {
    position: static !important;
    order: 1;
    margin-right: auto;
    z-index: 999;
  }

  .mobile-hamburger {
    display: flex !important;
  }

  #mobile-hamburger {
    display: flex !important;
    order: 2;
    margin-left: auto;
    z-index: 1000;
  }

  .topnav {
    display: none !important;
  }
}

/* accessible focus outline */
:focus {
  outline: 3px solid rgba(0, 123, 255, 0.15);
  outline-offset: 2px;
}

/* FIXED HAMBURGER (3 bars visible) */
.mobile-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-hamburger .bar {
  width: 22px !important;
  height: 2px !important;
  background-color: #111 !important;
  display: block !important;
  opacity: 1 !important;
  transition: all 0.3s ease;
}

@media(max-width:899px) {
  .mobile-hamburger {
    display: flex !important;
  }
}

/* Hide hamburger on desktop/tablet */
@media (min-width: 900px) {
  .mobile-hamburger {
    display: none !important;
  }

  #mobile-hamburger {
    display: none !important;
  }

  .slide-menu {
    display: none !important;
    /* Prevent accidental desktop display */
  }
}

/* Accessibility helper: screen-reader only */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

/* Better responsive image handling */
img {
  max-width: 100%;
  height: auto;
  display: block
}

/* Hero tweaks: keep hero from getting too tall on small screens and tighten focal point */
.hero {
  padding: 60px 20px;
  min-height: 300px
}

.hero .hero-bg, .hero .slide {
  background-position: center 35%
}

@media(max-width:900px) {
  .hero {
    padding: 44px 14px;
    min-height: 260px
  }

  .hero .hero-bg, .hero .slide {
    background-position: center 20%
  }
}

/* Use aspect-ratio where supported for consistent thumbnail crops */
.product .pimg, .card .img, .process .card .img {
  aspect-ratio: 4/3;
  overflow: hidden
}

.product .pimg img, .card .img img, .process .card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

/* Ensure gallery/product cards scale nicely */
.product {
  min-height: 1px
}

/* Slightly larger hero heading on desktop, tighter on mobile */
@media(min-width:900px) {
  .hero h1 {
    font-size: 40px
  }
}

@media(max-width:480px) {
  .hero h1 {
    font-size: 20px
  }

  .hero p {
    font-size: 15px
  }
}

/* Improve spacing for images in process and cards */
.card .img {
  height: auto
}

@media(min-width:900px) {
  .card .img {
    height: 260px
  }

  /* On desktop: position the logo absolutely at the left edge of the topbar
     and keep nav links on the right. */
  .topbar {
    position: sticky; /* already sticky but ensure relative stacking context */
  }

  .topbar .logo {
    position: absolute;
    left: 18px;
    top: 12px;
    z-index: 1001;
  }

  /* nav area inside container with right-aligned links */
  .container.topnav {
    position: relative;
  }

  .topnav {
    justify-content: flex-end;
  }
}