/* css/style.css - Bloom Valley Nursery (Touchstone 2.2) */

/* ---------- Base + Theme ---------- */
:root{
  --green-900:#1f3a2a;
  --green-700:#2f5b3c;
  --green-600:#3a6b45;
  --cream-50:#fbfaf6;
  --cream-100:#f3f0e6;
  --gray-900:#1f2937;
  --gray-700:#374151;
  --border:#d7d2c4;
  --shadow:0 6px 18px rgba(0,0,0,.08);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  color:var(--gray-900);
  background:var(--cream-50);
  line-height:1.6;
}

/* A simple container using existing semantic elements */
header, main, footer{
  width:min(100%, 980px);
  margin:0 auto;
  padding:16px;
}

hr{ border:none; border-top:1px solid var(--border); margin:16px 0; }

/* ---------- Header + Nav ---------- */
header{
  background:linear-gradient(135deg, var(--green-900), var(--green-600));
  color:white;
  border-radius:14px;
  box-shadow:var(--shadow);
  margin-top:16px;
}

header a{ color:white; text-decoration:none; }
header a:hover{ text-decoration:underline; }

header > a img{
  border-radius:10px;
  background: #014038;
  padding:6px;
  margin-right:12px;
}

header > a{
  float: left;
}



header h1{
  margin:10px 0 6px;
  font-size:1.7rem;
  letter-spacing:.3px;
  text-align:center;   /* centers the title */
}


nav[aria-label="Main navigation"]{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;   /* centers nav horizontally */
  align-items:center;
  font-weight:600;
}


/* remove the visual “|” spacing effect a bit */
nav[aria-label="Main navigation"] a{
  padding:6px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.12);
}
nav[aria-label="Main navigation"] a:hover{
  background:rgba(255,255,255,.22);
}

/* ---------- Main Content ---------- */
main{
  background:var(--cream-100);
  border-radius:14px;
  box-shadow:var(--shadow);
  margin:16px auto;
}

section{
  background:white;
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  margin:14px 0;
}

h2{
  margin:0 0 10px;
  color:var(--green-900);
  font-size:1.35rem;
}

p{ margin:0 0 10px; }

ul{ margin:8px 0 0 18px; }
li{ margin:6px 0; }

/* Featured products (figures) */
figure{
  margin:12px 0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--cream-50);
}
figure img{
  max-width:100%;
  height:auto;
  display:block;
  border-radius:12px;
}
figcaption{
  margin-top:8px;
  color:var(--gray-700);
  font-size:.95rem;
}

/* ---------- Buttons ---------- */
button{
  font: inherit;
  cursor:pointer;
  border:none;
  border-radius:12px;
  padding:10px 14px;
  background:var(--green-700);
  color:white;
  box-shadow:0 3px 10px rgba(0,0,0,.12);
}
button:hover{ background:var(--green-600); }
button:focus-visible{
  outline:3px solid #ffd166; /* visible focus */
  outline-offset:3px;
}

/* ---------- Tables (Gallery + Hours) ---------- */
table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  background:white;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}
caption{
  text-align:left;
  padding:10px 12px;
  font-weight:700;
  color:var(--green-900);
  background:var(--cream-50);
  border-bottom:1px solid var(--border);
}
th, td{
  border-bottom:1px solid var(--border);
  padding:12px;
  vertical-align:top;
}
th{
  text-align:left;
  background:var(--cream-50);
  color:var(--green-900);
}
tbody tr:hover{ background:#faf8f1; }

/* Gallery product images */
td img{
  border-radius:10px;
  border:1px solid var(--border);
}

/* ---------- Forms ---------- */
form{
  margin-top:10px;
}
label{
  font-weight:700;
  color:var(--green-900);
}
input, textarea{
  width:min(100%, 560px);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  font: inherit;
  margin-top:6px;
  background:white;
}
textarea{ resize:vertical; }

input:focus, textarea:focus{
  outline:3px solid rgba(47,91,60,.25);
  border-color:var(--green-600);
}

/* Buttons in forms */
form button{
  margin-right:10px;
  margin-top:8px;
}

/* ---------- Footer ---------- */
footer{
  background:var(--green-900);
  color:white;
  border-radius:14px;
  box-shadow:var(--shadow);
  margin:16px auto 18px;
}

footer h2{ color:white; margin:0 0 10px; }
footer a{ color:white; }
footer a:hover{ text-decoration:underline; }

footer section{
  background:transparent;
  border:none;
  padding:0;
  margin:0 0 14px;
}

nav[aria-label="Footer navigation"] a{
  display:inline-block;
  margin:4px 6px 0 0;
  padding:6px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.10);
  text-decoration:none;
}
nav[aria-label="Footer navigation"] a:hover{
  background:rgba(255,255,255,.20);
}

footer p{
  margin:10px 0 0;
  color:rgba(255,255,255,.85);
}

/* ---------- Responsive (RWD) ---------- */
@media (max-width: 700px){
  header, main, footer{
    padding:12px;
  }

  header h1{
    font-size:1.4rem;
  }

  nav[aria-label="Main navigation"]{
    gap:8px;
  }

  th, td{
    padding:10px;
  }

  input, textarea{
    width:100%;
  }
}

/* ===== Modal (Touchstone 3.2) ===== */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  padding:20px;
  z-index:9999;
}

.modal.show{
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal-content{
  width:min(720px, 95vw);
  background:#fff;
  border-radius:14px;
  padding:16px;
  border:1px solid #d7d2c4;
}

.modal-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
