/* ============================================
           MODERN E-COMMERCE ADMIN STYLESHEET
           Bootstrap 5 Based with Custom Enhancements
           ============================================ */

/* CSS VARIABLES - Easy Theme Customization */
:root {
  /* Primary Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-ultra-light: #eef2ff;

  /* Accent Colors */
  --accent: #ec4899;
  --accent-light: #f9a8d4;

  /* Neutral Colors */
  --dark: #1e293b;
  --dark-light: #334155;
  --gray: #64748b;
  --gray-light: #cbd5e1;
  --gray-ultralight: #f1f5f9;
  --white: #ffffff;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Spacing */
  --sidebar-width: 280px;
  --header-height: 70px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ============================================
           GLOBAL STYLES
           ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--gray-ultralight);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-ultralight);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray);
}

/* ============================================
           SIDEBAR STYLES
           ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow-xl);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

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

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
}

.sidebar-menu-item {
  margin-bottom: 0.5rem;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.sidebar-menu-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: translateX(-100%);
  transition: var(--transition);
}

.sidebar-menu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transform: translateX(4px);
}

.sidebar-menu-link.active {
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgba(99, 102, 241, 0.05) 100%
  );
  color: var(--white);
}

.sidebar-menu-link.active::before {
  transform: translateX(0);
}

.sidebar-menu-icon {
  font-size: 1.25rem;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.sidebar-section-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2rem 0 1rem;
  padding-left: 1rem;
  font-weight: 600;
}

/* ============================================
           HEADER STYLES
           ============================================ */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  height: var(--header-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: var(--shadow-sm);
  z-index: 999;
  transition: var(--transition);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-search {
  position: relative;
}

.header-search-input {
  width: 400px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 2px solid var(--gray-ultralight);
  border-radius: var(--radius-xl);
  background: var(--gray-ultralight);
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

.header-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.header-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 1.1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--gray-ultralight);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  color: var(--dark);
}

.header-icon-btn:hover {
  background: var(--primary-ultra-light);
  color: var(--primary);
  transform: translateY(-2px);
}

.header-icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: var(--white);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-user:hover {
  background: var(--gray-ultralight);
}

.header-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
}

.header-user-info {
  display: flex;
  flex-direction: column;
}

.header-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
}

.header-user-role {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ============================================
           MAIN CONTENT AREA
           ============================================ */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height));
  transition: var(--transition);
  width: calc(100% - var(--sidebar-width));
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-subtitle {
  color: var(--gray);
  font-size: 0.95rem;
}

.breadcrumb-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.breadcrumb-custom a {
  color: var(--gray);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb-custom a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--gray-light);
}

/* ============================================
           CARDS & CONTAINERS
           ============================================ */
.card-modern {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-ultralight);
}

.card-title-modern {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
           STATS CARDS
           ============================================ */
.stats-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.stats-card:hover::before {
  transform: scaleX(1);
}

.stats-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.stats-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stats-card-title {
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stats-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stats-card-icon.primary {
  background: var(--primary-ultra-light);
  color: var(--primary);
}

.stats-card-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stats-card-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stats-card-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.stats-card-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.stats-card-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.stats-card-change.positive {
  color: var(--success);
}

.stats-card-change.negative {
  color: var(--danger);
}

/* ============================================
           BUTTONS
           ============================================ */
.btn-modern {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-modern::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
  width: 300px;
  height: 300px;
}

.btn-modern span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

.btn-ghost {
  background: var(--gray-ultralight);
  color: var(--dark);
}

.btn-ghost:hover {
  background: var(--gray-light);
}

/* ============================================
           TABLES
           ============================================ */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern thead th {
  background: var(--gray-ultralight);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray);
  border: none;
}

.table-modern thead th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.table-modern thead th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.table-modern tbody tr {
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--gray-ultralight);
}

.table-modern tbody tr:hover {
  background: var(--primary-ultra-light);
}

.table-modern tbody td {
  padding: 1.25rem 1rem;
  color: var(--dark);
  font-size: 0.95rem;
}

.table-modern tbody tr:last-child td:first-child {
  border-radius: 0 0 0 var(--radius-lg);
}

.table-modern tbody tr:last-child td:last-child {
  border-radius: 0 0 var(--radius-lg) 0;
}

/* ============================================
           BADGES & STATUS
           ============================================ */
