:root {
  --ink: #1a1a1a;
  --navy: #0e1b4d;
  --cadbury-purple: #3d0c57;
  --paper: #faf8f5;
  --accent: #1f6f4a;
  --accent-dark: #14502f;
  --whatsapp: #25d366;
  --border: #e2ddd4;
  --muted: #6b6459;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; }

.announcement-bar {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 1rem;
  transition: opacity 0.4s ease;
}

header.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  row-gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--cadbury-purple);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

header.site-header .logo {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  text-align: center;
}

nav.main-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

nav.main-nav > a {
  text-decoration: none;
  color: #eee;
  font-size: 0.95rem;
}

nav.main-nav > a:hover { color: var(--whatsapp); }

.cart-icon {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.cart-badge {
  display: none;
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--whatsapp);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  min-width: 1rem;
  text-align: center;
  line-height: 1.3;
}

.nav-item {
  position: relative;
}

.nav-trigger {
  background: none;
  border: none;
  color: #eee;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem 0;
}

.nav-trigger:hover,
.nav-item:hover .nav-trigger,
.nav-item:focus-within .nav-trigger {
  color: var(--whatsapp);
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0;
  min-width: 190px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  z-index: 60;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropdown a:hover { background: var(--paper); }

.hero {
  background:
    linear-gradient(rgba(30, 7, 43, 0.6), rgba(15, 3, 22, 0.78)),
    url("hero-images/embroidery-machine-hero.jpg") center/cover no-repeat;
  text-align: center;
  padding: 3rem 1.5rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 700px) {
  .hero { min-height: 320px; }
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: #fff;
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero p {
  color: #ede4f2;
  font-size: 1.05rem;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--whatsapp);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1.25rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.whatsapp-btn:hover { background: #1ebe5a; }

.portfolio-strip {
  padding: 2.5rem 1.5rem 0.5rem;
  text-align: center;
}

.portfolio-strip h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.portfolio-track-wrap {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.portfolio-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: portfolio-scroll 50s linear infinite;
}

.portfolio-track-wrap:hover .portfolio-track {
  animation-play-state: paused;
}

.portfolio-track img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

@keyframes portfolio-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-track { animation: none; }
  .portfolio-track-wrap { overflow-x: auto; }
}

@media (max-width: 600px) {
  .portfolio-track img { width: 110px; height: 110px; }
}

.whatsapp-btn--large {
  padding: 1.1rem 2rem;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
  width: 100%;
  justify-content: center;
}

.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.add-to-cart-btn:hover { background: var(--accent); color: #fff; }

section.services {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.service-card h3 { margin-top: 0; }

.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.info-strip .box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}

.info-strip .box img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.info-strip .box .box-text {
  padding: 1.25rem;
}

.info-strip .box h4 { margin: 0 0 0.5rem; color: var(--accent-dark); }

.service-card .icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

section.popular {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  justify-content: start;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Homepage "Popular Items" strip only — smaller tiles so six fit on one row */
.product-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(130px, 150px));
  justify-content: center;
  gap: 0.75rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #eee;
}

.product-card .label {
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.product-card .price {
  padding: 0 0.75rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-grid--compact .product-card .label {
  padding: 0.6rem 0.6rem 0.15rem;
  font-size: 0.8rem;
  line-height: 1.25;
}

.product-grid--compact .product-card .price {
  padding: 0 0.6rem 0.6rem;
  font-size: 0.78rem;
}

footer.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.legal-links {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.legal-links a {
  color: var(--muted);
  text-decoration: underline;
}

.legal-links a:hover { color: var(--accent-dark); }

/* Product page */
.product-page {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 720px) {
  .product-page { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  header.site-header .logo {
    grid-column: 1 / -1;
    font-size: 1.15rem;
  }

  .cart-icon {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
  }

  nav.main-nav { grid-row: 2; }
}

.product-image img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.product-details h1 { margin-bottom: 0.25rem; }

.product-details .code {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.product-details .price {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 1rem 0 0.25rem;
}

.size-field {
  margin: 1rem 0;
}

.size-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.size-field select,
.size-field input[type="number"] {
  width: 100%;
  max-width: 220px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}

.sizing-guide-link {
  margin: 0.75rem 0 0;
}

.form-field {
  margin: 1rem 0;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-field select,
.form-field input[type="text"],
.form-field input[type="number"],
.form-field textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

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

.field-hint {
  display: block;
  width: 100%;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.3rem;
}

.min-order-note {
  background: #fff8e6;
  border: 1px solid #f0d98c;
  color: #6b5400;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1rem 0;
}

.sizing-guide-link a {
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.sizing-guide-link a:hover { text-decoration: underline; }

.colour-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
  background-size: cover;
  background-position: center;
}

.swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.product-details ul.specs {
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-category h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-dark);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::before { content: "\2212"; }

.faq-item p {
  margin: 0 0 1rem 1.2rem;
  color: var(--muted);
}

.stat-row {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.stat-row div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
}

.stat-row strong { display: block; color: var(--ink); font-size: 0.95rem; }

.custom-cta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.customise-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cadbury-purple);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(61, 12, 87, 0.3);
}

.customise-btn:hover { background: #2b0840; }

.custom-question {
  text-align: center;
}

.custom-question p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.sample-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.sample-gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.upload-box {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: center;
  background: #fff;
}

.upload-box button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.upload-box button:hover { background: var(--accent-dark); }

.upload-status {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.upload-status.upload-status--error {
  color: #d90000;
  font-weight: 700;
}

.upload-status.upload-status--success {
  color: var(--whatsapp);
  font-weight: 700;
}

.breadcrumb {
  max-width: 1000px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a { text-decoration: none; color: var(--accent-dark); }

/* Cart page */
.cart-page {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.cart-item-qty button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.9rem;
}

.cart-item-qty button:hover { background: var(--paper); }

.cart-item-qty span {
  min-width: 1.2rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item-price {
  font-weight: 700;
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.cart-item-remove:hover { color: #d90000; }

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.cart-summary {
  border-top: 2px solid var(--border);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.clear-cart-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
}

.clear-cart-btn:hover { color: #d90000; }

.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #fff;
  box-shadow: -6px 0 20px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 91;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-drawer-header h3 { margin: 0; }

.cart-drawer-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
}

.cart-drawer-close:hover { color: var(--ink); }

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.cart-drawer-footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

body.cart-drawer-locked { overflow: hidden; }
