/* Grocery App - Custom Styles */

/* Vue cloak - hide template until mounted */
[v-cloak] {
  display: none !important;
}

/* CSS Variables */
:root {
  --primary-green: #1b5e20;
  --light-green: #4caf50;
  --yellow-accent: #ffc107;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --text-dark: #212121;
  --text-muted: #757575;
  --border-color: #e0e0e0;
  --success: #4caf50;
  --error: #f44336;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Reset and Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  color: var(--text-dark);
  background-color: var(--light-gray);
}

#app {
  max-width: 30rem;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 30rem;
  background-color: var(--primary-green);
  color: var(--white);
  z-index: 1000;
  padding: 0 1rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.store-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.store-info .store-name {
  font-weight: 600;
  font-size: 1rem;
}

.store-info .change-btn {
  font-size: 0.75rem;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.75rem;
  margin-left: 0.5rem;
}

/* Main Content */
.app-content {
  flex: 1;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  overflow-y: auto;
}

.app-content.no-header {
  padding-top: 0;
}

.app-content.no-navbar {
  padding-bottom: 0;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 30rem;
  background-color: var(--white);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 1rem;
  position: relative;
  transition: color 0.2s;
}

.nav-item i {
  font-size: 1.25rem;
  margin-bottom: 0.125rem;
}

.nav-item.active {
  color: var(--primary-green);
}

.nav-item:focus {
  outline: none;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0.5rem;
  background-color: var(--error);
  color: var(--white);
  font-size: 0.625rem;
  font-weight: bold;
  min-width: 1rem;
  height: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

/* Page Container */
.page-container {
  padding: 1rem;
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  border: none;
  margin-bottom: 1rem;
  overflow: hidden;
}

.card-body {
  padding: 1rem;
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #164a1a;
  border-color: #164a1a;
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.4);
  outline: none;
}

.btn-primary:active,
.btn-primary.active,
.btn-primary:active:focus,
.btn-primary:first-child:active,
.show > .btn-primary.dropdown-toggle {
  background-color: #0f3612 !important;
  border-color: #0f3612 !important;
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.4) !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  opacity: 0.65;
}

.btn-secondary {
  background-color: var(--yellow-accent);
  border-color: var(--yellow-accent);
  color: var(--text-dark);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #e6ad00;
  border-color: #e6ad00;
  color: var(--text-dark);
}

.btn-secondary:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.4);
  outline: none;
}

.btn-secondary:active,
.btn-secondary.active,
.btn-secondary:active:focus,
.btn-secondary:first-child:active,
.show > .btn-secondary.dropdown-toggle {
  background-color: #cc9a00 !important;
  border-color: #cc9a00 !important;
  color: var(--text-dark) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.4) !important;
}

.btn-secondary:disabled,
.btn-secondary.disabled {
  background-color: var(--yellow-accent);
  border-color: var(--yellow-accent);
  color: var(--text-dark);
  opacity: 0.65;
}

.btn-outline-primary {
  color: var(--primary-green);
  border-color: var(--primary-green);
}

.btn-outline-primary:hover {
  background-color: var(--primary-green);
  color: var(--white);
}

.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.4);
  outline: none;
}

.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:active:focus,
.btn-outline-primary:first-child:active,
.show > .btn-outline-primary.dropdown-toggle {
  background-color: #164a1a !important;
  border-color: #164a1a !important;
  color: var(--white) !important;
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.4) !important;
}

.btn-outline-primary:disabled,
.btn-outline-primary.disabled {
  color: var(--primary-green);
  border-color: var(--primary-green);
  background-color: transparent;
  opacity: 0.65;
}

/* Outline secondary button states */
.btn-outline-secondary:focus,
.btn-outline-secondary:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.4);
  outline: none;
}

.btn-outline-secondary:active,
.btn-outline-secondary.active,
.btn-outline-secondary:active:focus,
.btn-outline-secondary:first-child:active,
.show > .btn-outline-secondary.dropdown-toggle {
  background-color: #5c636a !important;
  border-color: #5c636a !important;
  color: var(--white) !important;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.4) !important;
}

