/* ============================================
   CRAFT STUDIO - ENHANCED CUSTOMER STYLES
   Modern, Clean, and Cohesive Design System
   ============================================ */

:root {
  --orange: #ff6600;
  --orange-dark: #e55a00;
  --orange-light: #ff8a00;
  --orange-pale: #fff4ec;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --error: #ef4444;
  --error-bg: #fee2e2;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Light Theme (Default) */
  --bg-primary: #fffdfa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #718096;
  --text-dark: #0f172a;
  --border-color: #e5e5e5;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2a2a2a;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-muted: #888888;
  --text-dark: #f5f5f5;
  --border-color: #3a3a3a;
  --shadow-color: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 1px 2px 0 var(--shadow-color);
  --shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  --shadow-md: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
  --shadow-lg: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
  --shadow-xl: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background pattern from login page */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 138, 0, 0.02) 35px, rgba(255, 138, 0, 0.02) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255, 138, 0, 0.02) 35px, rgba(255, 138, 0, 0.02) 70px);
  z-index: -2;
}
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 138, 0, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(255, 138, 0, 0.04) 0%, transparent 40%);
    animation: gradientShift 20s ease-in-out infinite;
    z-index: -1;
    opacity: 0.7;
}
@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
    50% { transform: translate(20px, -30px) rotate(10deg); opacity: 1; }
}

/* ============================================
   HEADER - Enhanced with animations
   ============================================ */
.header {  
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.logo {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
  color: white;
}

.logo:hover {
  transform: scale(1.05);
}

.topright {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topright a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: var(--transition);
  padding: 6px 0;
}

.topright a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.topright a:hover {
  opacity: 0.9;
}

.topright a:hover::after {
  width: 100%;
}

.topright a.icon-link {
  font-size: 18px; /* Larger icon size */
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* Needed for tooltip */
}

.topright a.icon-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  opacity: 1; /* Override default hover opacity */
}

.topright a.icon-link::after {
  /* Remove the underline effect for icon links */
  display: none;
}

.settings-dropdown-item, .settings-dropdown-item span {
  color: var(--text-secondary);
  text-decoration: none;
}

.topright a.icon-link .tooltip {
  visibility: hidden;
  width: max-content;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  position: absolute;
  z-index: 1;
  bottom: -40px; /* Position the tooltip below the icon */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  font-size: 13px;
  font-weight: 500;
}

.topright a.icon-link:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.count-badge {
  background: white;
  color: var(--orange);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11px;
  margin-left: 4px;
  animation: pulse 2s infinite;
}

/* Settings Dropdown */
.settings-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  width: 220px;
  z-index: 101;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: none; /* Hidden by default */
  animation: fadeIn 0.2s ease-out;
}
.settings-dropdown.show {
  display: block;
}
.settings-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}
.settings-dropdown-header .user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-dropdown-header .user-email {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.settings-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}
.settings-dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}
.settings-dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 6px 0;
}
.settings-dropdown-item.logout {
  color: var(--error);
}
.settings-dropdown-item.logout:hover {
  background-color: var(--error-bg);
}
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 48px;
}

.theme-switch input {
  display:none;
}

.slider {
  background-color: rgba(255,255,255,0.3);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #303136;
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: var(--orange-light);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding: 32px 20px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
}

h2 {
  font-size: 28px;
  color: var(--orange);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
}

h3 {
  font-size: 20px;
  color: var(--text-primary);
}

.page-title {
  margin-bottom: 32px;
}

