/* ============================================================
   Give and Take MASE Hardware — Admin + Custom CSS
   ============================================================ */

/* ── Admin Layout ──────────────────────────────────────────── */
.admin-body       { background: var(--gray-100); min-height: 100vh; }
.admin-layout     { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar    { background: var(--navy-900); color: var(--white); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 10; }
.admin-sidebar-logo{ padding: 20px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; align-items: center; }
.admin-sidebar-close{ display: none; background: none; border: none; color: rgba(255,255,255,.6); font-size: 18px; cursor: pointer; }
.admin-nav        { padding: 8px 0; flex: 1; }
.admin-nav-section{ font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.3); padding: 12px 16px 4px; }
.admin-nav a      { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; color: rgba(255,255,255,.72); transition: 120ms ease; }
.admin-nav a:hover, .admin-nav a.active{ background: rgba(255,255,255,.07); color: var(--white); }
.admin-nav a span:first-child { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-badge        { margin-left: auto; background: var(--red); color: var(--white); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.admin-main       { display: flex; flex-direction: column; min-height: 100vh; overflow: hidden; }
.admin-topbar     { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 5; }
.admin-menu-btn   { display: none; background: none; border: none; color: var(--gray-600); padding: 4px; cursor: pointer; }
.admin-page-title { font-size: 16px; font-weight: 700; color: var(--navy-800); flex: 1; }
.admin-topbar-right{ display: flex; align-items: center; gap: 12px; }
.admin-alert-btn  { background: var(--amber-light); color: var(--amber-dark); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-sm); border: 1px solid var(--amber); }
.admin-user-chip  { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--navy-800); background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 6px 12px; }
.admin-content    { padding: 24px; flex: 1; }

/* ── Admin Cards ─────────────────────────────────────────────── */
.admin-card       { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.admin-card-head  { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.admin-card-head h3{ font-size: 14px; font-weight: 700; color: var(--navy-800); }

/* ── Admin Stats ─────────────────────────────────────────────── */
.admin-stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat-card        { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--navy-800); position: relative; }
.stat-icon        { font-size: 22px; }
.stat-body        { flex: 1; }
.stat-val         { font-size: 28px; font-weight: 800; color: var(--navy-800); line-height: 1; }
.stat-lbl         { font-size: 12px; color: var(--gray-400); margin-top: 4px; font-weight: 500; }
.stat-link        { font-size: 12px; color: var(--amber); font-weight: 600; text-decoration: none; }

/* ── Admin Table ─────────────────────────────────────────────── */
.table-wrap       { overflow-x: auto; }
.admin-table      { width: 100%; border-collapse: collapse; }
.admin-table thead th { padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-400); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); text-align: left; white-space: nowrap; }
.admin-table tbody td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.admin-table tbody tr:last-child td{ border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--gray-50); }

/* ── Responsive Admin ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .admin-layout     { grid-template-columns: 1fr; }
  .admin-sidebar    { position: fixed; left: -280px; top: 0; width: 260px; height: 100vh; transition: left 200ms ease; box-shadow: none; }
  .admin-sidebar.open{ left: 0; box-shadow: var(--shadow-lg); }
  .admin-sidebar-close{ display: block; }
  .admin-menu-btn   { display: flex; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-content    { padding: 16px; }
}

/* ── Custom extra components ─────────────────────────────────── */

/* Page styles */
.page-styles-hero{ position: relative; overflow: hidden; }

/* Gallery */
.gallery-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Back badge */
.back-badge       { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-500); padding: 6px 12px; border: 1px solid var(--gray-200); border-radius: 99px; transition: var(--transition); }
.back-badge:hover { color: var(--navy-800); border-color: var(--navy-800); }

/* Code elements */
code              { font-family: var(--font-mono); background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-size: 13px; color: var(--navy-800); }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: var(--gray-400); }

/* Focus visible */
:focus-visible    { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ── Product images — use real photos ─────────────────────── */
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  transition: transform 0.35s ease;
  display: block;
}
.product-card-img {
  height: 210px;
  overflow: hidden;
  background: #F3F4F6;
  position: relative;
}
.product-card:hover .product-card-img img {
  transform: scale(1.06);
}
/* No-image placeholder inside product card */
.product-card-img.no-real-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#EEF0F8 0%,#E5E7EB 100%);
}
.product-card-img.no-real-img::after {
  content: attr(data-name);
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 500;
  text-align: center;
  padding: 8px;
}

/* ── Gallery grid ─────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #F3F4F6;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
}

/* ── Hero background image ────────────────────────────────── */
.hero-card-main {
  background-image: url('/assets/uploads/gallery/DSC_1456.JPG');
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.hero-card-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,22,56,.3) 0%, rgba(10,22,56,.1) 100%);
  border-radius: 16px;
}

/* ── Branch page image ────────────────────────────────────── */
.branch-hero-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 14px;
}
