/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,700;1,700&family=Poppins:wght@300;400;600;700&family=Tajawal:wght@300;400;500;700;900&display=swap');

:root {
  /* ===== Primary Colors ===== */
  --primary: #FF69B4;
  --primary-light: #FFB6C1;
  --primary-pale: #FFE4E1;
  --primary-dark: #FF1493;
  
  /* ===== Neutral Colors ===== */
  --white: #FFFFFF;
  --bg-light: #FFF5F7;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border: #FFD1DC;
  --border-light: #FFE4E1;
  
  /* ===== State Colors ===== */
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;
  --info: #2196F3;
  
  /* ===== Shadows ===== */
  --shadow-sm: 0 4px 10px rgba(255, 105, 180, 0.05);
  --shadow-md: 0 8px 20px rgba(255, 105, 180, 0.08);
  --shadow-lg: 0 12px 30px rgba(255, 105, 180, 0.12);
  --shadow-hover: 0 12px 35px rgba(255, 105, 180, 0.18);
  
  /* ===== Border Radius ===== */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 25px;
  --radius-full: 50%;
  
  /* ===== Spacing ===== */
  --spacing-xs: 4px;
  --spacing-sm: 6px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 28px;
  
  /* ===== Alignments ===== */
  --direction: rtl;
  --text-align: right;
}

/* ==========================================================================
   Mobile-First Base Styles (Default for Mobile)
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Tajawal', 'Cairo', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  direction: var(--direction);
  text-align: var(--text-align);
  background-color: var(--bg-light);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

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

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
  max-width: 100%;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Spinner ===== */
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--primary-pale);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

/* ===== Toast Alerts ===== */
.toast-container {
  position: fixed;
  top: 15px;
  left: 15px;
  right: 15px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.3s ease;
  text-align: center;
  pointer-events: auto;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toast-message { flex: 1; text-align: right; }
.toast-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-close:hover {
  opacity: 1;
  transform: scale(1.1);
}
.toast-close:active {
  transform: scale(0.95);
}
.toast-success { background-color: var(--success); }
.toast-error { background-color: var(--error); }
.toast-warning { background-color: var(--warning); }
.toast-info { background-color: var(--info); }

/* ===== Custom Confirm Dialog ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(51, 51, 51, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.25s ease;
  padding: 15px;
}

.modal-content {
  background-color: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--primary);
}

.modal-title {
  color: var(--primary-dark);
  font-size: 18px;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
}
.btn-secondary:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--error);
  color: var(--white);
}
.btn-danger:hover {
  background-color: #d32f2f;
  transform: translateY(-2px);
}

/* ===== Inputs styling ===== */
.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background-color: var(--white);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.15);
  background-color: var(--white);
}

/* Replace simple boxes/checkboxes with customized icons style toggles */
.radio-group {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) 0;
  flex-wrap: wrap;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  background-color: var(--white);
  border: 1.5px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  font-size: 13px;
  color: var(--text-secondary);
}

.radio-label input[type="radio"], 
.radio-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.radio-label:has(input:checked) {
  border-color: var(--primary);
  background-color: var(--bg-light);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

/* ===== Header ===== */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-sm) 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  row-gap: var(--spacing-sm);
  column-gap: var(--spacing-md);
  align-items: center;
  width: 100%;
}

.logo-link {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.header-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  justify-content: flex-end;
  width: auto;
  flex-shrink: 0;
}

.search-wrapper {
  grid-column: 1 / span 2;
  grid-row: 2;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}

.search-input {
  padding: 8px 36px 8px 12px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  outline: none;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.15);
}

.search-icon {
  position: absolute;
  right: 14px;
  color: var(--primary);
  pointer-events: none;
}

.cart-icon-btn, .admin-login-btn {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-size: 16px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background-color: var(--bg-light);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cart-icon-btn:hover, .admin-login-btn:hover {
  background-color: var(--primary-pale);
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: -2px;
  left: -2px;
  background-color: var(--primary-dark);
  color: var(--white);
  font-size: 10px;
  font-weight: bold;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
}

/* ===== Filter Bar ===== */
.filter-bar-section {
  padding: var(--spacing-md) 0 var(--spacing-xs) 0;
}

.filter-title {
  font-size: 15px;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  font-weight: 700;
}

.filters-container {
  display: flex;
  gap: var(--spacing-xs);
  overflow-x: auto;
  flex-wrap: nowrap;
  padding: 4px 0 8px 0;
  -webkit-overflow-scrolling: touch;
}

.filters-container::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 6px 10px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background-color: var(--white);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
  font-size: 12px;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background-color: var(--bg-light);
}

