/* ===== STEC Defence Munitions - Global Stylesheet ===== */
/* Light theme: white/light-grey background, black text, dark-grey headings.
   Red and green reserved for frame/border accents only. */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }

:root {
  --yellow: #FFD700;
  --yellow-light: #FFF4B8;
  --yellow-dark: #E6B800;
  --green: #0F7B3E;
  --green-dark: #0A5A2C;
  --red: #C8102E;
  --red-dark: #8B0000;
  --text-dark: #000000;
  --white: #ffffff;
  --paper: #ffffff;
  --grey-light: #f2f2f2;
  --grey-mid: #e5e5e5;
  --grey-border: #cccccc;
  --heading-grey: #333333;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    url("backgrounds/hero-sunset-missiles.jpg") center center / cover no-repeat fixed;
  background-color: #1a1208;
  color: #000000;
  min-height: 100vh;
  padding-bottom: 80px;
  line-height: 1.6;
  position: relative;
}

/* Elements above the background */
header,
main,
.watermark {
  position: relative;
  z-index: 1;
}

/* Breadcrumb — subtle grey band with black links */
main > p:first-of-type {
  padding: 8px 14px;
  background: var(--grey-light);
  border-left: 3px solid var(--red);
  color: #000;
  display: inline-block;
  border-radius: 4px;
  margin-bottom: 14px;
}
main > p:first-of-type a { color: var(--green-dark) !important; text-decoration: none; font-weight: 700; }
main > p:first-of-type a:hover { text-decoration: underline; }
main > p:first-of-type span { color: var(--heading-grey) !important; }

/* Global text colours */
main, main p, main li, main td, main th,
main strong, main em, main small, main label, main span, main div {
  color: #000000;
}
main h1, main h2, main h3, main h4, main h5, main h6 { color: var(--heading-grey); }
main a { color: var(--green-dark); }
main a:hover { color: var(--red); }

