:root {
  --bs-primary: #2563eb;
}
body { background: #f8fafc; }
.navbar { background: #1f2937; }
.navbar-brand, .nav-link, .navbar-text { color: #f9fafb !important; }
.user-name {
  display: inline-block;
  max-width: 8ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.site-footer { background: #1f2937; color: #f9fafb; }
.site-footer a { color: color: #1f2937; font-weight: bold; }
.site-footer .exchange-rates { font-size: .875rem; opacity: .8; }
.site-footer .btn { background: rgba(255,255,255,.1); color: #f9fafb; border: none; }
.site-footer .btn:hover { background: rgba(255,255,255,.2); color: #f9fafb; }
.card { border: none; border-radius: 1rem; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.btn-rounded { border-radius: 999px; }
.btn-primary { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-primary:hover { background-color: #1d4ed8; border-color: #1d4ed8; }
.badge-soft { background: #eef2ff; color: #4338ca; }
.table thead th { background: #f3f4f6; }
img.product-thumb,
img.product-detail-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: .75rem; }
.product-img-wrapper { position: relative; }
.product-img-wrapper .price-badge {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  background: var(--bs-primary);
  color: #fff;
  padding: .25rem .5rem;
  border-radius: .5rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.form-select, .form-control { border-radius: .6rem; min-height: 44px; }
.quantity-input { min-width: 8rem; }
.quantity-input .btn { min-width: 2.5rem; }
.quantity-input .form-control { text-align: center; }
.catalog-search-form { position: relative; }
.catalog-search-form .catalog-search-btn {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  padding: 0 1rem;
  height: calc(100% - .5rem);
}
.catalog-search-form .form-control { padding-right: 6rem; }
.table-users td.address { max-width: 200px; white-space: normal; word-break: break-word; }
.table-users td.actions { white-space: nowrap; display: flex; gap: .25rem; }
.badge { font-weight: 600; }
.color-tag { font-size: 1rem; }
.table-cart tbody td.package-cell { max-width: 120px; }
.table-cart tbody td.package-cell .package-wrapper { display: flex; flex-direction: column; align-items: flex-end; }
.admin-img-thumb { width:80px; height:80px; object-fit:cover; border-radius:.5rem; cursor:pointer; }
.product-gallery { display:flex; }
.product-gallery-thumbs { display:flex; flex-direction:column; gap:.5rem; margin-right:1rem; }
.product-gallery-thumbs img { width:80px; height:80px; object-fit:cover; border-radius:.5rem; cursor:pointer; border:2px solid transparent; opacity:.7; }
.product-gallery-thumbs img.active { border-color: var(--bs-primary); opacity:1; }
.stack-row label { min-width: 120px; color: #6b7280; }
.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1f2937;
  border-top: 1px solid rgba(255,255,255,.1);
  display: none;
  justify-content: space-around;
  padding: .5rem 0;
  z-index: 1030;
}
.mobile-nav a {
  color: #f9fafb;
  text-decoration: none;
  font-size: .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  position: relative;
}
.mobile-nav a i { font-size: 1.25rem; }
.mobile-nav a .cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  font-size: .6rem;
}
@media (max-width: 576px){
  body { padding-bottom: 70px; }
  .mobile-nav { display: flex; }
  .card { padding: 1rem; }
  .table-cart thead { display: none; }
  .table-cart tbody tr { display: block; border: 1px solid #dee2e6; border-radius: .5rem; padding: .5rem; margin-bottom: 1rem; }
  .table-cart tbody td { display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; }
  .table-cart tbody td::before { content: attr(data-label); font-weight: 600; margin-right: .5rem; }
  .table-cart tbody td.actions { justify-content: flex-end; }
  .table-cart tbody td.package-cell { flex-direction: column; align-items: flex-start; max-width: 100%; }
  .table-cart tbody td.package-cell::before { margin-right: 0; margin-bottom: .25rem; }
  .table-cart tbody td.package-cell .package-wrapper { align-items: flex-start; width: 100%; }
  .product-gallery { flex-direction:column; }
  .product-gallery .flex-grow-1 { order:1; }
  .product-gallery-thumbs { flex-direction:row; margin-right:0; margin-top:.5rem; order:2; }
}
@media (min-width: 576px){
  .mobile-nav { display: none; }
}