.filter-btn.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.more-filters-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  display: none;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  margin-top: 4px;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  padding: 10px 14px;
  text-align: right;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: 13px;
  color: var(--text-secondary);
}

.dropdown-item:hover {
  background-color: var(--bg-light);
  color: var(--primary-dark);
}

/* ===== Products Section ===== */
.products-section {
  padding: var(--spacing-sm) 0 var(--spacing-2xl) 0;
  flex-grow: 1;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.product-image-container {
  width: 100%;
  padding-top: 100%;
  position: relative;
  background-color: var(--bg-light);
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 6px;
  flex-grow: 1;
}

.product-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
  max-height: 31px;
}

.product-rating {
  color: #FFD700;
  font-size: 9px;
  display: none;
}

.product-description {
  display: none !important;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.product-stock-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-available {
  background-color: #E8F5E9;
  color: var(--success);
}

.badge-low-stock {
  background-color: #FFF3E0;
  color: var(--warning);
}

.badge-unavailable {
  background-color: #FFEBEE;
  color: var(--error);
}

.add-to-cart-btn {
  grid-column: 2;
  margin-top: 0;
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 8px !important;
  border-radius: var(--radius-md) !important;
  font-size: 11px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
}

.add-to-cart-btn i {
  font-size: 11px !important;
  margin: 0 !important;
}

.details-btn {
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 8px !important;
  border-radius: var(--radius-md) !important;
  font-size: 11px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: var(--bg-light);
  color: var(--primary-dark);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-top: 2px;
}

.details-btn:hover {
  background-color: var(--primary-pale);
  transform: translateY(-1px);
}

.details-btn:active {
  transform: translateY(0);
}

.details-btn i {
  font-size: 11px;
}

/* ===== Product Detail Modal ===== */
.product-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn 0.25s ease;
}

.product-detail-modal.show {
  display: flex;
}

.product-detail-content {
  background-color: var(--white);
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 20px);
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-detail-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(255, 255, 255, 0.95);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 16px;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.product-detail-close:hover {
  transform: scale(1.1);
}

.product-detail-image-wrap {
  width: 100%;
  height: 360px;
  position: relative;
  background-color: var(--bg-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Product Image Carousel */
.product-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.product-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.product-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-light);
}

.product-carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.product-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 2;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: inherit;
}

.product-carousel-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.product-carousel-prev {
  right: 8px;
}

.product-carousel-next {
  left: 8px;
}

.product-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.product-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.product-carousel-dot.active {
  background: var(--primary);
  width: 22px;
  border-radius: 4px;
}

/* ===== Star Ratings ===== */
.stars-display {
  display: inline-flex;
  gap: 1px;
  color: #e0e0e0;
}

.stars-display .fa-star {
  font-size: var(--star-size, 16px);
  color: #e0e0e0;
}

.stars-display .star-full {
  color: #ffb300;
}

