@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  --primary: #0f172a;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--primary);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: linear-gradient(90deg, #0f172a 0%, #111827 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

.mobile-nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
}

.main-nav a {
  margin-left: 16px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #e5e7eb;
  font-weight: 600;
  display: inline-block;
}

.main-nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.subbar-title {
  font-weight: 600;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-nav a {
  white-space: nowrap;
}

.category-nav a {
  padding: 6px 10px;
  border-radius: 20px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 14px;
}

.category-nav a.active {
  background: #2563eb;
  color: #fff;
}

.page {
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto 40px auto;
}

.hero {
  background: linear-gradient(135deg, #e0e7ff, #f8fafc);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 0;
  font-size: 22px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.content-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.card .thumb {
  height: 160px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-weight: 600;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.price {
  font-weight: 700;
  color: #0f172a;
  font-size: 18px;
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.button.secondary {
  background: #e2e8f0;
  color: #1e293b;
  box-shadow: none;
}

.button.danger {
  background: #ef4444;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
}

textarea {
  min-height: 110px;
}

.order-box form {
  max-width: 430px;
  width: 100%;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.section-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.footer {
  padding: 14px 22px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.small-text {
  font-size: 12px;
}

.banner {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.banner.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.banner.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecdd3;
}

.images-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  min-height: 260px;
}

.gallery-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: none;
}

.gallery-img.active {
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav.prev {
  left: 10px;
}

.gallery-nav.next {
  right: 10px;
}

.gallery-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 10px 0;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
}

.gallery-dot.active {
  background: #2563eb;
}

.images-row img,
.images-row .placeholder {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}

th {
  background: #f8fafc;
  font-weight: 700;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-responsive table {
  min-width: 620px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.auth-box {
  max-width: 420px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

@media (max-width: 720px) {
  .topbar, .subbar {
    padding: 12px 14px;
  }
  .page {
    padding: 16px;
  }
  .content-two-col {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: #0f172a;
    padding: 10px;
    border-radius: 10px;
    position: absolute;
    top: 60px;
    right: 14px;
    box-shadow: var(--shadow);
  }
  .main-nav.show {
    display: flex;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .subbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .category-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .category-nav a {
    flex: 0 0 auto;
  }
}





