/* ============================================================
   pkaZ Flower Shop — stylesheet
   Palette pulled from the hero image: warm blush, peach,
   coral, soft sage. Display face: Cormorant Garamond (airy,
   floral, editorial). Body/UI face: Jost (clean, modern).
   ============================================================ */

:root {
  --plum:        #6e4a6b;   /* deep heading / logo text on light */
  --coral:       #e0879c;   /* primary accent — buttons, links */
  --coral-deep:  #c96a82;   /* hover */
  --peach:       #f6d9c8;   /* warm panels */
  --blush:       #f7ecec;   /* page background */
  --cream:       #fbf4ec;   /* alt panel */
  --sage:        #8a9a7b;   /* botanical green accent */
  --ink:         #3a2433;   /* body text */
  --muted:       #8d7783;   /* secondary text */
  --white:       #ffffff;
  --line:        #ecd9d9;   /* hairline borders */
  --nav-h:       74px;
  --radius:      14px;
  --shadow:      0 10px 40px rgba(110, 74, 107, 0.12);
  --shadow-sm:   0 4px 18px rgba(110, 74, 107, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', system-ui, sans-serif;
  background: var(--blush);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--plum);
}

a { color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------------- NAVBAR ---------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(251, 244, 236, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "TAN - PEARL", 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--plum);
  letter-spacing: 1px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo img { width: 34px; height: 34px; object-fit: contain; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.nav-links a:hover { background: var(--peach); color: var(--plum); }
.nav-links a.active { background: var(--coral); color: var(--white); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--plum); background: var(--white);
  transition: background .2s, color .2s, transform .2s;
  font-size: 15px;
}
.icon-btn:hover { background: var(--coral); color: var(--white); transform: translateY(-2px); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border: none; border-radius: 999px;
  background: var(--coral); color: var(--white);
  font-family: 'Jost', sans-serif;
  font-weight: 600; font-size: 14px; letter-spacing: .5px;
  cursor: pointer; text-decoration: none;
  transition: background .25s, transform .2s;
}
.btn:hover { background: var(--coral-deep); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--plum); border: 1px solid var(--coral); }
.btn.ghost:hover { background: var(--coral); color: var(--white); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.danger { background: #c75c5c; }
.btn.danger:hover { background: #a94444; }

.user-pill {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--plum); font-weight: 600;
  padding-left: 6px;
}

/* ---------------- HERO ---------------- */
.hero {
  min-height: calc(86vh - var(--nav-h));
  background-image: linear-gradient(rgba(247,236,236,.15), rgba(247,236,236,.45)),
                    url("../images/image.png");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 4px;
  font-size: 13px; color: var(--coral-deep); font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.02;
  color: var(--plum);
  font-weight: 600;
}
.hero h1 em { font-style: italic; color: var(--coral-deep); }
.hero p {
  margin: 22px 0 32px;
  font-size: 19px; color: var(--ink);
  max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------------- SECTIONS ---------------- */
.section { padding: 80px 0; }
.section.alt { background: var(--cream); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head .eyebrow {
  text-transform: uppercase; letter-spacing: 3px;
  font-size: 12px; color: var(--coral-deep); font-weight: 600;
}
.section-head h2 { font-size: clamp(32px, 4vw, 46px); margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 16px; }

/* ---------------- PRODUCT GRID ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-img {
  height: 210px;
  background: linear-gradient(135deg, var(--peach), var(--blush));
  display: flex; align-items: center; justify-content: center;
  color: var(--coral); font-size: 46px;
  background-size: cover; background-position: center;
}
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .cat {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--sage); font-weight: 600;
}
.card h3 { font-size: 22px; color: var(--plum); line-height: 1.15; }
.card .desc { font-size: 14px; color: var(--muted); flex: 1; }
.card .price-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.card .price { font-size: 20px; font-weight: 600; color: var(--coral-deep); font-family: 'Cormorant Garamond', serif; }

/* feature tiles (home) */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; }
.feature {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 26px; text-align: center; box-shadow: var(--shadow-sm);
}
.feature .ic {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--peach); color: var(--coral-deep);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.feature h3 { font-size: 24px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---------------- FORMS / PANELS ---------------- */
.panel {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 32px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--plum); margin-bottom: 6px; letter-spacing: .3px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: 'Jost', sans-serif; font-size: 15px; color: var(--ink);
  background: var(--blush);
  transition: border .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--coral); background: var(--white);
}
.field textarea { resize: vertical; min-height: 90px; }

.form-msg { font-size: 14px; margin-top: 4px; min-height: 20px; }
.form-msg.error { color: #c0392b; }
.form-msg.success { color: var(--sage); }

/* ---------------- MODALS ---------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(58, 36, 51, 0.45);
  backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 2000; padding: 80px 20px 20px;
  opacity: 0; transition: opacity .25s;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal {
  background: var(--white); border-radius: 18px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
  transform: translateY(-12px); transition: transform .25s;
  overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-head {
  padding: 26px 28px 0; display: flex;
  align-items: flex-start; justify-content: space-between;
}
.modal-head h2 { font-size: 30px; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.modal-close {
  background: none; border: none; font-size: 22px;
  color: var(--muted); cursor: pointer; line-height: 1;
}
.modal-body { padding: 18px 28px 28px; }
.modal-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: var(--blush); padding: 5px; border-radius: 999px; }
.modal-tab {
  flex: 1; text-align: center; padding: 9px;
  border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--muted); border: none; background: none; transition: .2s;
}
.modal-tab.active { background: var(--white); color: var(--plum); box-shadow: var(--shadow-sm); }
.modal .btn { width: 100%; justify-content: center; margin-top: 6px; }
.modal-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }

/* search modal */
.search-box { position: relative; }
.search-box input {
  width: 100%; padding: 16px 18px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--blush);
}
.search-box input:focus { outline: none; border-color: var(--coral); background:#fff; }
.search-results { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: var(--ink); transition: background .15s;
}
.search-item:hover { background: var(--blush); }
.search-item .thumb {
  width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--peach), var(--blush));
  display: flex; align-items: center; justify-content: center; color: var(--coral);
  background-size: cover; background-position: center;
}
.search-item .si-name { font-weight: 600; color: var(--plum); }
.search-item .si-meta { font-size: 12px; color: var(--muted); }
.search-item .si-price { margin-left: auto; font-weight: 600; color: var(--coral-deep); }
.search-empty { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }

/* ---------------- ADMIN ---------------- */
.admin-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 12px; align-items: start; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-table th { background: var(--peach); color: var(--plum); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.admin-table tr:last-child td { border-bottom: none; }
.badge { display:inline-block; padding: 3px 10px; border-radius:999px; background: var(--blush); color: var(--sage); font-size:12px; font-weight:600; }

.flash { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; font-size: 14px; }
.flash.ok { background: #eaf3e4; color: #5a7344; }
.flash.err { background: #fbe6e6; color: #b23b3b; }

/* ---------------- CONTACT ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info li { list-style: none; margin-bottom: 20px; display: flex; gap: 14px; align-items: flex-start; }
.contact-info .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--peach); color: var(--coral-deep); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.contact-info h4 { color: var(--plum); font-family: 'Jost'; font-size: 15px; }
.contact-info p { color: var(--muted); font-size: 14px; }

/* ---------------- FOOTER ---------------- */
footer { background: var(--plum); color: #ecdcea; padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { color: var(--white); font-size: 24px; margin-bottom: 14px; }
.footer-grid a.footer-logo { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; text-decoration: none; white-space: nowrap; }
.footer-grid .footer-logo img { width: 34px; height: 34px; object-fit: contain; filter: brightness(0) invert(1); }
.footer-grid .footer-logo h3 { margin-bottom: 0; line-height: 1; transition: color .2s; }
.footer-grid .footer-logo:hover h3 { color: var(--coral); }
.footer-grid h4 { color: var(--white); font-family:'Jost'; font-size: 14px; letter-spacing:1px; text-transform:uppercase; margin-bottom: 14px; }
.footer-grid a { display: block; color: #d8c2d6; text-decoration: none; font-size: 14px; margin-bottom: 9px; transition: color .2s; }
.footer-grid a:hover { color: var(--coral); }
.footer-grid p { color: #d8c2d6; font-size: 14px; }
.footer-bottom { text-align: center; font-size: 13px; color: #b79bb5; border-top: 1px solid #80608a; padding-top: 22px; margin-top: 40px; }

/* cart badge + flash toast */
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--coral); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.flash-toast {
  max-width: 1180px; margin: 14px auto 0; padding: 13px 20px;
  border-radius: 10px; font-size: 14px; text-align: center;
  animation: flashIn .3s ease;
}
.flash-toast.ok { background: #eaf3e4; color: #5a7344; }
.flash-toast.err { background: #fbe6e6; color: #b23b3b; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------- RESPONSIVE ---------------- */

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  width: 40px; height: 40px; min-width: 40px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--white); color: var(--plum);
  cursor: pointer; font-size: 16px; line-height: 1;
  align-items: center; justify-content: center;
}
.nav-toggle::before { content: "\2630"; }          /* ☰ fallback if icon font is slow */
.nav-toggle i { display: none; }                    /* hide FA icon; the glyph above is enough */
.nav-toggle.open::before { content: "\2715"; }      /* ✕ when open */

/* tablets and below */
@media (max-width: 900px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr !important; }
}

/* phones — switch the nav to a slide-down menu */
@media (max-width: 760px) {
  .navbar { padding: 0 16px; gap: 8px; }
  .nav-toggle { display: flex; order: 3; }
  .nav-actions { order: 2; gap: 8px; margin-left: auto; }
  .logo { order: 1; }

  .nav-links {
    order: 4;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    z-index: 1001;
    flex-direction: column;
    gap: 4px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; width: 100%; padding: 13px 16px; }

  .nav-actions .btn.small,
  .nav-actions .user-pill { font-size: 13px; }

  .hero h1 { font-size: clamp(36px, 11vw, 56px); }
  .hero p { font-size: 17px; }

  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .product-grid, .feature-grid { gap: 18px; }
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .modal { max-width: 100%; }
  .modal-overlay { padding: 60px 14px 14px; }
}

/* small phones */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .navbar { padding: 0 14px; }
  .logo { font-size: 22px; }
  .logo img { width: 28px; height: 28px; }
  .hero h1 { font-size: clamp(30px, 12vw, 44px); }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  /* hide the username text on tiny screens to save room, keep logout */
  .user-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
