:root {
  --gold: #d4af37;
  --gold-soft: #f5d77b;
  --dark: #160d05;
  --brown: #2a1809;
  --brown-2: #5a3714;
  --cream: #fff6df;
  --cream-2: #f4ead2;
  --white: #ffffff;
  --text: #1a1208;
  --muted: #74644e;
  --line: #ead7aa;
  --success: #167a3d;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(22, 13, 5, .16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(212,175,55,.22), transparent 28%),
    linear-gradient(180deg, #fff9eb 0%, #f6ead1 48%, #ead6ac 100%);
  overflow-x: hidden;
  padding-bottom: 92px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.mobile-app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 14px 16px;
  background:
    radial-gradient(circle at top right, rgba(245,215,123,.22), transparent 30%),
    linear-gradient(135deg, #160d05, #2a1809 60%, #5a3714);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
}

.header-top {
  width: min(100%, 1180px);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--dark);
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(212,175,55,.35);
}

.app-brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.1;
}

.app-brand small {
  display: block;
  color: #f8e6b0;
  font-size: 12px;
}

.cart-pill {
  padding: 10px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--dark);
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

.cart-pill span {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
}

.search-box {
  width: min(100%, 1180px);
  margin: auto;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(245,215,123,.22);
  backdrop-filter: blur(16px);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255,255,255,.94);
  color: var(--text);
}

.search-box button {
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--dark);
  font-weight: 900;
  cursor: pointer;
}

.mobile-app {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 16px 14px 30px;
}

.promo-card {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 18px;
  align-items: center;
  padding: 26px;
  border-radius: 34px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(245,215,123,.42), transparent 36%),
    linear-gradient(145deg, #160d05, #301b0a 54%, #8a5c1f);
  box-shadow: var(--shadow);
}

.promo-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  bottom: -100px;
  background: rgba(245,215,123,.20);
  border-radius: 50%;
}

.mini-label {
  display: inline-flex;
  padding: 7px 11px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(245,215,123,.18);
  border: 1px solid rgba(245,215,123,.35);
  color: #ffe8a3;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .5px;
}

.promo-card h1 {
  max-width: 720px;
  margin: 0 0 12px;
  font-size: clamp(32px, 7vw, 64px);
  line-height: .98;
  letter-spacing: -1.7px;
}

.promo-card p {
  max-width: 620px;
  margin: 0;
  color: #fff0c8;
  font-size: 16px;
}

.promo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border-radius: 17px;
  border: 0;
  font-weight: 900;
  cursor: pointer;
  transition: .2s ease;
}

.btn:active,
button:active {
  transform: scale(.97);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--dark);
}

.btn-outline {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}

.promo-badge {
  position: relative;
  z-index: 2;
  width: 130px;
  height: 130px;
  border-radius: 38px;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(145deg, #fff6d2, #d4af37);
  color: var(--dark);
  box-shadow: 0 22px 45px rgba(0,0,0,.22);
}

.promo-badge strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.promo-badge span {
  display: block;
  font-weight: 800;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}

.quick-actions a {
  min-height: 92px;
  padding: 13px 8px;
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(212,175,55,.28);
  box-shadow: 0 12px 28px rgba(22,13,5,.09);
  display: grid;
  place-items: center;
  text-align: center;
}

.quick-actions span {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--dark), var(--brown-2));
  color: var(--gold-soft);
  font-weight: 950;
}

.quick-actions strong {
  font-size: 13px;
}

.section-block {
  margin: 26px 0;
}

.section-head {
  margin-bottom: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.1;
  letter-spacing: -1px;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.section-head a {
  color: var(--brown-2);
  font-weight: 900;
  white-space: nowrap;
}

.horizontal-products {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
}

.horizontal-products::-webkit-scrollbar {
  height: 6px;
}

.horizontal-products::-webkit-scrollbar-thumb {
  background: rgba(90,55,20,.25);
  border-radius: 999px;
}

.deal-card {
  flex: 0 0 245px;
  scroll-snap-align: start;
  padding: 13px;
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(212,175,55,.26);
  box-shadow: 0 15px 35px rgba(22,13,5,.11);
}

.deal-image,
.app-product-img {
  height: 150px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(245,215,123,.7), transparent 45%),
    linear-gradient(145deg, #1d1005, #8a5c1f);
  color: #fff;
  font-weight: 950;
  text-align: center;
}

.deal-image img,
.app-product-img img {
  height: 100%;
  object-fit: cover;
}

.product-tag {
  margin-top: 10px;
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f5e3aa;
  color: var(--dark);
  font-size: 11px;
  font-weight: 900;
}

.deal-card h3 {
  margin: 8px 0 4px;
  font-size: 16px;
  line-height: 1.25;
}

.deal-price {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 19px;
  font-weight: 950;
}

.add-btn,
.product-bottom button {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--dark), var(--brown-2));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  min-height: 190px;
  padding: 20px;
  border-radius: 30px;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.category-card span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.24);
  font-size: 12px;
  font-weight: 900;
  color: #ffe8a3;
}