.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
  opacity: 0.65;
}

/* Danger button states */
.btn-danger:focus,
.btn-danger:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.4);
  outline: none;
}

.btn-danger:active,
.btn-danger.active,
.btn-danger:active:focus,
.btn-danger:first-child:active,
.show > .btn-danger.dropdown-toggle {
  background-color: #b02a37 !important;
  border-color: #a52834 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.4) !important;
}

.btn-danger:disabled,
.btn-danger.disabled {
  opacity: 0.65;
}

/* Outline danger button states */
.btn-outline-danger:focus,
.btn-outline-danger:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.4);
  outline: none;
}

.btn-outline-danger:active,
.btn-outline-danger.active,
.btn-outline-danger:active:focus,
.btn-outline-danger:first-child:active,
.show > .btn-outline-danger.dropdown-toggle {
  background-color: #b02a37 !important;
  border-color: #b02a37 !important;
  color: var(--white) !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.4) !important;
}

.btn-outline-danger:disabled,
.btn-outline-danger.disabled {
  opacity: 0.65;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Form Inputs */
.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.15);
  outline: none;
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text-dark);
}

/* Store Selection */
.store-list {
  list-style: none;
  padding: 0;
}

.store-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.store-item:hover {
  border-color: var(--primary-green);
  box-shadow: var(--shadow);
}

.store-item.selected {
  border-color: var(--primary-green);
  background-color: rgba(27, 94, 32, 0.05);
}

.store-item .store-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}

.store-item .store-address {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.store-item .store-hours {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 0.875rem 1rem;
  border-radius: 1.25rem;
  background-color: var(--light-gray);
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  min-height: 2.75rem;
}

.category-tab:hover {
  background-color: var(--border-color);
}

.category-tab.active {
  background-color: var(--primary-green);
  color: var(--white);
}

.category-tab:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 0.125rem;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
}

.product-card {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background-color: var(--light-gray);
}

.product-info {
  padding: 0.75rem;
}

.product-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.275rem;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-top: 0.375rem;
}

.product-price.sale {
  color: #dc3545;
}

.product-price-original {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.25rem;
}

.product-discount-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: #dc3545;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  z-index: 1;
}

.product-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Product Detail Modal */
.product-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.product-detail-content {
  background-color: var(--white);
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  border-radius: 1rem 1rem 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1;
  max-height: 40vh;
  object-fit: contain;
  background-color: #111;
}

.product-detail-info {
  padding: 1.25rem;
}

.product-detail-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
}

.product-detail-price .price-sale {
  color: #dc3545;
}

.product-detail-price .price-original {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.5rem;
  font-weight: 400;
}

.product-detail-price .discount-badge {
  display: inline-block;
  background-color: #dc3545;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.product-detail-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.product-detail-desc {
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.5;
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.qty-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--primary-green);
  background-color: var(--white);
  color: var(--primary-green);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-btn:hover {
  background-color: var(--primary-green);
  color: var(--white);
}

.qty-btn:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 0.125rem;
}

.qty-btn:active {
  background-color: var(--primary-green) !important;
  color: var(--white) !important;
  transform: scale(0.95);
}

.qty-btn:disabled {
  border-color: var(--border-color);
  color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.5;
}

.qty-btn:disabled:hover {
  background-color: var(--white);
  color: var(--border-color);
}

.qty-value {
  font-size: 1.25rem;
  font-weight: 600;
  min-width: 2.5rem;
  text-align: center;
}

/* Cart Page */
.cart-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
  width: 5rem;
  height: 5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  background-color: var(--light-gray);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  font-size: 0.9375rem;
}

.cart-item-price {
  color: var(--primary-green);
  font-weight: 600;
  margin-top: 0.25rem;
}

.cart-item-price.sale {
  color: #dc3545;
}

.cart-item-price-original {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.25rem;
}

