/*
Theme Name: Roomeys Group
Theme URI: https://roomeys.co.tz
Author: Roomeys Group Limited
Description: Custom theme for Roomeys Group Limited, manufacturer of cheese and mayonnaise products.
Version: 1.0
License: GPL v2 or later
Text Domain: roomeys
*/

:root {
  --cream: #FFFDF7;
  --ink: #1F1B16;
  --muted: #6B6257;
  --gold: #FA6905;
  --gold-dark: #D65600;
  --deep: #14235E;
  --line: #E8E1D4;
  --white: #FFFFFF;
  --radius: 14px;
  --wrap: 1140px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--deep); }

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.22rem; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}

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

.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand { flex-shrink: 0; }
.brand img,
.brand .custom-logo,
.custom-logo-link img { height: 44px !important; width: auto !important; max-width: 190px !important; max-height: 44px !important; object-fit: contain; display: block; }
.custom-logo-link { display: inline-flex; align-items: center; line-height: 0; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.brand-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-sub { font-size: .74rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  color: var(--ink);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  padding: 9px 14px;
  border-radius: 9px;
  display: block;
}

.site-nav a:hover { background: #F6F1E6; }
.site-nav .current-menu-item > a { color: var(--gold-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: .97rem;
  transition: transform .15s ease, background .15s ease;
}

.btn:hover { background: var(--gold-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover { background: #F6F1E6; border-color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #FFFDF7 0%, #FBF3E2 100%);
  padding: clamp(56px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 52px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: rgba(250, 105, 5, .14);
  color: var(--gold-dark);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero p.lead {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 30rem;
  margin-bottom: 30px;
}

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

.hero-media img {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(31, 27, 22, .13);
  width: 100%;
  /* contain, not cover: product packs are often portrait and must not be
     cropped at the top and bottom. The tinted ground fills the leftover space. */
  max-height: 520px;
  object-fit: contain;
  background: #F3EEE2;
  margin-inline: auto;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 88px) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }

.section-head { text-align: center; max-width: 34rem; margin: 0 auto 46px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Product cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(31, 27, 22, .1);
}

.card-media {
  aspect-ratio: 4 / 3;
  background: #F3EEE2;
  overflow: hidden;
}

/* contain so portrait product packs keep their full label */
.card-media img { width: 100%; height: 100%; object-fit: contain; }

.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-body p { color: var(--muted); margin: 0 0 16px; font-size: .96rem; flex: 1; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--deep);
  background: rgba(20, 35, 94, .08);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
  align-self: flex-start;
}

/* ---------- Feature strip ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 26px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(250, 105, 5, .14);
  color: var(--gold-dark);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.feature-icon svg { width: 24px; height: 24px; }

.feature h3 { font-size: 1.06rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- Split / about ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.split img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--deep);
  color: #fff;
  padding: clamp(48px, 6vw, 72px) 0;
  text-align: center;
}

.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .8); max-width: 32rem; margin: 0 auto 26px; }

/* ---------- Content pages ---------- */
.page-hero {
  background: linear-gradient(160deg, #FFFDF7, #FBF3E2);
  padding: clamp(44px, 6vw, 70px) 0;
  border-bottom: 1px solid var(--line);
}

.entry { padding: clamp(44px, 6vw, 72px) 0; }
.entry-content { max-width: 45rem; }
.entry-content img { border-radius: var(--radius); margin: 1.6em 0; }
.entry-content h2 { margin-top: 1.6em; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.contact-card a { color: var(--deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: #221E19;
  color: rgba(255, 255, 255, .72);
  padding: 52px 0 26px;
  font-size: .93rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 34px;
}

.site-footer h4 {
  color: #fff;
  font-size: .8rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.site-footer a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }

.foot-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.foot-brand .brand-name { color: #fff; }

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .87rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 34px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 12px 22px 18px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .07);
  }

  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 10px; }
}

/* ---------- Where to buy (regional distributors) ---------- */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin: 1.6em 0 0;
}

.region-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.region-card h3 {
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--deep);
}

.region-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.region-card li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: .95rem;
}

.region-card li:first-child { border-top: 0; padding-top: 0; }

.region-card li span { color: var(--ink); }
.region-card li a { color: var(--deep); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Footer logo (replaces the R mark when a custom logo is set) */
.foot-logo {
  height: 46px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

/* ---------- Share buttons ---------- */
.share {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 45rem;
}
.share-label {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .8rem;
  color: var(--ink);
}
.share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: transform .15s ease, opacity .15s ease;
}
.share-btn:hover { transform: translateY(-1px); opacity: .92; }
.share-btn svg { flex-shrink: 0; }
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-x { background: #000; }

@media (max-width: 480px) {
  .share-btns { flex-direction: column; align-items: stretch; }
  .share-btn { justify-content: center; }
}
