* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --accent: #0071e3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topmost-bar {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* Right‑side container for nav + notice */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  margin-left: auto;
}

/* Bright notice badge */
.delivery-notice {
  background: #fbbf24;          /* warm yellow */
  color: #1e293b;
  padding: 0.2rem 0.8rem;
  border-radius: 980px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(251, 191, 36, 0.3);
  transition: background 0.2s ease;
  line-height: 1.4;
}

.delivery-notice:hover {
  background: #f59e0b;          /* slightly darker on hover */
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.logo {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  line-height: 1.1;
}

.logo:hover { opacity: 0.8; }

.tagline {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* Coming Soon Modal */
.coming-soon-card {
  text-align: center;
  padding: 2.5rem 2rem;
  max-width: 420px;
}

.coming-soon-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  display: block;
}

.coming-soon-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.coming-soon-message {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.coming-soon-btn {
  max-width: 200px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 980px;
  font-weight: 600;
}

.coming-soon-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.error-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.error-state p {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

/* Loading state */
.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.spinner {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.75rem;
}

.loading-state p {
  margin: 0;
  font-size: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.header-nav { margin-left: auto; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 0.25rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 980px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover {
  background: var(--bg-subtle);
  border-color: #b0b0b5;
}

.admin-badge {
  background: #e8f0fe;
  border-color: #a8c7fa;
  color: #174ea6;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  background: var(--text);
  color: #fff;
  border: none;
  padding: 0.28rem 0.5rem 0.28rem 0.55rem;
  border-radius: 980px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.cart-btn:hover {
  opacity: 0.88;
}

.cart-btn:active {
  opacity: 0.78;
}

.cart-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-btn-icon svg {
  display: block;
  width: 12px;
  height: 12px;
}

.cart-btn-label {
  line-height: 1;
}

.cart-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.28rem;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
}

/* Categories */
.categories-bar {
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
  margin-bottom: 0.4rem;
}

.categories-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.category-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.45rem 1.1rem;
  border-radius: 980px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.category-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* Main */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  min-height: 50vh;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.view-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.orders-view-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.orders-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.orders-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.orders-header-left h2 {
  margin: 0;
}

.orders-header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
  text-align: right;
}

.orders-user-nameplate {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Quiet text actions — match neutral palette (not blue) */
.orders-back-btn,
.orders-logout-btn,
.secondary-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.orders-back-btn:hover,
.orders-logout-btn:hover,
.secondary-btn:hover {
  color: var(--text);
  text-decoration: none;
}

.orders-logout-btn {
  text-align: right;
}

.orders-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--bg-subtle);
  display: block;
}

.product-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.product-price {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.add-to-cart-btn {
  margin-top: auto;
  width: 100%;
  padding: 0.35rem 0.5rem;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.7rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.add-to-cart-btn:hover { opacity: 0.85; }

/* Product detail page */
.product-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 980px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: background 0.2s, border-color 0.2s;
}

.product-back-btn:hover {
  background: var(--bg-subtle);
  border-color: #b0b0b5;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.product-detail-image-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.product-detail-image-wrap {
  position: relative;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  transition: background 0.15s, opacity 0.15s;
  z-index: 2;
}

.product-gallery-nav:hover {
  background: #fff;
}

.product-gallery-prev { left: 0.6rem; }
.product-gallery-next { right: 0.6rem; }

.product-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  z-index: 2;
}

.product-gallery-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.product-gallery-dot.active {
  background: #fff;
  transform: scale(1.15);
}

.product-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-gallery-thumb {
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-subtle);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.72;
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-gallery-thumb:hover {
  opacity: 1;
}

.product-gallery-thumb.active {
  border-color: var(--text);
  opacity: 1;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.product-detail-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.product-detail-title {
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

.product-detail-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.15rem 0 0.5rem;
}

.product-detail-description {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  max-width: 36rem;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.product-detail-add-btn {
  padding: 0.45rem 1.1rem;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.product-detail-add-btn:hover {
  opacity: 0.88;
}

.product-detail-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

/* Tablet / mobile product detail */
@media (max-width: 768px) {
  #product-view {
    padding-bottom: 3.25rem;
  }

  .product-back-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    margin-bottom: 1rem;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: none;
  }

  .product-detail-image-wrap {
    border-radius: 16px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin: 0;
  }

  .product-detail-image {
    aspect-ratio: 4 / 5;
  }

  .product-gallery-nav {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
  }

  .product-gallery-thumbs {
    gap: 0.4rem;
    padding: 0.15rem 0 0;
  }

  .product-gallery-thumb {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 7px;
  }

  .product-detail-info {
    gap: 0.55rem;
    padding: 1.25rem 0.15rem 0;
  }

  .product-detail-category {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.28rem 0.65rem;
    border-radius: 980px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
  }

  .product-detail-title {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.18;
  }

  .product-detail-price {
    font-size: 1.2rem;
    font-weight: 650;
    margin: 0.1rem 0 0.35rem;
  }

  .product-detail-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0.15rem 0 0.25rem;
    max-width: none;
  }

  .product-detail-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    margin: 0;
    padding: 0.4rem 1rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.04);
  }

  .product-detail-add-btn {
    width: 100%;
    padding: 0.55rem 1.2rem; 
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
  }
  .header-right {
    align-items: flex-end;
    gap: 0.2rem;
  }
  .delivery-notice {
    font-size: 0.6rem;
    padding: 0.15rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .product-back-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.68rem;
    margin-bottom: 0.85rem;
  }

  .product-detail-image-wrap {
    border-radius: 14px;
  }

  .product-detail-image {
    aspect-ratio: 3 / 4;
  }

  .product-detail-info {
    padding-top: 1.05rem;
    gap: 0.45rem;
  }

  .product-detail-category {
    font-size: 0.6rem;
    padding: 0.24rem 0.55rem;
  }

  .product-detail-title {
    font-size: 1.28rem;
  }

  .product-detail-price {
    font-size: 1.1rem;
  }

  .product-detail-description {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .product-detail-actions {
    padding: 0.35rem 0.85rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  }

  .product-detail-add-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 7px;
  }
  .delivery-notice {
    white-space: normal;        /* allow text to wrap on very small screens */
    font-size: 0.55rem;
    padding: 0.1rem 0.5rem;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) { background: var(--bg-subtle); }

.page-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

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

/* Orders */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.order-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.order-id {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}

.order-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.3;
}

.order-header-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.order-total {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.order-items-summary {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 400;
}

.order-delivery-summary {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.order-delivery-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem;
  align-items: start;
  font-size: 0.825rem;
  line-height: 1.4;
}

.order-delivery-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.order-delivery-value {
  color: var(--text);
  font-weight: 400;
  word-break: break-word;
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 980px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.status-Pending { background: #fff4e5; color: #b54708; }
.status-Processing { background: #e8f0fe; color: #174ea6; }
.status-Shipped { background: #e6f4ea; color: #137333; }
.status-Delivered { background: #e6f4ea; color: #0d652d; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

/* Admin table */
.table-responsive {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.admin-table th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.status-select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  background: var(--bg);
  cursor: pointer;
}

.muted-text {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.muted-hint {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.45rem 1.1rem;
  border-radius: 980px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.admin-tab-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.admin-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.admin-product-form {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1rem;
}

.admin-form-full {
  grid-column: 1 / -1;
}

.admin-product-form select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
}

.admin-add-product-btn {
  margin-top: 0.75rem;
  max-width: 220px;
}

.admin-product-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-subtle);
}

.admin-delete-btn {
  background: none;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.admin-delete-btn:hover {
  background: #fef2f2;
}

.admin-product-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.admin-filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 980px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-filter-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.admin-filter-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.product-image-preview-wrap {
  margin-top: 0.75rem;
}

.product-image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.product-image-preview-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.product-image-preview-item.is-primary {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

.product-image-preview-item .product-image-preview {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 0;
}

.product-image-preview-badge {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.35rem;
  border-radius: 980px;
  background: rgba(29, 29, 31, 0.88);
  color: #fff;
}

.product-image-preview {
  max-width: 140px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

@media (max-width: 768px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* References */
.references-bar {
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  padding: 1.25rem 1.5rem 1.5rem;
}

.references-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.references-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.references-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

.references-list li {
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  padding: 3rem 1.5rem 2.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.footer-address {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.footer-phone a {
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.footer-phone a:hover { color: var(--accent); }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.social-links a {
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  letter-spacing: -0.01em;
}

.social-links a:hover { color: var(--accent); }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 400;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg);
  padding: 2rem;
  border-radius: 18px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0.15rem;
}

.close-btn:hover { color: var(--text); }

.error-msg {
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid #fecaca;
}

.form-group { margin-bottom: 1.15rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.submit-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 0.25rem;
}

.submit-btn:hover:not(:disabled) { opacity: 0.85; }

.submit-btn:disabled {
  background: #86868b;
  cursor: not-allowed;
}

.auth-toggle-prompt {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1.25rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: inherit;
}

.link-btn:hover { text-decoration: underline; }

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.checkout-summary-row.total-row-checkout {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  padding: 0.75rem 0 0.5rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--border-light);
}

.shipping-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0.75rem;
  line-height: 1.35;
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  z-index: 200;
  transition: opacity 0.25s, visibility 0.25s;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
}

.cart-drawer.open { right: 0; }

.cart-header {
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.4rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-light);
}

.cart-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.cart-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.remove-btn {
  background: none;
  border: none;
  color: #d70015;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  flex-shrink: 0;
}

.remove-btn:hover { text-decoration: underline; }

.empty-cart-msg {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 0;
  font-size: 0.95rem;
}

.cart-footer {
  padding: 1.25rem 1.4rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.checkout-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.checkout-btn:hover { opacity: 0.85; }

/* ==========================================================
   Mobile — smaller categories / login / cart; buttons on right
   ========================================================== */
@media (max-width: 768px) {
  .header-inner {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .logo { font-size: 1.35rem; }
  .tagline { font-size: 0.65rem; }
  .header-nav {
    margin-left: auto;
    width: auto;
  }

  .nav-actions {
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: nowrap;
  }

  .user-name { font-size: 0.65rem; }

  .nav-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.62rem;
    border-radius: 14px;
  }

  .categories-inner {
    padding: 0.5rem 0.75rem;
    gap: 0.3rem;
    justify-content: center;
  }

  .category-btn {
    padding: 0.32rem 0.7rem;
    font-size: 0.68rem;
  }

  .container { padding: 1.5rem 1rem 3rem; }
  .section-header h2 { font-size: 1.35rem; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .product-image { height: 140px; }
  .product-body { padding: 0.85rem; }
  .product-title { font-size: 0.82rem; }
  .product-price { font-size: 0.78rem; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.25rem;
  }

  /* Visit Us spans full width; Contact + Updates sit side by side */
  .footer-inner > .footer-col:first-child {
    grid-column: 1 / -1;
  }

  /* Orders — title left, user+logout right */
  .view-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .view-header h2,
  .orders-header-row h2 {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .orders-header-row {
    align-items: flex-start;
  }

  .orders-user-nameplate {
    font-size: 0.78rem;
    max-width: 9rem;
  }

  .orders-back-btn,
  .orders-logout-btn {
    font-size: 0.72rem;
  }

  .cart-btn {
    padding: 0.24rem 0.42rem 0.24rem 0.45rem;
    font-size: 0.65rem;
    gap: 0.22rem;
  }

  .cart-btn-icon svg {
    width: 11px;
    height: 11px;
  }

  .cart-btn-count {
    min-width: 0.9rem;
    height: 0.9rem;
    font-size: 0.58rem;
    padding: 0 0.22rem;
  }

  .order-card {
    padding: 1rem 1.05rem;
  }

  .order-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .order-header-meta {
    justify-content: space-between;
    width: 100%;
  }

  .order-id {
    font-size: 0.9rem;
  }

  .order-date {
    font-size: 0.75rem;
  }

  .order-total {
    font-size: 0.9rem;
  }

  .order-items-summary {
    font-size: 0.82rem;
  }

  .order-delivery-row {
    grid-template-columns: 3.75rem 1fr;
    font-size: 0.78rem;
    gap: 0.4rem;
  }

  .status-pill {
    font-size: 0.62rem;
    padding: 0.18rem 0.55rem;
  }

  .admin-table { min-width: 720px; }
  .cart-drawer { width: 100%; right: -100%; }
  .modal-card { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .topmost-bar { font-size: 0.65rem; }

  .logo { font-size: 1.6rem;}
  .tagline { font-size: 0.6rem; }

  .header-inner { padding: 0.5rem 0.75rem; gap: 0.25rem; }

  .nav-actions {
    justify-content: flex-end;
    gap: 0.25rem;
  }

  .nav-btn {
    padding: 0.22rem 0.45rem;
    font-size: 0.55rem;
  }

  .cart-btn {
    padding: 0.22rem 0.38rem 0.22rem 0.4rem;
    font-size: 0.62rem;
    gap: 0.2rem;
  }

  .cart-btn-icon svg {
    width: 10px;
    height: 10px;
  }

  .cart-btn-count {
    min-width: 0.85rem;
    height: 0.85rem;
    font-size: 0.55rem;
    padding: 0 0.2rem;
  }

  .categories-inner {
    padding: 0.4rem 0.5rem;
    gap: 0.25rem;
  }

  .category-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.6rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-image { height: 120px; }
  .add-to-cart-btn { font-size: 0.6rem; padding: 0.28rem 0.4rem; }
}