.category-card h3 {
  margin: 48px 0 8px;
  font-size: 24px;
  line-height: 1.1;
}

.category-card p {
  margin: 0;
  color: #fff1c9;
}

.kilishi {
  background:
    radial-gradient(circle at top right, rgba(245,215,123,.38), transparent 40%),
    linear-gradient(145deg, #160d05, #8a5c1f);
}

.kulikuli {
  background:
    radial-gradient(circle at top right, rgba(245,215,123,.38), transparent 40%),
    linear-gradient(145deg, #2a1809, #b08328);
}

.app-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
}

.app-product-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 13px;
  padding: 12px;
  border-radius: 26px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(212,175,55,.24);
  box-shadow: 0 12px 30px rgba(22,13,5,.10);
}

.app-product-img {
  height: 125px;
  border-radius: 22px;
}

.app-product-info span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5e3aa;
  color: var(--dark);
  font-size: 10px;
  font-weight: 900;
}

.app-product-info h3 {
  margin: 7px 0 5px;
  line-height: 1.2;
  font-size: 16px;
}

.app-product-info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-bottom {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.product-bottom strong {
  color: var(--dark);
  font-size: 17px;
}

.product-bottom button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
}

.empty-state {
  padding: 25px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
}

.app-bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 200;
  height: 66px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  overflow: hidden;
  border-radius: 25px;
  background: rgba(22,13,5,.97);
  border: 1px solid rgba(245,215,123,.28);
  box-shadow: 0 20px 45px rgba(0,0,0,.32);
}

.app-bottom-nav a {
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff2c9;
  font-size: 12px;
  font-weight: 900;
}

.app-bottom-nav a.active {
  color: var(--gold-soft);
  background: rgba(245,215,123,.10);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  display: none;
  z-index: 300;
  padding: 13px 16px;
  border-radius: 18px;
  color: #fff;
  background: var(--dark);
  box-shadow: var(--shadow);
}

/* Compatibility for other pages */
.app-shell {
  width: min(100%, 1180px);
  margin: auto;
  padding: 0 14px;
}

.topbar,
.bottom-nav {
  display: none;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(22,13,5,.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: #fff7e7;
}

.dashboard {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0;
}

.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  height: max-content;
  position: sticky;
  top: 88px;
}

.sidebar a {
  display: block;
  padding: 13px 14px;
  border-radius: 16px;
  margin: 4px 0;
  color: var(--muted);
  font-weight: 800;
}

.sidebar a.active,
.sidebar a:hover {
  background: #f3e3bd;
  color: var(--brown);
}

.wallet-card {
  background: linear-gradient(135deg, var(--dark), var(--brown-2));
  color: #fff;
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

@media (min-width: 821px) {
  .app-bottom-nav {
    width: min(520px, calc(100% - 40px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 820px) {
  .mobile-app-header {
    padding: 12px 12px 15px;
  }

  .mobile-app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .promo-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 19px;
  }

  .promo-card h1 {
    font-size: 38px;
  }

  .promo-badge {
    width: 100%;
    height: auto;
    min-height: 82px;
    border-radius: 24px;
  }

  .promo-actions .btn {
    width: 100%;
  }

  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .quick-actions a {
    min-height: 82px;
    border-radius: 21px;
  }

  .quick-actions strong {
    font-size: 11px;
  }

  .section-head {
    align-items: flex-start;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .app-product-grid {
    grid-template-columns: 1fr;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: auto;
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }

  .sidebar a {
    white-space: nowrap;
    margin: 0;
  }
}

@media (max-width: 460px) {
  .app-brand small {
    display: none;
  }

  .cart-pill {
    padding: 9px 10px;
    font-size: 12px;
  }

  .search-box {
    padding: 7px;
  }

  .search-box button {
    padding: 0 11px;
    font-size: 13px;
  }

  .promo-card h1 {
    font-size: 33px;
  }

  .quick-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  .quick-actions span {
    width: 34px;
    height: 34px;
    border-radius: 13px;
  }

  .deal-card {
    flex-basis: 82%;
  }

  .app-product-card {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .app-product-img {
    height: 118px;
  }

  .product-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-bottom button {
    width: 100%;
  }
}

/* Featured Deals Auto Slider */
.horizontal-products,
.product-slider{
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  cursor:grab;
}

.horizontal-products > *,
.product-slider > *{
  flex:0 0 auto;
}

.deal-card{
  min-width:245px;
}

@media (max-width:460px){
  .deal-card{
    min-width:82%;
  }
}