/* Tables — clean grey rules on white */
main table { color: #000; background: #fff; }
main table td, main table th { border-color: var(--grey-border) !important; }

/* Card surfaces — solid white with grey border and subtle shadow */
.card {
  background: #ffffff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--grey-border);
  border-top: 4px solid var(--green);
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.art-card {
  background: #ffffff !important;
  backdrop-filter: none;
  color: #000;
  border: 1px solid var(--grey-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.art-card:hover { border-color: var(--red); }
.art-card h3 { color: var(--heading-grey) !important; }
.art-card .art-code { color: var(--heading-grey) !important; }
.art-card .art-desc { color: #333 !important; }
.art-card .art-more { color: var(--red) !important; font-weight: 700; }
/* Legacy override retained (light-theme colour swap for any inline red spans) */
main span[style*="color:var(--red)"],
main span[style*="color: var(--red)"] { color: var(--red) !important; }
.category-card {
  background: #ffffff !important;
  backdrop-filter: none;
  color: #000;
  border: 1px solid var(--grey-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.category-card:hover { border-color: var(--green); }
.category-card h3 { color: var(--heading-grey) !important; }


/* ===== HEADER / NAV ===== */
header {
  background: #ffffff;
  color: var(--heading-grey);
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 4px solid var(--red);
  border-bottom: 4px solid var(--green);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--red);
  letter-spacing: 1px;
}

.logo span { color: var(--heading-grey); }

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  color: var(--heading-grey);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s;
  display: block;
  border: 1px solid transparent;
}

nav a:hover, nav a.active {
  background: var(--grey-light);
  color: var(--red);
  border: 1px solid var(--green);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: #ffffff;
  color: var(--heading-grey);
  border: 1px solid var(--green);
  padding: 8px 14px;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.menu-toggle:hover { background: var(--grey-light); color: var(--red); }

/* ===== MAIN CONTENT ===== */
main {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.page-title {
  background: var(--red);
  color: var(--white);
  padding: 15px 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 8px solid var(--yellow);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.card {
  background: var(--paper);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 25px;
  border-top: 5px solid var(--green);
}

.card h2 { color: var(--green-dark); margin-bottom: 12px; }
.card h3 { color: var(--green-dark); margin: 15px 0 8px; }
.card p { margin-bottom: 10px; }
.card ul { margin: 8px 0 14px 25px; }
.card ul li { padding: 3px 0; line-height: 1.5; }

/* ===== HOMEPAGE HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 50px 30px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 30px;
  border: 4px solid var(--yellow);
}
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; color: var(--yellow); }
.hero p { font-size: 1.15rem; max-width: 800px; margin: 0 auto; }

/* ===== GALLERY ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}
.gallery-item {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  font-weight: bold;
  text-align: center;
  padding: 10px;
  transition: transform 0.2s;
  cursor: pointer;
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow));
}
.gallery-item:hover { transform: scale(1.03); border-color: var(--red); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Watermark label overlaid on gallery images */
.gallery-item .wm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.75), 0 0 20px rgba(0,0,0,0.5);
  pointer-events: none;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  backdrop-filter: blur(1px);
  white-space: nowrap;
}
@media (max-width: 768px) {
  .gallery-item .wm { font-size: 1.05rem; letter-spacing: 1px; padding: 6px 12px; }
}

/* ===== PRODUCT TABLE ===== */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.product-table th {
  background: var(--green);
  color: var(--white);
  padding: 14px;
  text-align: left;
}
.product-table td {
  padding: 14px;
  border-bottom: 1px solid #eee;
}
.product-table tr:hover td { background: var(--yellow-light); }
.product-table a {
  color: #FFD700;
  font-weight: bold;
  text-decoration: none;
}
.product-table a:hover { text-decoration: underline; }

.category-card {
  display: block;
  background: var(--paper);
  border: 3px solid var(--green);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--green-dark);
  text-decoration: none;
  transition: all 0.2s;
}
.category-card:hover {
  border-color: var(--red);
  background: var(--yellow-light);
  transform: translateY(-4px);
}
.category-card .thumb {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  height: 140px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 12px;
  overflow: hidden;
}
.category-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* ===== PRODUCT LIST (subpages) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.product-item {
  background: var(--paper);
  border-radius: 8px;
  padding: 15px;
  border: 2px solid var(--yellow-dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.product-item .p-img {
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow));
  height: 160px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  font-weight: bold;
  margin-bottom: 10px;
}
.product-item h4 { color: #FFD700; margin-bottom: 6px; }
.product-item p { font-size: 0.9rem; color: #555; }

/* ===== CONTACT FORM ===== */
.contact-form label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--green-dark);
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--green);
  border-radius: 6px;
  margin-top: 5px;
  font-family: inherit;
  font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--red);
}
.contact-form button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s;
}
.contact-form button:hover { background: var(--red-dark); }

/* ===== SOCIAL / EXTERNAL LINKS ===== */
.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.social-links a:hover { background: var(--red); }

.whatsapp-link {
  background: #25D366 !important;
}

/* ===== CUSTOMERS / FLAGS ===== */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}
.customer-item {
  background: var(--paper);
  border: 2px solid var(--yellow-dark);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s;
}
.customer-item:hover { transform: translateY(-3px); border-color: var(--red); }
.flag {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}
.customer-item .country-name {
  font-weight: 600;
  color: var(--green-dark);
}

/* ===== PDF EMBED ===== */
.pdf-container {
  margin-top: 20px;
  border: 3px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
}
.pdf-container iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}
.pdf-fallback {
  padding: 20px;
  text-align: center;
  background: var(--yellow-light);
}
.pdf-fallback a {
  color: #FFD700;
  font-weight: bold;
}

/* ===== WATERMARK ===== */
.watermark {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 12px;
  background: #ffffff;
  color: var(--heading-grey);
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 0.9rem;
  border-top: 3px solid var(--green);
  border-bottom: 3px solid var(--red);
  z-index: 50;
}