.stars-display .star-half {
  background: linear-gradient(90deg, #ffb300 50%, #e0e0e0 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.product-detail-rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rating-stars-wrap {
  display: inline-flex;
}

.rating-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.rating-text a {
  color: var(--primary);
  text-decoration: none;
  margin-right: 4px;
}

.rating-text a:hover {
  text-decoration: underline;
}

/* Ratings Section */
.product-ratings-section {
  margin-top: 8px;
}

.rating-write-btn {
  margin-right: auto;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius-md);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.rating-write-btn:hover {
  background: var(--primary);
  color: #fff;
}

.rating-form {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rating-stars-input {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-direction: row-reverse;
}

.star-input {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  font-size: 26px;
  color: #e0e0e0;
  transition: transform 0.15s ease;
  font-family: inherit;
}

.star-input:hover {
  transform: scale(1.15);
}

.star-input.active,
.star-input.hovered {
  color: #ffb300;
}

.rating-review-input {
  width: 100%;
  min-height: 70px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: var(--white);
}

.rating-review-input:focus {
  outline: none;
  border-color: var(--primary);
}

.rating-form-actions {
  display: flex;
  gap: 8px;
}

.rating-form-actions .btn {
  flex: 1;
}

.rating-user-existing {
  font-size: 12px;
  color: var(--info);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ratings-list {
  margin-top: 4px;
}

.ratings-empty,
.ratings-loading {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.ratings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ratings-empty i {
  font-size: 28px;
  opacity: 0.3;
}

.rating-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.rating-item:last-child {
  border-bottom: none;
}

.rating-item-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.rating-item-body {
  flex: 1;
  min-width: 0;
}

.rating-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.rating-item-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.rating-item-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.rating-item-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.rating-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.rating-item-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  font-family: inherit;
}

.rating-item-action-btn:hover {
  color: var(--primary);
}

.rating-item-action-btn.delete:hover {
  color: var(--error);
}

/* Star on product card (compact) */
.product-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.product-card-rating .stars-display {
  color: #ffb300;
}

/* ===== Favorite (Heart) Button ===== */
.product-fav-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  z-index: 3;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-family: inherit;
  padding: 0;
}

.product-fav-btn:hover {
  transform: scale(1.1);
  color: var(--primary);
  background: #fff;
  border-color: var(--primary);
}

.product-fav-btn.active {
  color: #e91e63;
  background: #fff;
  border-color: #e91e63;
}

.product-fav-btn.active i {
  font-weight: 900;
}

.product-fav-btn.pulsing {
  animation: heartPulse 0.4s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Bottom nav favorites badge */
.bottom-nav-item .bottom-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--error);
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid var(--white);
}

.bottom-nav-item .bottom-nav-badge.visible {
  display: flex;
}

/* Favorites Page */
.favorites-page-header {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.favorites-page-header h1 {
  font-size: 22px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.favorites-page-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.favorites-clear-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: var(--spacing-md);
  font-size: 13px;
}

.favorites-clear-bar .favorites-count {
  color: var(--text-primary);
  font-weight: 600;
}

.favorites-clear-btn {
  background: none;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.favorites-clear-btn:hover {
  background: var(--error);
  color: #fff;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

@media (min-width: 768px) {
  .favorites-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }
}

@media (min-width: 1024px) {
  .favorites-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.favorites-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.favorites-empty img {
  width: 120px;
  opacity: 0.5;
  margin-bottom: 12px;
}

.favorites-empty h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.favorites-empty p {
  font-size: 13px;
  margin-bottom: 16px;
}

.favorites-toast-login {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.favorites-toast-login button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ===== My Orders Page ===== */
.my-orders-header {
  text-align: center;
  margin: var(--spacing-md) 0;
}

.my-orders-header h1 {
  font-size: 22px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.my-orders-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.my-orders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .my-orders-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

@media (min-width: 1024px) {
  .my-orders-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.my-order-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.my-order-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

.my-order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.my-order-card-number {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 14px;
}

.my-order-card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 700;
}

.my-order-card-status.status-pending { background: #fff3e0; color: #f57c00; }
.my-order-card-status.status-confirmed { background: #e8f5e9; color: #2e7d32; }
.my-order-card-status.status-shipped { background: #f3e5f5; color: #7b1fa2; }
.my-order-card-status.status-delivered { background: #e0f2f1; color: #00695c; }
.my-order-card-status.status-cancelled { background: #ffebee; color: #c62828; }

.my-order-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.my-order-card-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

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

.my-order-card-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
}

.my-order-card-total {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
}

.my-order-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.my-order-card-action {
  flex: 1;
  padding: 8px 10px;
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.my-order-card-action:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.my-order-card-action.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.my-order-card-action.primary:hover {
  background: var(--primary-dark);
}

.my-orders-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.my-orders-empty i {
  font-size: 64px;
  color: var(--primary);
  opacity: 0.3;
  display: block;
  margin-bottom: 12px;
}

.my-orders-empty h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.my-orders-empty p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* My Order Details Modal */
.my-order-details-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-light);
}

.my-order-details-id {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.my-order-details-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.my-order-details-body {
  padding: var(--spacing-lg);
  max-height: 50vh;
  overflow-y: auto;
}

.my-order-details-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.my-order-details-info-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

.my-order-details-info-row .label {
  color: var(--text-secondary);
}

.my-order-details-info-row .value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
}

.my-order-details-items {
  margin-top: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.my-order-details-items h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.my-order-details-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.my-order-details-item:last-child {
  border-bottom: none;
}

.my-order-details-item-name {
  flex: 1;
  color: var(--text-primary);
}

.my-order-details-item-qty {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.my-order-details-item-subtotal {
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
}

.my-order-details-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--border-light);
  font-size: 16px;
  font-weight: 700;
}

.my-order-details-total-amount {
  color: var(--primary-dark);
  font-size: 18px;
}

.my-order-details-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border-light);
  background: var(--bg-light);
  display: flex;
  gap: 8px;
}

.my-order-details-footer .btn {
  flex: 1;
}

/* ===== My Orders Page (Redesigned) ===== */
.app-top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 14px 0;
}

.app-top-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-top-back,
.app-top-action {
  width: 38px;
  height: 38px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.app-top-back:hover,
.app-top-action:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
}

.app-top-title {
  flex: 1;
  text-align: center;
}

.app-top-title h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 2px;
  background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-top-title p {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0;
}

/* Orders Stats Cards */
.orders-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: var(--spacing-md) 0;
}

@media (min-width: 768px) {
  .orders-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.orders-stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.orders-stat-card::after {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.08;
}

.orders-stat-card:hover {
  transform: translateY(-2px);
}

.orders-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.orders-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.orders-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.orders-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.orders-stat-total .orders-stat-icon { background: #fce4ec; color: #c2185b; }
.orders-stat-total::after { background: #e91e63; }
.orders-stat-active .orders-stat-icon { background: #fff3e0; color: #f57c00; }
.orders-stat-active::after { background: #ff9800; }
.orders-stat-delivered .orders-stat-icon { background: #e8f5e9; color: #2e7d32; }
.orders-stat-delivered::after { background: #4caf50; }
.orders-stat-spent .orders-stat-icon { background: #f3e5f5; color: #7b1fa2; }
.orders-stat-spent::after { background: #9c27b0; }

/* Orders Tabs (Filter Pills) */
.orders-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: var(--spacing-md);
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.orders-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s ease;
}

.orders-tab i {
  font-size: 12px;
}

.orders-tab:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.orders-tab.active {
  background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

/* Orders List */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--spacing-lg);
}

.orders-loading,
.orders-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.orders-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.orders-empty-illustration {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.15);
}

.orders-empty h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin: 0 0 6px;
  font-weight: 700;
}

.orders-empty p {
  font-size: 13px;
  margin: 0 0 18px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* Order Card */
.order-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.order-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.1);
  transform: translateY(-2px);
}

.order-card-top {
  padding: 14px 16px;
  background: linear-gradient(135deg, #fafafa 0%, #fdf2f8 100%);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-card-number {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-card-number-text {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary-dark);
}

.order-card-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.order-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.order-status-pill.status-pending { background: #fff3e0; color: #e65100; }
.order-status-pill.status-confirmed { background: #e8f5e9; color: #1b5e20; }
.order-status-pill.status-shipped { background: #f3e5f5; color: #6a1b9a; }
.order-status-pill.status-delivered { background: #e0f2f1; color: #004d40; }
.order-status-pill.status-cancelled { background: #ffebee; color: #b71c1c; }

/* Order Timeline Progress Bar */
.order-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  position: relative;
  gap: 4px;
}

.order-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.order-timeline-step::before {
  content: '';
  position: absolute;
  top: 10px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: #e0e0e0;
  z-index: -1;
}

.order-timeline-step:first-child::before { display: none; }

.order-timeline-step.completed::before {
  background: linear-gradient(90deg, #4caf50 0%, #2e7d32 100%);
}

.order-timeline-step .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.order-timeline-step.completed .dot {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.order-timeline-step.current .dot {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.2);
  animation: pulseDot 1.5s ease-in-out infinite;
}

.order-timeline-step.cancelled .dot {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

.order-timeline-step.cancelled::before {
  background: #f44336;
}

.order-timeline-step .label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.order-timeline-step.completed .label,
.order-timeline-step.current .label {
  color: var(--text-primary);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Order Card Body */
.order-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card-items-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-card-items-imgs {
  display: flex;
  gap: -8px;
  flex-shrink: 0;
}

.order-card-items-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--white);
  background: var(--bg-light);
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.order-card-items-img:not(:first-child) {
  margin-right: -10px;
}

.order-card-items-img.more {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.order-card-items-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.order-card-items-text strong {
  display: block;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

.order-card-summary-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.order-card-summary-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}

.order-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}

.order-card-action {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.order-card-action:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.order-card-action.primary {
  background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
  color: #fff;
  border-color: transparent;
}

.order-card-action.primary:hover {
  background: linear-gradient(135deg, #ad1457 0%, #880e4f 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

/* Order Details Modal (Redesigned) */
.order-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: orderModalFade 0.25s ease;
}

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

@media (min-width: 768px) {
  .order-modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.order-modal {
  background: var(--white);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: orderModalSlide 0.3s ease;
  position: relative;
  margin-bottom: 80px;
}

@media (min-width: 768px) {
  .order-modal {
    border-radius: var(--radius-lg);
    max-height: calc(100vh - 100px);
  }
}

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

.order-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.2s ease;
}

.order-modal-close:hover {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
  transform: rotate(90deg);
}

.order-modal-header {
  padding: 24px 20px 20px;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.order-modal-id {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.order-modal-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 4px 0;
}

.order-modal-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.order-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.order-modal-timeline {
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.order-modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.order-modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.order-modal-info-row .label {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.order-modal-info-row .value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  word-break: break-word;
}

.order-modal-items {
  margin-top: 8px;
}

.order-modal-items-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.order-modal-item:last-child {
  border-bottom: none;
}

.order-modal-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-light);
  flex-shrink: 0;
}

.order-modal-item-info {
  flex: 1;
  min-width: 0;
}

.order-modal-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-modal-item-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.order-modal-item-subtotal {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.order-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  border-radius: var(--radius-md);
}

.order-modal-total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}

.order-modal-total-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.order-modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--white);
}

.order-modal-footer .btn {
  flex: 1;
}

/* Hide customer bottom nav when modal is open */
body.modal-open {
  padding-bottom: 0 !important;
}

body.modal-open .bottom-nav {
  display: none !important;
}

/* ===== Account Page ===== */
.account-hero {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  border-radius: var(--radius-lg);
  padding: 30px 20px 24px;
  text-align: center;
  margin: var(--spacing-md) 0 var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.account-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.account-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.account-avatar {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.3);
  position: relative;
  z-index: 1;
  border: 4px solid rgba(255, 255, 255, 0.5);
}

.account-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 4px;
  position: relative;
  z-index: 1;
}

.account-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
  direction: ltr;
}

.account-meta {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 600;
}

.account-badge i {
  font-size: 10px;
}

/* Account Stats */
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: var(--spacing-md);
}

.account-stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  text-align: center;
}

.account-stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.1);
}

.account-stat-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.account-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Account Sections */
.account-section {
  margin-bottom: var(--spacing-md);
}

.account-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.account-section-title.danger {
  color: var(--error);
}

.account-section-title i {
  color: var(--primary);
  font-size: 13px;
}

.account-section-title.danger i {
  color: var(--error);
}

/* Account Menu */
.account-menu {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.account-menu-item:last-child {
  border-bottom: none;
}

.account-menu-item:hover {
  background: var(--bg-light);
}

.account-menu-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.account-menu-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-menu-text strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.account-menu-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

.account-menu-arrow {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.account-menu-item.danger-item .account-menu-icon {
  background: #ffebee;
  color: var(--error);
}

.account-menu-item.danger-item:hover {
  background: #fff5f5;
}

.account-menu-item.danger-item .account-menu-text strong {
  color: var(--error);
}

.account-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 20px 0;
  margin: 0;
}

/* Password Input Wrap */
.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-control {
  padding-left: 42px;
}

.password-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  font-family: inherit;
  border-radius: var(--radius-sm);
}

.password-toggle:hover {
  color: var(--primary);
  background: var(--bg-light);
}

/* Password Strength */
.password-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-strength-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  width: 0;
  background: #e0e0e0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.password-strength-text {
  font-size: 11px;
  font-weight: 600;
  min-width: 60px;
  text-align: left;
}

/* Delete Account */
.delete-account-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.delete-account-list li {
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-account-list li i {
  color: var(--error);
  font-size: 11px;
  width: 16px;
  text-align: center;
}

.required {
  color: var(--error);
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.btn-danger {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
  color: #fff;
  border: none;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
}

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

.product-detail-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-detail-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.product-detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.product-detail-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

.product-detail-rating {
  color: #FFD700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.product-detail-rating i {
  color: #FFD700;
}

.product-detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.product-detail-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-detail-description {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-detail-category {
  font-size: 13px;
  color: var(--primary-dark);
  background-color: var(--bg-light);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
}

.product-detail-actions {
  background-color: var(--white);
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border-light);
  margin: 0 -16px -14px -16px;
}

.product-detail-add-btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-detail-add-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.4);
}

.product-detail-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.skeleton-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 180px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-image {
  width: 100%;
  height: 100px;
  background: linear-gradient(90deg, var(--primary-pale) 25%, var(--bg-light) 50%, var(--primary-pale) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 12px;
  margin: 0 8px;
  background: linear-gradient(90deg, var(--primary-pale) 25%, var(--bg-light) 50%, var(--primary-pale) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-btn {
  height: 24px;
  margin: 4px 8px 8px 8px;
  background: linear-gradient(90deg, var(--primary-pale) 25%, var(--bg-light) 50%, var(--primary-pale) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xl);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xl);
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--white);
  color: var(--text-primary);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  font-size: 13px;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
  background-color: var(--bg-light);
}

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

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

/* ===== Empty and Error States ===== */
.empty-state, .error-state {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 100%;
}

.empty-state img, .error-state img {
  width: 120px;
  height: 120px;
  margin-bottom: var(--spacing-md);
}

.empty-state h3, .error-state h3 {
  font-size: 18px;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.empty-state p, .error-state p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

/* ===== Bottom Navigation (Customer Pages) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background-color: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  min-height: 56px;
  transition: color 0.2s ease, transform 0.15s ease;
}

.bottom-nav-item i {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav-item:active {
  transform: scale(0.95);
}

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

.bottom-nav-item.active i {
  filter: drop-shadow(0 1px 2px rgba(255, 20, 147, 0.3));
}

.bottom-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background-color: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--white);
}

.bottom-nav-badge.visible {
  display: flex;
}

/* Add bottom padding to body when bottom nav is present */
body.has-bottom-nav {
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
}

/* ===== Store Logo (static image) ===== */
.store-logo {
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.store-logo-sm {
  width: 28px;
  height: 28px;
}

.store-logo-md {
  width: 40px;
  height: 40px;
}

.store-logo-lg {
  width: 88px;
  height: 88px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ===== Footer ===== */
footer {
  background-color: var(--primary-pale);
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-lg) 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.footer-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

/* ==========================================================================
   Responsive Scaling (Media Queries for larger screens)
   ========================================================================== */

/* Tablet & iPad Portrait (min-width: 768px) */
@media (min-width: 768px) {
  :root {
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
  }

  body {
    font-size: 15px;
  }
  
  .container {
    max-width: 720px;
    padding: 0 var(--spacing-md);
  }
  
  .header-container {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .header-actions {
    width: auto;
    justify-content: flex-end;
  }

  .search-wrapper {
    width: 250px;
  }

  .search-input {
    padding: 10px 40px 10px 16px;
  }

  .cart-icon-btn, .admin-login-btn {
    font-size: 18px;
    width: 38px;
    height: 38px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .filters-container {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .product-image-container {
    padding-top: 100%;
  }

  .product-name {
    font-size: 14px;
    min-height: 36px;
    max-height: 36px;
  }

  .bottom-nav-item {
    font-size: 12px;
  }

  .bottom-nav-item i {
    font-size: 22px;
  }

  .product-price {
    font-size: 16px;
  }

  .product-description {
    display: none !important;
  }

  .product-stock-badge {
    position: static;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: var(--radius-xl);
    box-shadow: none;
  }

  .skeleton-card {
    height: 320px;
    gap: 0;
  }

  .skeleton-image {
    height: 200px;
  }

  .skeleton-text {
    height: 16px;
    margin: var(--spacing-md);
  }

  .skeleton-btn {
    height: 36px;
    margin: var(--spacing-md);
  }

  .btn {
    padding: 12px 20px;
    font-size: 15px;
    gap: 8px;
  }

  .logo-text {
    font-size: 20px;
  }

  .product-rating {
    display: none;
  }

  .product-details {
    padding: 12px;
    gap: 8px;
  }
  
  .product-meta {
    justify-content: space-between;
  }

  .add-to-cart-btn {
    height: 36px;
    font-size: 12px !important;
  }

  .add-to-cart-btn i {
    font-size: 12px !important;
  }

  .details-btn {
    height: 36px;
    font-size: 12px !important;
  }
  
  .product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
  }
  
  .product-card:hover .product-image {
    transform: scale(1.03);
    transition: transform 0.4s ease;
  }

  /* Modal becomes centered on tablet+ */
  .product-detail-modal {
    align-items: center;
  }

  .product-detail-content {
    border-radius: 20px;
    max-height: 85vh;
  }

  .product-detail-image-wrap {
    height: 420px;
  }
}

/* Desktop & Laptop Screens (min-width: 1024px) */
@media (min-width: 1024px) {
  .container {
    max-width: 980px;
  }
  
  .search-wrapper {
    width: 320px;
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }
}

/* Full Width Large Monitors (min-width: 1200px) */
@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }

  .products-grid {
    gap: var(--spacing-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