.cart-item-discount-badge {
  display: inline-block;
  background-color: #dc3545;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  margin-left: 0.375rem;
  vertical-align: middle;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cart-item-qty .qty-btn {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1rem;
}

.cart-item-remove {
  color: var(--error);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.cart-summary {
  background-color: var(--white);
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-summary-row.total {
  font-weight: 700;
  font-size: 1.125rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.cart-summary-row.total .amount {
  color: var(--primary-green);
}

/* Checkout Page */
.checkout-section {
  background-color: var(--white);
  margin-bottom: 0.5rem;
  padding: 1rem;
}

.checkout-section-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.address-card {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.address-card.selected {
  border-color: var(--primary-green);
  background-color: rgba(27, 94, 32, 0.05);
}

.address-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary-green);
}

.address-contact {
  font-weight: 500;
  margin-top: 0.25rem;
}

.address-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Payment Methods */
.payment-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-option.selected {
  border-color: var(--primary-green);
  background-color: rgba(27, 94, 32, 0.05);
}

.payment-radio {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-option.selected .payment-radio {
  border-color: var(--primary-green);
}

.payment-option.selected .payment-radio::after {
  content: '';
  width: 0.625rem;
  height: 0.625rem;
  background-color: var(--primary-green);
  border-radius: 50%;
}

/* Order Items Summary */
.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.order-item-row .item-name {
  flex: 1;
}

.order-item-row .item-qty {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

/* Profile Page */
.profile-header {
  background-color: var(--primary-green);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
}

.profile-avatar {
  width: 5rem;
  height: 5rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.profile-avatar i {
  font-size: 2.5rem;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
}

.profile-email,
.profile-phone {
  font-size: 0.875rem;
  opacity: 0.8;
}

.profile-menu {
  background-color: var(--white);
  margin-top: 1rem;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  color: var(--text-dark);
}

.profile-menu-item:hover {
  background-color: var(--light-gray);
}

.profile-menu-item i {
  font-size: 1.25rem;
  width: 2rem;
  color: var(--primary-green);
}

.profile-menu-item .menu-text {
  flex: 1;
}

.profile-menu-item .menu-arrow {
  color: var(--text-muted);
}

.profile-menu-item.logout {
  color: var(--error);
}

.profile-menu-item.logout i {
  color: var(--error);
}

/* Address List */
.address-list-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.address-list-item.default {
  border-color: var(--primary-green);
}

.default-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--primary-green);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.75rem;
}

.address-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.address-actions button {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

/* Order List */
.order-list-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.order-list-item:hover {
  box-shadow: var(--shadow);
}

.order-list-item:last-child {
  margin-bottom: 0;
}

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

.order-id {
  font-weight: 600;
}

.order-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.75rem;
}

.order-status.pending {
  background-color: var(--yellow-accent);
  color: var(--text-dark);
}

.order-status.confirmed {
  background-color: #0dcaf0;
  color: var(--text-dark);
}

.order-status.preparing {
  background-color: #0d6efd;
  color: var(--white);
}

.order-status.out_for_delivery {
  background-color: #9c27b0;
  color: var(--white);
}

.order-status.delivered {
  background-color: #198754;
  color: var(--white);
}

.order-status.cancelled {
  background-color: #dc3545;
  color: var(--white);
}

.order-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.order-total {
  font-weight: 600;
  color: var(--primary-green);
  margin-top: 0.5rem;
}

/* Auth Pages */
.auth-page {
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-green);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo i {
  font-size: 4rem;
  color: var(--primary-green);
}

.auth-logo h1 {
  font-size: 1.5rem;
  color: var(--primary-green);
  margin-top: 0.5rem;
}

.auth-form {
  flex: 1;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--primary-green);
  font-weight: 500;
  text-decoration: none;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.empty-state p {
  font-size: 0.875rem;
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Search */
.search-container {
  padding: 1rem;
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.search-input {
  background-color: var(--light-gray);
  border: none;
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Page Title */
.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1rem;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-title .back-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--primary-green);
}

.page-title .refresh-btn {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.page-title .refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spinning {
  animation: spin 1s linear infinite;
}

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

.last-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.25rem 1rem;
  background-color: var(--bg-light);
}

/* Close button for modals */
.product-detail-modal > .close-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 2001;
}

.close-btn:focus {
  outline: 2px solid var(--white);
  outline-offset: 0.125rem;
}

/* Utilities */
.text-primary {
  color: var(--primary-green) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--error) !important;
}

.bg-light {
  background-color: var(--light-gray) !important;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.p-1 {
  padding: 0.5rem;
}
.p-2 {
  padding: 1rem;
}
.p-3 {
  padding: 1.5rem;
}

/* ============================================
   REDESIGNED HOME PAGE STYLES
   ============================================ */

/* No Store Selected State */
.no-store-container {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fdf8 0%, #e8f5e9 100%);
}

.no-store-content {
  text-align: center;
  max-width: 20rem;
}

.no-store-illustration {
  position: relative;
  width: 8rem;
  height: 8rem;
  margin: 0 auto 2rem;
}

.store-icon-wrapper {
  width: 8rem;
  height: 8rem;
  background: linear-gradient(135deg, var(--primary-green) 0%, #2e7d32 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1rem 3rem rgba(27, 94, 32, 0.3);
}

.store-icon-wrapper i {
  font-size: 3.5rem;
  color: white;
}

.floating-items {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.float-item {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
  animation: float 3s ease-in-out infinite;
}

.float-item i {
  color: var(--primary-green);
  font-size: 1.25rem;
}

.float-1 {
  top: 0.5rem;
  left: -1.5rem;
  animation-delay: 0s;
}

.float-2 {
  bottom: 0.5rem;
  right: -1.5rem;
  animation-delay: 1s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

.no-store-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.no-store-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.select-store-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 3rem;
  box-shadow: 0 0.5rem 1.5rem rgba(27, 94, 32, 0.3);
  transition: all 0.3s ease;
}

.select-store-btn:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.75rem 2rem rgba(27, 94, 32, 0.4);
}

.select-store-btn:active,
.select-store-btn:focus {
  background-color: #0f3612 !important;
  border-color: #0f3612 !important;
  transform: translateY(0);
  box-shadow: 0 0.25rem 1rem rgba(27, 94, 32, 0.4) !important;
}

/* Hero Section */
.hero-section {
  padding: 1rem;
}

/* Banner Carousel */
.banner-carousel {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.banner-carousel.skeleton {
  height: 10rem;
  background: var(--light-gray);
}

.banner-slide-skeleton {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--light-gray) 0%, #e0e0e0 50%, var(--light-gray) 100%);
  animation: shimmer 1.5s infinite;
}

.banner-track {
  display: flex;
  will-change: transform;
}

.banner-slide {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  min-height: 10rem;
  flex-shrink: 0;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.banner-image {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1rem 2rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  color: white;
}

.banner-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.banner-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
}

.banner-dots .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.banner-dots .dot.active {
  width: 1.5rem;
  border-radius: 0.25rem;
  background: white;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0.5rem;
  background: white;
  margin: 0 1rem 0.5rem;
  border-radius: 1rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s ease;
}

.quick-action-item:active {
  transform: scale(0.95);
}

.quick-action-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.quick-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.quick-icon.deals {
  background: #fff3e0;
  color: #e65100;
}

.quick-icon.search {
  background: #e3f2fd;
  color: #1565c0;
}

.quick-icon.orders {
  background: #f3e5f5;
  color: #7b1fa2;
}

.quick-icon.cart {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Section Container */
.section-container {
  padding: 1rem;
}

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

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  display: flex;
  align-items: center;
}

.see-all-btn {
  background: none;
  border: none;
  color: var(--primary-green);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.product-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Categories Scroll */
.categories-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border-radius: 1rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 4.5rem;
  border: 2px solid transparent;
}

.category-card:active {
  transform: scale(0.95);
}

.category-card.active {
  border-color: var(--primary-green);
  background: #e8f5e9;
}

.category-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.375rem;
}

.category-icon.color-1 {
  background: #ffebee;
  color: #c62828;
}
.category-icon.color-2 {
  background: #e8f5e9;
  color: #2e7d32;
}
.category-icon.color-3 {
  background: #fff3e0;
  color: #e65100;
}
.category-icon.color-4 {
  background: #e3f2fd;
  color: #1565c0;
}
.category-icon.color-5 {
  background: #f3e5f5;
  color: #7b1fa2;
}
.category-icon.color-6 {
  background: #fff8e1;
  color: #f57f17;
}
.category-icon.color-all {
  background: var(--light-gray);
  color: var(--text-muted);
}

.category-name {
  font-size: 0.75rem;
  color: var(--text-dark);
  text-align: center;
  white-space: nowrap;
}

/* Deals Section */
.deals-section {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  margin: 0 1rem;
  border-radius: 1rem;
  padding: 1rem;
}

.deals-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.deals-scroll::-webkit-scrollbar {
  display: none;
}

.deal-card {
  flex-shrink: 0;
  width: 12rem;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.deal-card:active {
  transform: scale(0.98);
}

.deal-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #dc3545;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  z-index: 1;
}

.deal-image {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  background: var(--light-gray);
}

.deal-info {
  padding: 0.625rem;
  position: relative;
}

.deal-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
  height: 2.125rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.deal-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.deal-price {
  font-size: 1rem;
  font-weight: 700;
  color: #dc3545;
}

.deal-original {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.deal-add-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deal-add-btn:hover {
  background: #164a1a;
  transform: scale(1.1);
}

.deal-add-btn:active,
.deal-add-btn:focus {
  background: #0f3612 !important;
  transform: scale(0.95);
  outline: none;
}

/* Popular Section */
.popular-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.popular-scroll::-webkit-scrollbar {
  display: none;
}

.popular-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  padding: 0.75rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 12rem;
}

.popular-card:active {
  transform: scale(0.98);
}

.popular-image {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  background: var(--light-gray);
}

.popular-info {
  flex: 1;
  min-width: 0;
}

.popular-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 0.125rem;
}

.popular-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-green);
}

.popular-price.sale {
  color: #dc3545;
}

.popular-original {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.popular-add-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.popular-add-btn:hover {
  background: #164a1a;
  transform: scale(1.1);
}

.popular-add-btn:active,
.popular-add-btn:focus {
  background: #0f3612 !important;
  transform: scale(0.95);
  outline: none;
}

/* All Products Section */
.all-products-section {
  background: white;
  border-radius: 1.5rem 1.5rem 0 0;
  padding-top: 1.25rem;
  min-height: 20rem;
}

/* Updated Product Grid */
.home-page .product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0;
}

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

.home-page .product-card,
.search-page .product-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.home-page .product-card:active,
.search-page .product-card:active {
  transform: scale(0.98);
}

.product-image-container {
  position: relative;
  aspect-ratio: 1;
  background: var(--light-gray);
}

.product-image-container .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-add-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-add-btn:hover {
  background: #164a1a;
  transform: scale(1.1);
}

.quick-add-btn:active,
.quick-add-btn:focus {
  background: #0f3612 !important;
  transform: scale(0.95);
  outline: none;
}

.home-page .product-info,
.search-page .product-info {
  padding: 0.75rem;
}

.home-page .product-name,
.search-page .product-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
  height: 2.125rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: auto;
}

.product-meta {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.home-page .product-price,
.search-page .product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-top: 0;
}

.home-page .product-price.sale,
.search-page .product-price.sale {
  color: #dc3545;
}

.home-page .product-unit,
.search-page .product-unit {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Empty Products State */
.empty-products {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-products i {
  font-size: 3rem;
  opacity: 0.3;
  display: block;
  margin-bottom: 0.75rem;
}

.empty-products p {
  font-size: 0.875rem;
  margin: 0;
}

/* Skeleton Loading */
.skeleton {
  pointer-events: none;
}

.skeleton .skeleton-image {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  aspect-ratio: 1;
  border-radius: 0.5rem;
}

.skeleton .skeleton-text {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 0.875rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.skeleton .skeleton-text.short {
  width: 60%;
}

.deal-card.skeleton .skeleton-image {
  height: 8rem;
}

.popular-card.skeleton .skeleton-image {
  width: 3.5rem;
  height: 3.5rem;
  aspect-ratio: auto;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
}
