/* ============================================
   DuraCoat Delivery — Stage 1 Styles
   ============================================ */

:root {
  --primary: #1a5f2a;
  --primary-dark: #0f3d1a;
  --accent: #e8a317;
  --danger: #c0392b;
  --text: #1a1a1a;
  --text-muted: #666;
  --bg: #f7f7f5;
  --white: #ffffff;
  --border: #e5e5e5;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- TOP BAR ---------- */
.topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 12.5px;
  padding: 8px 0;
  text-align: center;
}

.topbar .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

/* ---------- HEADER ---------- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (min-width: 640px) {
  .logo-img {
    height: 42px;
  }
}

.nav {
  display: none;
  gap: 24px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  position: relative;
  padding: 4px;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #0f3d1a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.25) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 16px;
  max-width: 600px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.hero-dot.active {
  background: #fff;
  transform: scale(1.25);
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #111;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 12px;
  font-weight: 800;
}

.hero p {
  font-size: 15px;
  opacity: 0.92;
  margin-bottom: 22px;
  max-width: 420px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #111;
}

.btn-primary:hover {
  background: #d4920f;
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
}

.btn-block {
  width: 100%;
}

.btn-add {
  background: var(--primary);
  color: #fff;
  width: 100%;
  padding: 10px;
  font-size: 13.5px;
  margin-top: 10px;
}

.btn-add:hover {
  background: var(--primary-dark);
}

/* ---------- OFFER BANNER ---------- */
.offer-banner {
  background: #fff8e6;
  border-bottom: 1px solid #f0d78c;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
}

.offer-banner strong {
  color: var(--danger);
}

/* ---------- PRODUCTS ---------- */
.products-section {
  padding: 40px 0 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 14.5px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 12px;
  gap: 6px;
}

.ph-initials {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0.95;
  line-height: 1;
}

.ph-label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0.9;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-category {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.price-row {
  margin-top: auto;
}

.price-original {
  font-size: 12.5px;
  color: #999;
  text-decoration: line-through;
  margin-right: 6px;
}

.price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.price-from {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

/* ---------- CART DRAWER ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: var(--white);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

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

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

.cart-header h3 {
  font-size: 18px;
}

.cart-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

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

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.cart-item-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
  margin-top: 4px;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.cart-total {
  font-size: 16px;
  margin-bottom: 12px;
}

.cart-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* ---------- FLOATING BUTTONS ---------- */
.float-btns {
  position: fixed;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.float-btn:active {
  transform: scale(0.92);
}

.float-call {
  background: #fff;
  color: var(--primary);
}

.float-wa {
  background: #25d366;
  color: #fff;
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
  z-index: 300;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ---------- FOOTER ---------- */
.footer {
  background: #111;
  color: #ccc;
  padding: 40px 0 24px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  gap: 28px;
  margin-bottom: 32px;
}

.footer h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 10px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 6px;
}

.footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 12.5px;
  color: #888;
}

.disclaimer {
  margin-top: 8px;
  max-width: 600px;
}

/* ---------- PRODUCT MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--white);
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  position: relative;
  transform: translateY(40px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  padding: 16px;
}

.modal-body {
  padding: 16px 18px 28px;
}

.modal-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.modal-category {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-section {
  margin-bottom: 18px;
}

.modal-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #444;
}

.colour-options,
.pack-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.colour-btn,
.pack-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.colour-btn.active,
.pack-btn.active {
  border-color: var(--primary);
  background: #e8f5e9;
  color: var(--primary);
  font-weight: 600;
}

.colour-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 140px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  background: #f5f5f5;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:first-child {
  border-radius: 8px 0 0 8px;
}

.qty-btn:last-child {
  border-radius: 0 8px 8px 0;
}

#qty-input {
  width: 50px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  -moz-appearance: textfield;
}

#qty-input::-webkit-outer-spin-button,
#qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-price-box {
  background: #f7f7f5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.modal-price-line {
  margin-bottom: 4px;
}

.modal-price-original {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  margin-right: 8px;
}

.modal-price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.modal-price-total {
  font-size: 13.5px;
  color: var(--text-muted);
}

.btn-add-modal {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn-add-modal:hover {
  background: var(--primary-dark);
}

@media (min-width: 500px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-box {
    border-radius: 16px;
    max-height: 88vh;
  }
}

/* ---------- DESKTOP ---------- */
@media (min-width: 640px) {
  .hero h1 {
    font-size: 36px;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .product-name {
    font-size: 14.5px;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

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

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .hero {
    min-height: 440px;
  }
}

/* ---------- SITE FOOTER (dark, Complast-style) ---------- */
.site-footer {
  background: #111;
  color: #b0b0b0;
  padding: 48px 0 0;
  font-size: 14px;
}

.footer-top {
  display: grid;
  gap: 32px;
  padding-bottom: 36px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 12px;
}

.footer-brand p {
  line-height: 1.6;
  max-width: 420px;
  font-size: 13.5px;
}

.footer-cols {
  display: grid;
  gap: 28px;
}

.footer-col h4 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #b0b0b0;
  font-size: 13.5px;
}

.footer-col a:hover {
  color: #e85d04;
}

.footer-col a::before {
  content: "> ";
  color: #e85d04;
  font-size: 11px;
}

.footer-contact a::before {
  content: none;
}

.fc-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 2px;
}

.footer-contact a {
  color: #e85d04;
  font-weight: 600;
}

.footer-contact a:hover {
  color: #ff7a2e;
}

.footer-bottom-bar {
  border-top: 1px solid #2a2a2a;
  padding: 18px 0 24px;
  font-size: 12.5px;
  color: #777;
}

@media (min-width: 700px) {
  .footer-top {
    grid-template-columns: 1.4fr 2fr;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr 1.2fr;
  }
}