/* ===== MOBILE RESPONSIVE ===== */

/* Tablet / small desktop (≤ 900px) */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  main { padding: 0 15px; }
  .hero { padding: 35px 20px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
}

/* Standard mobile (≤ 768px) */
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }  /* prevent iOS zoom on rotate */
  body { padding-bottom: 70px; font-size: 15px; }

  /* --- Header / nav --- */
  header { padding: 12px 15px; position: sticky; }
  .header-inner { justify-content: space-between; }
  .menu-toggle { display: block; }
  nav {
    width: 100%;
    order: 3;  /* push nav below logo + toggle when open */
  }
  nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 10px;
    gap: 4px;
  }
  nav ul.open { display: flex; }
  nav a {
    text-align: center;
    padding: 12px 16px;  /* larger tap target */
    font-size: 1rem;
    border-radius: 6px;
  }

  /* --- Typography --- */
  .hero h1 { font-size: 1.7rem; letter-spacing: -0.5px; }
  .hero { padding: 28px 18px; }
  .hero p { font-size: 0.95rem; }
  .page-title { padding: 12px 15px; margin-bottom: 18px; }
  .page-title h1 { font-size: 1.35rem; }
  .card { padding: 18px 15px; margin-bottom: 18px; }
  .card h2 { font-size: 1.25rem; }
  .card h3 { font-size: 1.05rem; }
  main { margin: 15px auto; padding: 0 12px; }

  /* --- Grids --- */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item .wm { font-size: 1rem; letter-spacing: 1px; padding: 6px 12px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .category-card { padding: 15px; }
  .category-card .thumb { height: 110px; font-size: 2.5rem; }
  .product-grid { grid-template-columns: 1fr; gap: 15px; }

  /* --- Product-listing card (category pages) --- */
  .art-card .art-img { height: 180px; }

  /* --- Tables --- */
  /* Wrap tables in a horizontally-scrolling container class */
  .product-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .product-table th, .product-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
    white-space: normal;
  }
  /* Spec tables inside product pages — allow wrapping and shrink font */
  .card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.88rem;
  }
  .card table td { padding: 7px 6px !important; }

  /* --- PDF iframes --- */
  .pdf-container iframe {
    height: 420px;
  }

  /* --- Contact form --- */
  .contact-form input,
  .contact-form textarea {
    font-size: 16px;  /* prevents iOS zoom on focus */
    padding: 12px;
  }
  .contact-form button {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
  }

  /* --- Social links --- */
  .social-links { gap: 10px; }
  .social-links a {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px 12px;
    min-width: 130px;
  }

  /* --- Customers / flags --- */
  .customer-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .customer-item { padding: 10px 5px; }
  .flag { font-size: 2rem; }
  .customer-item .country-name { font-size: 0.8rem; }

  /* --- Prev / Next navigation on product pages --- */
  .card[style*="justify-content:space-between"] {
    flex-direction: column;
    text-align: center;
  }

  /* --- Watermark --- */
  .watermark {
    padding: 9px;
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  /* --- Breadcrumbs --- */
  main > p:first-of-type { font-size: 0.85rem; word-break: break-word; }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
  body { font-size: 14px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item { aspect-ratio: 16/9; }
  .category-grid { grid-template-columns: 1fr; }
  .logo { font-size: 1rem; }
  .logo span { font-size: 0.9rem; }
  .hero h1 { font-size: 1.45rem; }
  .hero { padding: 22px 15px; }
  .page-title h1 { font-size: 1.15rem; }
  .card h2 { font-size: 1.15rem; }
  .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .pdf-container iframe { height: 360px; }
  .social-links a {
    flex: 1 1 100%;
    min-width: 0;
  }
  .art-card .art-img { height: 160px; }
  .menu-toggle { padding: 6px 10px; font-size: 1rem; }
}

/* ===== LIGHT-THEME INLINE OVERRIDES =====
   Neutralise inline coloured hero/table backgrounds that were set for the old
   dark/gradient themes so the light theme stays consistent site-wide. */

/* Green hero cards on many pages: force to white with green border */
main div[style*="linear-gradient"][style*="var(--green)"],
main div[style*="linear-gradient(135deg, var(--green)"],
main div[style*="linear-gradient(135deg,var(--green)"] {
  background: #ffffff !important;
  color: var(--heading-grey) !important;
  border: 2px solid var(--green) !important;
}
main div[style*="linear-gradient"][style*="var(--green)"] * {
  color: var(--heading-grey) !important;
}

/* Yellow-highlight table rows used in spec tables: use grey highlight instead */
main tr[style*="background:var(--yellow-light)"],
main tr[style*="background: var(--yellow-light)"] {
  background: var(--grey-light) !important;
}

/* Yellow gradient table header cells → dark-grey solid header */
main th[style*="background:var(--green)"],
main tr[style*="background:var(--green)"] th,
main thead tr[style*="background:var(--green)"] {
  background: var(--heading-grey) !important;
  color: #ffffff !important;
}

/* Product-listing "art-img" tiles that were tinted yellow → keep neutral */
.art-img[style*="var(--yellow-light)"],
.art-img[style*="var(--yellow)"] {
  background: var(--grey-light) !important;
}

/* Red "Back to..." buttons on individual product pages: outlined red-border pill */
main a[style*="background:var(--red)"][style*="color:#fff"] {
  background: #ffffff !important;
  color: var(--red) !important;
  border: 2px solid var(--red) !important;
}
main a[style*="background:var(--red)"][style*="color:#fff"]:hover {
  background: var(--red) !important;
  color: #ffffff !important;
}

/* Red-tinted safety notice callouts (#FCEBEB) — keep the soft tint but ensure text is black */
main div[style*="background:#FCEBEB"],
main div[style*="background: #FCEBEB"] {
  background: #fdf1f1 !important;
  color: #000 !important;
}

/* Cream/paper backgrounds on product images: transparent-ish neutral so they blend */
.art-img[style*="background:#F4F0E6"],
.art-img[style*="background: #F4F0E6"] {
  background: var(--grey-light) !important;
}

/* Ensure inline "color:var(--green-dark)" links on white cards remain readable */
main a[style*="color:var(--green-dark)"] { color: var(--green-dark) !important; }

/* PDF fallback / iframe container */
.pdf-container { background: var(--grey-light); border: 1px solid var(--grey-border); }

/* =========================================================
   MOBILE-FIRST ENHANCEMENTS (added Sept 2026)
   Additional safeguards for phone / tablet display quality
   ========================================================= */

/* All images fluid — never overflow container */
img { max-width: 100%; height: auto; }

/* Iframes (embedded PDFs) never overflow horizontally */
iframe { max-width: 100%; }

/* Long words / URLs wrap inside cards on narrow screens */
main p, main li, main td, main th, .card, .art-card { word-wrap: break-word; overflow-wrap: break-word; }

/* Homepage Defence Supply Portfolio pills — mobile friendly */
@media (max-width: 768px) {
  .card ul.portfolio-list {
    gap: 10px !important;
    margin: 12px 0 22px !important;
  }
  .card ul.portfolio-list li {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.2px;
  }
}
@media (max-width: 480px) {
  .card ul.portfolio-list li {
    padding: 9px 16px !important;
    font-size: 0.85rem !important;
  }
}

/* Product photo galleries (tourniquet page etc) stack cleanly */
@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .photo-gallery img { height: 150px !important; }
  .photo-gallery figcaption { font-size: 0.75rem !important; padding: 6px 8px !important; }
  .hero-photo img { max-height: 280px !important; }
}
@media (max-width: 480px) {
  .photo-gallery {
    grid-template-columns: 1fr !important;
  }
  .photo-gallery img { height: 200px !important; }
}