.badge-modern {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.badge-modern::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success,
.badge-SHIPPED,
.badge-DELIVERED{
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-warning,
.badge-PROCESSING,
.badge-PROCESSING_REFUND {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger,
.badge-CANCELLED,
.badge-ON_HOLD {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.badge-info,
.badge-PENDING {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.badge-primary,
.badge-REFUNDED {
  background: var(--primary-ultra-light);
  color: var(--primary);
}

/* ============================================
FORMS
============================================ */
.form-group-modern {
  margin-bottom: 1.5rem;
}

.form-label-modern {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
}

.form-control-modern {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-ultralight);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  background: var(--white);
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-select-modern {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

/* ============================================
           DROPDOWNS
           ============================================ */
.dropdown-modern {
  position: relative;
}

.dropdown-menu-modern {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.dropdown-modern:hover .dropdown-menu-modern {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item-modern {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-fast);
}

.dropdown-item-modern:hover {
  background: var(--gray-ultralight);
}

/* ============================================
                INPUT GRID
============================================ */
 .check-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.check-input-grid-item {
    padding: 0.75rem;
    border: 2px solid var(--gray-ultralight);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    cursor: pointer;
}
.check-input-grid-item:hover {
    border-color: var(--primary);
    background: var(--primary-ultra-light);
}

.check-input-grid-item input[type="checkbox"],
.check-input-grid-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* ============================================
         TAG INPUT
============================================ */
.tag-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: var(--radius-md, 8px);
    background: #fff;
}
.tag {
    display: inline-flex;
    align-items: center;
    background: var(--gray-ultralight, #f1f1f1);
    border-radius: var(--radius-md, 8px);
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}
.tag-remove {
    margin-left: 0.5rem;
    cursor: pointer;
}
.tag-input {
    border: none;
    outline: none;
    flex-grow: 1;
    min-width: 120px;
    font-size: 0.95rem;
}

/* ============================================
         SWITCH INPUT
============================================ */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light);
    transition: var(--transition-fast);
    border-radius: 28px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: var(--primary);
}

input:checked + .switch-slider:before {
    transform: translateX(24px);
}
/* ============================================
           LOGO UPLOAD
============================================ */
 .logo-upload {
     width: 120px;
     height: 120px;
     border: 2px dashed var(--gray-light);
     border-radius: var(--radius-lg);
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: var(--transition-fast);
     background: var(--gray-ultralight);
     position: relative;
     overflow: hidden;
 }
 .logo-upload:hover {
     border-color: var(--primary);
     background: var(--primary-ultra-light);
 }
 .logo-upload-preview {
     width: 100%;
     height: 100%;
     object-fit: contain;
 }


 .logo-upload-container {
     width: 100px;
     height: 100px;
     border-radius: var(--radius-lg);
     background: var(--gray-ultralight);
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 1rem;
     overflow: hidden;
 }
 .logo-upload-container img {
     width: 100%;
     height: 100%;
     object-fit: contain;
 }
/* ============================================
           MOBILE RESPONSIVE
           ============================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .header {
    left: 0;
    width: 100%;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .header-search-input {
    width: 200px;
  }

  .stats-card-value {
    font-size: 1.75rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

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

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

.animate-slideIn {
  animation: slideIn 0.5s ease forwards;
}

/* Stagger animation delays */
.animate-delay-1 {
  animation-delay: 0.1s;
}
.animate-delay-2 {
  animation-delay: 0.2s;
}
.animate-delay-3 {
  animation-delay: 0.3s;
}
.animate-delay-4 {
  animation-delay: 0.4s;
}

/* ============================================
           LOADING STATES
           ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-ultralight) 25%,
    var(--gray-light) 50%,
    var(--gray-ultralight) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius);
}

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

/* ============================================
           UTILITIES
           ============================================ */
.text-primary {
  color: var(--primary);
}
.text-success {
  color: var(--success);
}
.text-warning {
  color: var(--warning);
}
.text-danger {
  color: var(--danger);
}
.text-muted {
  color: var(--gray);
}

.bg-primary {
  background-color: var(--primary);
}
.bg-success {
  background-color: var(--success);
}
.bg-warning {
  background-color: var(--warning);
}
.bg-danger {
  background-color: var(--danger);
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.d-flex {
  display: flex;
}
.align-items-center {
  align-items: center;
}
.justify-content-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}

.filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid var(--gray-ultralight);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-chip:hover {
    border-color: var(--primary);
    background: var(--primary-ultra-light);
}

.filter-chip.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

/* Dropdown styling (same as before) */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.dropdown-toggle:hover { background: rgba(0,0,0,0.06); }
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    min-width: 160px;
    padding: 8px 0;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    z-index: 100;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.18s ease;
}
.dropdown.open .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.dropdown-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    gap: 8px;
    border: none;
    background: none;
}
.dropdown-item:hover { background: #f5f5f5; }

/* Modal */
#confirm-modal.modal-overlay {
     position: fixed;       /* fixed to viewport */
     top: 0;
     left: 0;
     width: 100vw;
     height: 100vh;
     background: rgba(0,0,0,0.5);
     display: none;         /* hidden by default */
     justify-content: center; /* horizontal centering */
     align-items: center;      /* vertical centering */
     z-index: 9999;
}
#confirm-modal .modal-box {
     background: white;
     padding: 2rem;
     border-radius: 0.5rem;
     max-width: 400px;
     width: 90%;
     box-shadow: 0 4px 15px rgba(0,0,0,0.3);
     text-align: center;
}
#confirm-modal .modal-actions {
   display: flex;
       justify-content: space-around;
       margin-top: 1.5rem;
}


  .variant-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.variant-row {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    padding-bottom: 60px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
    position: relative;
    transition: all 0.2s ease;
}

.variant-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #0066cc;
}

.variant-field-full {
    grid-column: span 2;
}

.variant-row .remove-variant {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #fff;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.variant-row .remove-variant:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.05);
}


.variant-image-preview {
    margin-top: 8px;
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    display: inline-block;
    border: 2px solid #e0e0e0;
}

.variant-image-preview img {
    display: block;
    max-height: 80px;
    max-width: 100%;
    object-fit: cover;
}

.variant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.variant-count-badge {
    background: #0066cc;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

    .variant-field-full {
        grid-column: span 1;
    }
}