.muted,
.small {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================================
   BUTTONS - Enhanced with effects
   ============================================ */
.btn,
button.btn {
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  background: var(--orange);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled,
button.btn:disabled {
  background: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 1px 2px 0 var(--shadow-color);
}
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* ============================================
   CARDS - Enhanced with hover effects
   ============================================ */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card:hover {
  box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
  transform: translateY(-4px) scale(1.01);
  border-color: var(--orange-light);
}

/* ============================================
   ALERTS & NOTICES
   ============================================ */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.4s ease-out;
  border-left: 4px solid;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.alert::before {
  content: 'ℹ️';
  font-size: 20px;
}

.alert {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: #92400e;
}

.alert-success {
  background: var(--success-bg);
  border-color: var(--success);
  color: #065f46;
}

.alert-success::before {
  content: '✓';
}

.alert-error {
  background: var(--error-bg);
  border-color: var(--error);
  color: #991b1b;
}

.alert-error::before {
  content: '⚠';
}

/* Alert icons (for SVG usage in register.php) */
.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================
   CATEGORY SECTION - Enhanced cards
   ============================================ */
.category-section {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  animation: fadeIn 0.6s ease-out;
}

.category-section h2 {
  margin-bottom: 24px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 0;
}

.category-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  text-decoration: none;
  color: var(--text-secondary);
  padding: 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--orange-pale) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
  border-color: var(--orange);
}

.category-image {
  width: 100%;
  max-width: 140px;
  height: 90px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-tertiary);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
  transform: scale(1.1);
}

.category-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  text-transform: capitalize;
  position: relative;
  z-index: 1;
}

