/* public/assets/css/style.css
   Brand palette taken directly from the reference site screenshots:
   dark green header/footer (#0d2818), gold accent (#d4af37), Bangla font. */

:root {
  --gh-primary: #0d2818;
  --gh-accent: #d4af37;
}

body {
  /* No external font CDN - these are all pre-installed system fonts that
     already render Bangla well (Nirmala UI on Windows, Noto Sans Bengali
     on most Linux/Android, system-ui elsewhere), so the design never
     depends on a third-party font host being reachable. */
  font-family: "Nirmala UI", "Noto Sans Bengali", "Segoe UI", system-ui, sans-serif;
  background: #f7f7f5;
  color: #222;
}

/* ---- Navbar ---- */
.gh-navbar {
  background: var(--gh-primary);
  padding: .6rem 0;
}
.gh-logo {
  color: var(--gh-accent) !important;
  font-size: 1.6rem;
  letter-spacing: 1px;
}
.gh-cat-btn, .gh-cat-btn-mobile {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  white-space: nowrap;
}
.gh-cat-btn-mobile {
  background: var(--gh-primary);
  border-radius: 0;
  color: #fff;
  border: none;
  padding: .6rem;
}
.gh-search .form-control {
  border-radius: 6px 0 0 6px;
}
.gh-search-btn {
  background: var(--gh-accent);
  color: #222;
  border-radius: 0 6px 6px 0;
}
.gh-cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  font-size: .65rem;
}

/* ---- Product cards ---- */
.gh-product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .15s ease;
  height: 100%;
}
.gh-product-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.gh-product-thumb {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  display: block;
}
.gh-product-price {
  color: var(--gh-primary);
  font-weight: 700;
}
.gh-order-btn {
  background: var(--gh-accent);
  color: #1a1a1a;
  border: none;
  font-weight: 600;
}
.gh-order-btn:hover { background: #c49b2e; color: #1a1a1a; }

/* ---- Category pills (homepage carousel) ---- */
.gh-cat-pill {
  text-align: center;
  text-decoration: none;
  color: #333;
}
.gh-cat-pill img, .gh-cat-pill .gh-cat-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .4rem;
  font-weight: 700;
  color: var(--gh-primary);
  border: 2px solid var(--gh-accent);
}

/* ---- Section titles ---- */
.gh-section-title {
  text-align: center;
  font-weight: 700;
  margin: 2rem 0 1.2rem;
}

/* ---- Hero slider ---- */
.gh-hero {
  background: var(--gh-primary);
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
}

/* ---- Footer ---- */
.gh-footer {
  background: var(--gh-primary);
  color: #eaeaea;
}
.gh-footer-brand { color: var(--gh-accent); }
.footer-link { color: #cfcfcf; text-decoration: none; }
.footer-link:hover { color: var(--gh-accent); }

/* ---- Checkout / cart ---- */
.gh-checkout-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 1.2rem;
}

/* ---- Order tracking progress stepper (Ordered -> Packed -> In Transit -> Delivered) ---- */
.order-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 1.5rem 0;
}
.order-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.order-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .5rem;
  font-size: 1.4rem;
  background: #d9d9d9;
  color: #fff;
  position: relative;
  z-index: 2;
}
.order-step.done .order-step-icon,
.order-step.current .order-step-icon {
  background: #e0393e; /* matches the reference tracker's red */
}
.order-step-line {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: #d9d9d9;
  z-index: 1;
}
.order-step.done .order-step-line { background: #e0393e; }
.order-step:last-child .order-step-line { display: none; }
.order-step-label {
  font-size: .8rem;
  font-weight: 600;
  color: #555;
}
.order-step.done .order-step-label,
.order-step.current .order-step-label { color: #e0393e; }
.order-cancelled-badge {
  background: #f8d7da;
  color: #842029;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
}

/* =====================================================================
   MOBILE / ANDROID WEBVIEW SUPPORT
   The Android app wraps this site in a WebView, so these rules matter
   even more than on a regular mobile browser: WebView has no browser
   chrome to fall back on, so anything that doesn't fit/scroll/tap
   correctly here is what the app "is" for the user.
   ===================================================================== */

/* Prevent the whole page from scrolling sideways if any one element is
   slightly too wide - a single overflowing element shouldn't be able to
   drag the entire viewport. Nested horizontal-scroll areas (category
   pills, tables) keep their own overflow-x further down. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* WebView/Chrome-mobile shows a gray flash on every tap by default -
   remove it and use our own :active states instead, which feels far
   more like a native app. */
* {
  -webkit-tap-highlight-color: transparent;
}
a, button, .btn, [role="button"] {
  touch-action: manipulation; /* removes the ~300ms tap delay */
}

/* Minimum comfortable touch target size (44px is the standard
   accessibility/Android guideline) for anything meant to be tapped. */
.gh-icons a, .gh-icons button, .navbar-toggler {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dropdown-item, .form-check-input, .btn-close {
  min-height: 30px; /* dropdown rows/checkboxes: smaller but still easy to hit */
}

/* ---- Responsive navbar: on narrow screens the search bar moves to its
   own row below the logo/icons instead of squeezing into one line ---- */
@media (max-width: 575.98px) {
  .gh-navbar .container-fluid {
    flex-wrap: wrap;
  }
  .gh-search {
    order: 3;
    flex-basis: 100%;
    margin: .5rem 0 0 !important;
  }
  .gh-logo { font-size: 1.3rem; }
  .gh-hero h1 { font-size: 1.6rem; }
  .gh-hero .fs-5 { font-size: 1rem !important; }
}

/* ---- Responsive admin sidebar: a fixed 230px column eats too much of a
   360-400px phone screen, so it becomes a horizontal scrollable top bar
   below ~992px instead of a permanent side column. ---- */
@media (max-width: 991.98px) {
  .admin-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    display: flex;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: .5rem !important;
  }
  .admin-sidebar h5 { display: none; } /* saves space on the scrollable bar */
  .admin-sidebar a { display: inline-block; margin-right: .25rem; }
  .admin-sidebar form { display: inline-block; width: auto !important; margin-left: .5rem; }
  .admin-layout { flex-direction: column; }
}

/* Momentum scrolling for horizontal-scroll containers inside a WebView */
.d-flex.overflow-auto {
  -webkit-overflow-scrolling: touch;
}

/* Tables inside cards can overflow a narrow phone screen - scroll the
   table itself rather than breaking the page layout. Apply this class
   to the wrapping <div> around any admin <table>. */
.table-responsive-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bootstrap modals/offcanvas already handle mobile width via their own
   framework CSS (now self-hosted - see "Design assets" note in
   README.md), so no extra overrides are needed there. */

/* Product page action buttons: side-by-side normally, stacked on very
   narrow phones so Bangla button labels don't get cramped/wrapped. */
@media (max-width: 400px) {
  .gh-product-actions {
    flex-direction: column;
  }
}

/* ---- Admin panel ---- */
.admin-sidebar {
  background: var(--gh-primary);
  min-height: 100vh;
}
.admin-sidebar a {
  color: #eaeaea;
  text-decoration: none;
  display: block;
  padding: .6rem 1rem;
  border-radius: 6px;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(212,175,55,.18);
  color: var(--gh-accent);
}

@media (max-width: 991px) {
  .gh-cat-btn { display: none; }
}
