/* ===================================================================
   Houston Pool Products — Main Stylesheet
   =================================================================== */

:root {
  --hpp-blue:         #0077b6;
  --hpp-blue-dark:    #005f92;
  --hpp-teal:         #00b4d8;
  --hpp-light:        #caf0f8;
  --hpp-dark:         #1e3a5f;
  --hpp-sand:         #f8f9fa;
  --hpp-accent:       #48cae4;
  --hpp-pool:         #0096c7;
  --hpp-pool-dark:    #005f92;
  --hpp-pool-light:   #48cae4;
  --hpp-pool-mist:    #e0f7fa;
}

/* ---- Base ---------------------------------------------------------- */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f4f7fb;
  color: #212529;
}

a { color: var(--hpp-blue); }
a:hover { color: var(--hpp-blue-dark); }

/* ---- Navbar -------------------------------------------------------- */
.navbar-hpp {
  background: linear-gradient(135deg, var(--hpp-dark) 0%, var(--hpp-blue) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  padding: .75rem 1rem;
}
.navbar-hpp .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff !important;
}
.navbar-hpp .navbar-brand span { color: #90e0ef; }  /* soft aqua on dark navbar */
.navbar-hpp .nav-link { color: rgba(255,255,255,.88) !important; font-weight: 500; }
.navbar-hpp .nav-link:hover,
.navbar-hpp .nav-link.active { color: #fff !important; }
.navbar-hpp .dropdown-menu {
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  border-radius: .5rem;
}
.cart-badge {
  background: var(--hpp-pool);
  color: #fff;
  border-radius: 50%;
  font-size: .65rem;
  padding: 2px 6px;
  margin-left: 2px;
  font-weight: 700;
}

/* ---- Hero ---------------------------------------------------------- */
.hero-section {
  background: linear-gradient(135deg, var(--hpp-dark) 0%, var(--hpp-blue) 55%, var(--hpp-pool) 100%);
  color: white;
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 60px;
  background: #f4f7fb;
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
}
.hero-section .lead { font-size: 1.2rem; opacity: .9; }

/* ---- Section headings ---------------------------------------------- */
.section-title {
  font-weight: 700;
  color: var(--hpp-dark);
  position: relative;
  padding-bottom: .5rem;
  margin-bottom: 1.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 50px; height: 3px;
  background: linear-gradient(90deg, var(--hpp-pool), var(--hpp-pool-light));
  border-radius: 2px;
}

/* ---- Product cards ------------------------------------------------- */
.product-card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,150,199,.2);
}
.product-card .card-img-top {
  height: 200px;
  object-fit: cover;
  background: #e9f4fb;
}
.product-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--hpp-blue);
}
.product-card .card-title { font-weight: 700; color: var(--hpp-dark); font-size: 1rem; }
.product-card .price { font-size: 1.25rem; font-weight: 800; color: var(--hpp-pool); }
.badge-category {
  font-size: .7rem;
  font-weight: 600;
  padding: .25em .6em;
}

/* ---- Buttons ------------------------------------------------------- */
.btn-hpp {
  background: linear-gradient(135deg, var(--hpp-blue) 0%, var(--hpp-pool) 100%);
  color: white;
  border: none;
  font-weight: 600;
  border-radius: .5rem;
  transition: opacity .2s, transform .1s, box-shadow .2s;
}
.btn-hpp:hover {
  color: white;
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,150,199,.35);
}
.btn-hpp-outline {
  border: 2px solid var(--hpp-pool);
  color: var(--hpp-pool);
  background: transparent;
  font-weight: 600;
  border-radius: .5rem;
  transition: all .2s;
}
.btn-hpp-outline:hover {
  background: var(--hpp-pool);
  color: white;
}

/* Pool-blue button for secondary actions */
.btn-hpp-green {
  background: var(--hpp-pool);
  color: white;
  border: none;
  font-weight: 600;
  border-radius: .5rem;
  transition: background .2s, transform .1s;
}
.btn-hpp-green:hover {
  background: var(--hpp-pool-dark);
  color: white;
  transform: translateY(-1px);
}

