/* Cloud */
/* ===============================
   1. Base Reset & Typography
   =============================== */
body {
  background: #fff;
  color: #111;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  color: #111;
}

p {
  margin: 0 0 1em;
}

a {
  color: #0c4daf;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: none;
  margin: 0 auto;
  padding: 0 5px;
}

/* ===============================
   2. Navigation Bar
   =============================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0c4daf; /* OLX-inspired dark teal/navy */
  color: #fff;
  padding: 16px 28px;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,47,52,0.07);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: 1px;
}

.brand img {
  max-height: 32px;   /* shrink logo */
  max-width: 120px;   /* prevent extra wide logos */
  width: auto;
  height: auto;
  vertical-align: middle;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 600;
}

.nav .btn,
.nav .badge {
  margin-left: 8px;
}

/* ===============================
   3. Navigation Right Section
   =============================== */
.nav > div {
  display: flex;
  align-items: center;
  gap: 12px; /* spacing between buttons/badges */
}

.nav .btn {
  background: #fff;
  color: #0c4daf;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav .btn:hover {
  background: #f1f5f9;
  color: #0a3b8f;
}

.nav .btn.secondary {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
}

.nav .btn.secondary:hover {
  background: rgba(255,255,255,0.1);
}

.nav .btn.warning {
  background: #2563eb; /* amber */
  color: #fff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;}

.nav .btn.warning:hover {
  color: #fff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;}

.nav .badge {
  background: #2563eb; /* blue badge */
  color: #fff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===============================
   4. Buttons (Unified Round Style)
   =============================== */
.btn {
  background: #2563eb;
  color: #fff;
  padding: 8px 18px;
  border-radius: 9999px; /* fully rounded */
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #1e4ed8;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Force all variants to be the same round blue button */
.btn.secondary,
.btn.warning,
.btn.success,
.btn.danger {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 9999px;
}

.btn.secondary:hover,
.btn.warning:hover,
.btn.success:hover,
.btn.danger:hover {
  background: #1e4ed8;
}

/* ===============================
   5. Home Page - Product Grid & Cards
   =============================== */

/* Grid for product listing */
.grid.cols-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

/* Individual product card */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

/* Media strip (images/videos inside card) */
.media-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.media-strip img,
.media-strip video {
  max-height: 160px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}

/* Card headings */
.card h2 {
  font-size: 1.1rem;
  margin: 8px 0;
  font-weight: 600;
  color: #111;
}

/* Condition badge */
.card .badge {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 6px 0;
}

/* Product specs */
.card p {
  font-size: 0.9rem;
  margin: 6px 0;
  color: #444;
}

/* Price */
.card .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 8px 0;
}

/* Actions (buttons inside cards) */
.actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.actions .btn {
  flex: 1;
  text-align: center;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.actions .btn:hover {
  background: #1e4ed8;
}


/* ===============================
   6. Tables (Modern Card Style)
   =============================== */
.table-container {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden; /* ensures rounded corners */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px; /* spacing between card-like rows */
}

.table thead {
  background: #2563eb;
  color: #fff;
  text-align: left;
}

.table thead th {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.table tbody tr {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.table tbody td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: #111;
}

/* Round row corners properly */
.table tbody tr td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.table tbody tr td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}


/* ===============================
   7. Payment Page Layout
   =============================== */

/* Order summary card */
.order-summary {
  position: sticky;
  top: 20px; /* stays visible while scrolling */
}

/* Table styling */
.order-summary table {
  width: 100%;
  border-collapse: collapse;
}

.order-summary th,
.order-summary td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.order-summary tfoot td {
  font-weight: 700;
  background: #f9fafb;
}

/* ===============================
   7. Forms & Inputs (Scoped to Cards)
   =============================== */
/* Only affect forms inside .card / .form-card so filter bar stays untouched */
.card form,
.form-card {
  max-width: none;
  margin: 0;
}

.card .field,
.form-card .field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.card label,
.form-card label,
.card .label,
.form-card .label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #111;
}

.card .input,
.form-card .input,
.card textarea,
.form-card textarea,
.card select,
.form-card select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 9999px; /* pill */
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card .input:focus,
.form-card .input:focus,
.card textarea:focus,
.form-card textarea:focus,
.card select:focus,
.form-card select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.card textarea,
.form-card textarea {
  min-height: 120px;
  border-radius: 12px; /* slight radius looks better for textareas */
  resize: vertical;
}

.card select,
.form-card select {
  appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='%232563eb' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5'/></svg>") no-repeat right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.card .form-actions,
.form-card .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

/* ===============================
   8. Filter & Search Bar
   =============================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 6px;
  color: #111;
}

.filter-bar .input,
.filter-bar select,
.filter-bar .filter-search {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar .input:focus,
.filter-bar select:focus,
.filter-bar .filter-search:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ===============================
   9. Cards (Containers)
   =============================== */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.form-card { /* a bit roomier for auth/checkout forms */
  padding: 24px;
}

/* ===============================
   11. Cart Page
   =============================== */
.summary-card {
  position: sticky;
  top: 20px;
  align-self: start;
}
.summary-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.summary-card li {
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}
.btn.full {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 9999px; /* pill style */
}
.btn.danger {
  background: #ef4444;
  color: #fff;
}
.card.empty {
  text-align: center;
  padding: 32px;
}


/* Footer for base.html *//* Ensure full height for body and wrapper */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main content grows to push footer down */
.site-content {
  flex: 1;
  padding: 20px; /* optional spacing */
}

/* Footer styling */
.site-footer {
  background-color: #222;
  color: #eee;
  padding: 40px 20px 20px 20px;
  font-family: Arial, sans-serif;
}

.site-footer a {
  color: #eee;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer section {
  flex: 1 1 200px;
  margin-bottom: 20px;
}

.site-footer h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 6px;
}

.social-links a {
  display: inline-block;
  margin-right: 10px;
}

.social-links img {
  width: 24px;
  height: 24px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  padding: 15px 0 0 0;
  font-size: 14px;
  margin-top: 20px;
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer section {
    width: 100%;
  }

  .social-links a {
    margin-right: 15px;
  }
}