/* Product hero images (single big product photo) sized safely for phones */
@media (max-width: 768px) {
  .card > div[style*="text-align:center"] img,
  .card div[style*="text-align:center"] > img {
    max-height: 350px !important;
  }
}
@media (max-width: 480px) {
  .card > div[style*="text-align:center"] img,
  .card div[style*="text-align:center"] > img {
    max-height: 260px !important;
  }
}

/* Spec tables — force horizontal-scroll only when wider than viewport,
   and keep them touch-scrollable */
@media (max-width: 768px) {
  main table { width: 100% !important; }
  main .card > table,
  main .card table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--grey-border);
  }
  main table th, main table td {
    padding: 8px 6px !important;
    font-size: 0.85rem !important;
    min-width: 120px;
  }
  /* First column often key label - keep it slightly narrower */
  main table td:first-child, main table th:first-child { min-width: 100px; }
}

/* Product-listing Browse-by-Category grid stacks tighter */
@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .category-card { padding: 12px !important; }
  .category-card .thumb { height: 140px !important; }
  .category-card h3 { font-size: 0.95rem !important; }
}

/* Product-listing individual product cards */
@media (max-width: 480px) {
  .art-card .art-img { height: 200px !important; }
  .art-card .art-body { padding: 12px !important; }
  .art-card h3 { font-size: 1rem !important; line-height: 1.3; }
  .art-card .art-desc { font-size: 0.85rem !important; }
}