.category-card.active {
  border-color: var(--orange);
  background: var(--orange-pale);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.category-card.active h3 {
  color: var(--orange);
}

/* New full-width section for category tabs */
.category-bar-wrapper {
  background-color: var(--bg-secondary);
  box-shadow: 0 1px 2px 0 var(--shadow-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

/* Adjustments for tabs inside the new wrapper */
.category-bar-wrapper .tabs {
  border-bottom: none;
  margin-bottom: 0;
}

/* ============================================
   PRODUCT GRID - Enhanced cards
   ============================================ */
.section-title {
  margin-bottom: 28px;
  font-size: 26px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
  border-color: var(--orange-light);
}

.product-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: var(--bg-tertiary);
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.1);
}

.discount-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  z-index: 10;
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.product-category {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.product-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 4px 0;
}

.price-section {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.price-original {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-discounted {
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
}

.price-regular {
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
}

.stock-info {
  margin: 8px 0;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--success);
  background: var(--success-bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.stock-badge::before {
  content: '✓';
  font-weight: 700;
}

.btn-view {
  width: 100%;
  padding: 12px;
  margin-top: auto;
}

.no-products {
  background: var(--bg-secondary);
  padding: 80px 40px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
}

.no-products p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}
/* ============================================
   LIKE & COMMENT SECTION (IN MODAL)
   ============================================ */
.social-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.like-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-like:hover {
  border-color: var(--orange-light);
  color: var(--orange);
  background: var(--orange-pale);
}

.btn-like.liked {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
}

.btn-like.liked .fa-heart {
  animation: heartBeat 0.4s ease-out;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.like-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.comments-container {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 10px; /* For scrollbar */
}

.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.comment-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.comment-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.no-comments {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.comment-input-area {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================
   MODAL - Enhanced with animations
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999; /* overlay should sit under the dialog but above page content */
}

.modal-dialog {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  animation: modalSlideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  margin: 5vh auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 10vh);
  z-index: 1001; /* ensure dialog is above the overlay */
}

.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2, .modal-header h3 {
  margin: 0;
  font-size: 22px;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px 30px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  text-align: right;
  flex-shrink: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 24px;
  max-width: 1300px; /* Further increased width for a wider modal */
  width: 100%;
  display: flex;
  gap: 40px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1001; /* Ensure it's above the overlay */
  overflow: visible; /* Allow close button to be outside */
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close, .close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  line-height: 1;
  background: transparent;
  border: none;
  z-index: 10; /* Ensure it's above other modal content */
}

.modal-close:hover, .close:hover {
  background: var(--orange-pale);
  color: var(--orange);
  transform: rotate(90deg);
}

.modal-left {
  flex: 1;
  max-width: 50%; /* Give more space to the image */
  min-width: 0;
  position: sticky;
  top: 0;
  align-self: flex-start; /* Stick to the top */
}

.modal-left img {
  width: 100%; /* The image will fill the new, larger container */
  height: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  max-height: 500px;
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.modal-right {
  flex: 1;
  max-width: 50%; /* Adjust right side to balance */
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  overflow-y: auto; /* Make this part scrollable */
}

.modal-right h3 {
  font-size: 26px;
  margin: 0;
}

.modal-right p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 14px;
}

.modal-price-section {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin: 12px 0;
}

.modal-discount-badge {
  display: inline-block;
  background: var(--orange);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.modal-price-original {
  font-size: 16px;
  color: var(--text-secondary);
  text-decoration: line-through;
  margin-bottom: 6px;
}

.modal-price-discounted,
.modal-price-regular {
  font-size: 30px;
  font-weight: 700;
  color: var(--orange);
}

.shipping-info {
  margin-top: 12px;
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shipping-info::before {
  content: '🚚';
}

.variant-section {
  margin: 16px 0;
}

.variant-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.option-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-box {
  padding: 12px 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
}

.option-box:hover {
  border-color: var(--orange-light);
  background: var(--orange-pale);
}

.option-box.selected {
  border-color: var(--orange);
  background: var(--orange-pale);
  color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-control button {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  transition: var(--transition);
}

.qty-control button:hover {
  background: var(--orange-pale);
  color: var(--orange);
}

.qty-control input {
  width: 70px;
  height: 44px;
  border: none;
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.stock-label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.stock-label span {
  color: var(--success);
  font-weight: 600;
}

textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 90px;
  transition: var(--transition);
}

textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-cart {
  flex: 2;
  padding: 16px 24px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
}

.btn-cart:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-wishlist {
  flex: 1;
  padding: 16px 24px;
  background: var(--bg-secondary);
  color: var(--orange);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-wishlist:hover {
  background: var(--orange);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.notice {
  color: var(--orange);
  font-weight: 600;
  text-align: center;
  margin: 0;
  padding: 16px;
  background: var(--orange-pale);
  border-radius: var(--radius);
  border: 2px dashed var(--orange);
}

/* ============================================
   TABLES - Enhanced design
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
}

th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  text-align: left;
  padding: 16px;
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: var(--bg-tertiary);
}

table img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px 0 var(--shadow-color);
}

/* ============================================
   FORMS - Enhanced inputs
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

body.dark-mode select option,
body.dark-mode select optgroup {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Phone input group styling */
.form-group .phone-input-group {
  display: flex;
  align-items: center;
}
.form-group .phone-input-group span {
  padding: 12px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}
.form-group .phone-input-group input {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--orange);
}

/* ============================================
   TABS - Enhanced design
   ============================================ */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  padding: 10px 0; /* Padding for the scrollable area */
}

.tabs::-webkit-scrollbar {
  height: 6px;
}

.tabs::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.tabs::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}
/* Style for individual category chips */
.tab {
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 20px; /* Pill shape */
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  font-size: 14px;
  white-space: nowrap; /* Prevent text wrapping */
  flex-shrink: 0; /* Prevent chips from shrinking */
}

.tab:hover {
  background: var(--orange-pale);
  color: var(--orange-dark);
  border-color: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 1px 2px 0 var(--shadow-color);
}

.tab.active {
  background: var(--orange);
  color: var(--orange);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
  transform: translateY(-2px);
}

.tab.active::after {
  width: 100%;
}

/* ============================================
   CHECKOUT & SHIPPING SECTIONS
   ============================================ */
.shipping-info-section {
  display: none;
  margin-top: 20px;
  animation: fadeIn 0.4s ease-out;
}

.info-box {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 2px solid;
  background: var(--bg-secondary);
  box-shadow: 0 1px 2px 0 var(--shadow-color);
}

.pickup-box {
  border-color: var(--success);
  background: var(--success-bg);
}

.delivery-box {
  border-color: #3b82f6;
  background: #eff6ff;
}

.info-box h4 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-text {
  margin: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-note {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  border-left: 3px solid var(--orange);
}

.zone-info {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 4px solid #3b82f6;
}

.zone-info.warning {
  border-left-color: var(--warning);
  background: var(--warning-bg);
}

.shipping-fee-amount {
  color: var(--orange);
  font-weight: 700;
  font-size: 18px;
}

.order-total-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.total-row.grand-total {
  border-top: 2px solid var(--gray-300);
  margin-top: 12px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 20px;
  color: var(--orange);
}

/* ============================================
   GCASH PAYMENT SECTION
   ============================================ */
.gcash-section {
  display: none;
  margin-top: 20px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 2px solid #0066ff;
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
  animation: slideInRight 0.4s ease-out;
}

.gcash-section.show {
  display: block;
}

.gcash-section h4 {
  color: #0066ff;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-container {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.qr-container img {
  max-width: 260px;
  border: 3px solid #0066ff;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--bg-secondary);
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

.gcash-info {
  background: #eff6ff;
  padding: 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  border-left: 4px solid #0066ff;
}

.gcash-info p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
}

.upload-section {
  margin-top: 20px;
}

.file-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.file-input-label {
  display: block;
  padding: 18px;
  background: #0066ff;
  border: 2px solid #0066ff;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: white;
  font-weight: 600;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
}

.file-input-label:hover {
  background: #0052cc;
  border-color: #0052cc;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.file-name {
  margin-top: 10px;
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
  font-style: italic;
}

.warning-text {
  color: var(--warning);
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

/* ============================================
   PROFILE PAGE STYLES
   ============================================ */
.profile-card {
  display: flex;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
  margin-bottom: 28px;
  gap: 28px;
  align-items: flex-start;
  animation: fadeIn 0.5s ease-out;
}

.profile-pic {
  width: 150px;
  height: 150px;
  min-width: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3.5rem;
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
  border: 4px solid white;
}

.profile-info {
  flex: 1;
  min-width: 300px;
}

.info-row {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.info-row:hover {
  background: var(--bg-tertiary);
  padding-left: 8px;
  padding-right: 8px;
  border-radius: var(--radius-sm);
}

.info-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 200px;
  font-size: 14px;
}

.info-value {
  color: var(--text-primary);
  flex: 1;
  font-size: 14px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 16px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--orange);
}

.form-group {
  margin-bottom: 20px;
}

/* ============================================
   ORDER TRACKING CARDS
   ============================================ */
.order-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px 0 var(--shadow-color);
}

.order-card:hover {
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
  transform: translateY(-2px);
  border-color: var(--orange-light);
}

.btn-confirm {
  background: var(--orange);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
}

.btn-confirm:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   ORDER SUMMARY & CHECKOUT MODAL
   ============================================ */
.order-summary {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  border: 1px solid var(--border-color);
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.order-summary-item:last-child {
  border-bottom: none;
}

.order-summary-item.total-row {
  font-weight: 700;
  font-size: 18px;
  color: var(--orange);
  padding-top: 16px;
  margin-top: 12px;
  border-top: 2px solid var(--border-color);
}

.btn-cancel,
.btn-cancel-action {
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-cancel:hover,
.btn-cancel-action:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

/* ============================================
   CONFIRMATION MODAL
   ============================================ */
.confirm-modal {
  display: none; /* Hidden by default */
  position: fixed;
  inset: 0;
  z-index: 2000; /* Above other modals */
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirm-modal .modal-dialog {
  max-width: 450px;
  animation: modalSlideUp 0.3s ease-out;
  z-index: 1;
}

.confirm-modal .modal-dialog {
  /* This ensures the confirmation modal is always on top of its overlay */
  z-index: 2001;
}

.confirm-modal .modal-header h3 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--warning);
}

.confirm-modal .modal-body {
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ============================================
   REGISTRATION PAGE STYLES
   ============================================ */
.progress-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-bottom: 40px;
  max-width: 100%;
}

.progress-line {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--border-color);
  z-index: -1;
}

.progress-line-fill {
  height: 100%;
  background-color: var(--orange);
  transition: width 0.5s ease;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 120px;
  color: var(--text-muted);
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  border: 4px solid #fffdfa;
  transition: var(--transition);
}

.step-label {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
}

.step.active .step-circle {
  background-color: var(--orange);
  color: white;
}

.step.completed .step-circle {
  background-color: var(--success);
  color: white;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.verified-email {
  background-color: var(--success-bg);
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
}

.verified-email svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================
   NOTE & FOOTER LINKS
   ============================================ */
.note {
  text-align: center;
  margin-top: 25px;
  color: var(--text-muted);
  font-size: 14px;
}

.note a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.note a:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}


/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .topright {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .container {
    padding: 20px 16px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .product-card img {
    height: 200px;
  }

  .category-cards {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .modal-content {
    flex-direction: column;
    padding: 24px;
    gap: 24px;
  }
  .modal-dialog {
    padding: 24px;
    margin: 2vh auto;
    gap: 24px;
  }

  .modal-left img {
    max-height: 300px;
  }

  .actions {
    flex-direction: column;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
  }

  .profile-pic {
    margin-bottom: 20px;
  }

  .info-row {
    flex-direction: column;
    gap: 6px;
  }

  .info-label {
    min-width: auto;
  }

  table {
    font-size: 13px;
  }

  th, td {
    padding: 12px 8px;
  }

  table img {
    width: 60px;
    height: 50px;
  }

  h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 16px 12px;
  }

  h2 {
    font-size: 22px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card img {
    height: 160px;
  }

  .card-content {
    padding: 14px;
  }

  .product-name {
    font-size: 14px;
    min-height: 38px;
  }

  .price-discounted,
  .price-regular {
    font-size: 18px;
  }

  .modal-content {
    padding: 20px; /* Kept for old structure */
  }

  .modal-header { padding: 16px 20px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 16px 20px; }
  .modal-close {
    top: 10px; right: 10px; width: 32px; height: 32px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  .login-container {
    flex-direction: column;
  }
  .login-left-side, .login-right-side {
    padding: 40px;
  }
  .login-hero-title {
    font-size: 36px;
  }
}



/* ============================================
   ORDER DETAILS MODAL
   ============================================ */
.order-details-body {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.modal-left-col {
  flex: 1.5;
  min-width: 100%;
  min-width: 300px;
}

.main-image-container {
  width: 100%;
  height: 350px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.main-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-right-col {
  flex: 1;
  min-width: 100%;
  min-width: 250px;
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--radius);
  max-height: 500px;
  overflow-y: auto;
}

.order-items-list {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.order-item {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
}
.order-item:last-child { border-bottom: none; }
.order-item:hover { background-color: var(--bg-tertiary); }

.order-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.password-input-wrapper input {
  padding-right: 50px;
}


/* ============================================
   CUSTOM NOTIFICATION (TOAST)
   ============================================ */
.toast-notification {
  position: fixed;
  top: 90px;
  right: 20px;
  background-color: #333;
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.toast-notification.show {
  transform: translateX(0);
}
.toast-notification.hide {
  transform: translateX(120%);
}
.toast-notification.success {
  background: linear-gradient(135deg, var(--success), #059669);
}
.toast-notification.error {
  background: linear-gradient(135deg, var(--error), #dc2626);
}
.toast-notification::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: rgba(255,255,255,0.3);
  animation: toast-progress 3.5s linear forwards;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-notification-icon {
  flex-shrink: 0;
}
.toast-notification-icon svg {
  width: 24px;
  height: 24px;
}
.toast-notification-message {
  font-size: 14px;
  font-weight: 500;
}

/* ============================================
   PRODUCT REVIEWS LIST
   ============================================ */
.reviews-list-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 5px;
  margin-top: 16px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.review-item {
  padding: 16px 10px;
  border-bottom: 1px solid var(--border-color);
}
.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 600;
  color: var(--text-primary);
}

.review-date {
  font-size: 13px;
  color: var(--text-muted);
}

.review-rating .review-star {
  font-size: 1.2rem;
  color: #d3d3d3;
}
.review-rating .review-star.filled {
  color: #ffc107;
}
.review-comment {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

.review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.review-actions {
  display: flex;
  gap: 12px;
}

.review-vote-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.review-vote-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.review-vote-btn.active {
  color: var(--orange);
  border-color: var(--orange-pale);
  background-color: var(--orange-pale);
}

.review-vote-btn.disabled {
  cursor: default;
}
.review-vote-btn.disabled:hover {
  background-color: transparent;
}
/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header,
  .btn,
  button {
    display: none;
  }
}