/* ---- Cart & Checkout ----------------------------------------------- */
.cart-table th { color: var(--hpp-dark); font-weight: 700; }
.cart-qty-input { width: 70px; }
.checkout-section { background: #fff; border-radius: 1rem; padding: 2rem; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.order-summary-card { background: linear-gradient(135deg, #e0f2fe 0%, var(--hpp-pool-mist) 100%); border-radius: 1rem; }

/* ---- Stock badge --------------------------------------------------- */
.stock-ok { color: var(--hpp-pool); font-weight: 600; }
.stock-low { color: #fd7e14; font-weight: 600; }
.stock-out { color: #dc3545; font-weight: 600; }

/* ---- Footer -------------------------------------------------------- */
.site-footer {
  background: var(--hpp-dark);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer h5 { color: #fff; font-weight: 700; }
.site-footer a { color: #90e0ef; text-decoration: none; }  /* bright aqua visible on dark bg */
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(144,224,239,.25);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: .85rem;
}

/* ---- Admin sidebar ------------------------------------------------- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, var(--hpp-dark) 0%, #0d2540 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .sidebar-brand {
  padding: 1.5rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}
.admin-sidebar .sidebar-brand small { display: block; font-size: .7rem; font-weight: 400; opacity: .65; margin-top: 2px; }
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.75);
  padding: .65rem 1.25rem;
  border-radius: .375rem;
  margin: .1rem .5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .6rem;
  transition: background .15s, color .15s;
}
.admin-sidebar .nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.admin-sidebar .nav-link.active {
  background: rgba(0,150,199,.35);
  color: #fff;
  border-left: 3px solid #90e0ef;
  padding-left: calc(1.25rem - 3px);
}
.admin-sidebar .nav-link i { width: 18px; text-align: center; }
.admin-sidebar .sidebar-section {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 1.25rem 1.75rem .25rem;
}
.admin-sidebar .badge-sidebar {
  margin-left: auto;
  font-size: .65rem;
  background: var(--hpp-pool);
  padding: .2em .55em;
}
.admin-content { flex: 1; background: #f4f7fb; }
.admin-topbar {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-topbar .page-title { font-size: 1.15rem; font-weight: 700; color: var(--hpp-dark); }
.admin-main { padding: 1.75rem 1.5rem; }

/* ---- Stat cards (dashboard) ---------------------------------------- */
.stat-card {
  border: none;
  border-radius: .875rem;
  padding: 1.4rem 1.5rem;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  position: relative;
  overflow: hidden;
}
.stat-card .stat-icon {
  position: absolute;
  right: 1.25rem; top: 1.25rem;
  font-size: 2.25rem;
  opacity: .12;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 800; color: var(--hpp-dark); }
.stat-card .stat-label { font-size: .8rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .5px; }
.stat-card.primary { border-left: 4px solid var(--hpp-blue); }
.stat-card.success { border-left: 4px solid var(--hpp-pool); }
.stat-card.warning { border-left: 4px solid #ffc107; }
.stat-card.danger  { border-left: 4px solid #dc3545; }
.stat-card.info    { border-left: 4px solid var(--hpp-teal); }

/* ---- Admin tables -------------------------------------------------- */
.admin-table th { background: var(--hpp-dark) !important; color: white !important; font-weight: 600; font-size: .825rem; }
.admin-table tbody tr:hover { background: #e0f7fa !important; }  /* blue-tinted hover */
.admin-table { border-radius: .5rem; overflow: hidden; }

/* ---- Report cards -------------------------------------------------- */
.report-stat {
  background: white;
  border-radius: .75rem;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.report-stat .rs-value { font-size: 2rem; font-weight: 800; color: var(--hpp-pool); }
.report-stat .rs-label { font-size: .8rem; color: #6c757d; font-weight: 600; }

/* ---- Misc ---------------------------------------------------------- */
.category-pill {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 2rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  border: 2px solid transparent;
}
.category-pill.chemicals { background: #fff3cd; color: #856404; border-color: #ffc107; }
.category-pill.parts     { background: #d1ecf1; color: #0c5460; border-color: #0dcaf0; }
.category-pill.toys      { background: #f8d7da; color: #842029; border-color: #f00; }
.category-pill.all       { background: var(--hpp-pool); color: white; border-color: var(--hpp-pool); }
.category-pill:hover, .category-pill.active { opacity: .85; transform: scale(1.04); }

.low-stock-row { background: #fff8e1 !important; }
.out-of-stock-row { background: #fce8e8 !important; }

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 767px) {
  .admin-sidebar { display: none; }
  .hero-section h1 { font-size: 2rem; }
  .stat-card .stat-value { font-size: 1.4rem; }
}