/* Contact page — customer flags and social links safer */
@media (max-width: 480px) {
  .customer-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .social-links a { padding: 12px 10px !important; font-size: 0.85rem !important; }
}

/* Prev/next navigation cards — stack cleanly on phones */
@media (max-width: 600px) {
  .card[style*="display:flex"][style*="justify-content:space-between"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center;
  }
  .card[style*="display:flex"][style*="justify-content:space-between"] > div {
    width: 100%;
  }
  .card[style*="display:flex"][style*="justify-content:space-between"] a {
    display: inline-block;
    width: 100%;
    padding: 12px 20px !important;
    box-sizing: border-box;
  }
}

/* Breadcrumb chip full-width on phone */
@media (max-width: 600px) {
  main > p:first-of-type {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.85rem;
  }
}

/* Bottom sticky watermark — smaller and safer for iPhone home indicator */
@media (max-width: 480px) {
  .watermark {
    padding: 8px 6px !important;
    font-size: 0.7rem !important;
    letter-spacing: 1px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* PDF iframe sizing on phones — smaller so it doesn't dominate the screen */
@media (max-width: 768px) {
  .pdf-container iframe { height: 380px !important; }
}
@media (max-width: 480px) {
  .pdf-container iframe { height: 320px !important; }
}

/* Header logo shortening on very small screens */
@media (max-width: 400px) {
  .logo { font-size: 0.9rem !important; }
  .logo span { display: none; }  /* "Defence Munitions" hidden on tiny phones */
}

/* Guarantee horizontal scroll never happens on the body */
html, body { max-width: 100%; overflow-x: hidden; }

/* ===== PRODUCT PAGE BACKGROUND =====
   Different backdrop for every page under /products/ — globe + tank + missiles. */
body.product-page {
  background:
    linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
    url("backgrounds/product-globe-tank.jpg") center center / cover no-repeat fixed !important;
  background-color: #2a1408 !important;
}

/* ===== ABOUT PAGE BACKGROUND =====
   Camouflage textile texture for the About Us page. */
body.about-page {
  background:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    url("backgrounds/about-camo.jpg") center center / cover no-repeat fixed !important;
  background-color: #2a3418 !important;
}

/* ===== CONTACT PAGE BACKGROUND =====
   Single cruise-missile silhouette at sunset for the Contact page. */
body.contact-page {
  background:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    url("backgrounds/contact-missile-sunset.jpg") center center / cover no-repeat fixed !important;
  background-color: #2a1a05 !important;
}
