.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.image-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}
.dropdown-menu {
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
}
.dropdown-menu.show {
    transform: scale(1);
    opacity: 1;
}

.pagination-wrapper {
    background: transparent;
    padding: 0;
    margin: 24px 0;
}

.mobile-stats {
    display: none;
    margin-top: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.stat-box {
    text-align: center;
    padding: 8px 4px;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.pagination-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.control-section {
    flex-shrink: 0;
}

.per-page-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.control-label {
    font-weight: 500;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.elegant-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 8px;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.elegant-select:hover {
    border-color: #94a3b8;
    background: rgba(255, 255, 255, 0.8);
}

.elegant-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.select-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
}

.nav-section {
    flex: 1;
    display: flex;
    justify-content: center;
}

.page-nav-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-btn, .page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.nav-btn {
    min-width: 32px;
    height: 32px;
    color: #475569;
}

.nav-btn:hover:not(.disabled) {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: translateY(-1px);
}

.page-btn:hover:not(.active) {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.page-btn.active {
    background: #3b82f6;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nav-btn.disabled, .page-btn.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 32px;
    color: #94a3b8;
    font-weight: 600;
}

.info-section {
    flex-shrink: 0;
}

.info-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.info-item strong {
    font-weight: 600;
    color: #334155;
}

.info-divider {
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .mobile-stats {
        display: block;
    }
    
    .pagination-layout {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .info-section {
        display: none;
    }
    
    .nav-section {
        order: -1;
        width: 100%;
    }
    
    .page-nav-group {
        justify-content: center;
        width: 100%;
    }
    
    .control-section {
        width: 100%;
    }
    
    .per-page-group {
        justify-content: center;
    }
}

@media (prefers-color-scheme: dark) {
    .pagination-layout {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
    
    .stats-grid {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .stat-number {
        color: #60a5fa;
    }
    
    .elegant-select {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
    
    .elegant-select:hover {
        background: rgba(30, 41, 59, 0.8);
    }
    
    .info-item strong {
        color: #f1f5f9;
    }
}

#contactFloatModal {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#contactFloatModal:not(.hidden) {
    transform: scale(1);
    opacity: 1;
}

#contactFloatBtn:hover {
    transform: scale(1.1);
}

.product-form-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.product-form-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-form-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-form-header p {
  opacity: 0.9;
  font-size: 14px;
}

.form-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
  overflow: hidden;
}

.form-section {
  padding: 28px;
  border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: nowrap;
}

.section-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: white;
  flex-shrink: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
}

.section-subtitle {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-label.required::after {
  content: " *";
  color: #ff4d4f;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:hover {
  border-color: #d0d0d0;
}

.form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.hidden {
  display: none;
}

.price-tier {
  background: #f8f9ff;
  border: 1px solid #e1e5ff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.price-tier:hover {
  background: #f0f3ff;
  border-color: #667eea;
}

.tier-input-group {
  display: flex;
  gap: 12px;
  align-items: end;
}

.tier-input {
  flex: 1;
}

.tier-input .form-input {
  background: white;
}

.add-tier-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.add-tier-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.remove-tier-btn {
  background: #ff4d4f;
  color: white;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.remove-tier-btn:hover {
  background: #ff7875;
  transform: scale(1.05);
}

.upload-area {
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s ease;
  background: #fafafa;
  cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
  border-color: #667eea;
  background: #f8f9ff;
}

.upload-icon {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 16px;
}

.upload-text {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 13px;
  color: #666;
}

.upload-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  aspect-ratio: 1;
}

.preview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff4d4f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.9;
  z-index: 10;
}

.preview-item:hover .remove-image-btn {
  opacity: 1;
  transform: scale(1.1);
}

.remove-image-btn:hover {
  background: #ff7875;
  transform: scale(1.2);
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 28px;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
}

.cancel-btn {
  background: #f0f0f0;
  color: #666;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.cancel-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.submit-btn {
  background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
}

.optional-section {
  background: #fffbf0;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.optional-notice {
  display: flex;
  align-items: center;
  color: #d48806;
  font-size: 13px;
  font-weight: 500;
}

.optional-notice i {
  margin-right: 8px;
  font-size: 16px;
}

.sku-generator {
  display: flex;
}

.sku-generator .form-input {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.generate-sku-btn {
  background: #f0f0f0;
  border: 2px solid #e8e8e8;
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: 0 16px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.generate-sku-btn:hover {
  background: #e0e0e0;
  color: #333;
}

@media (max-width: 768px) {
  .product-form-container {
    padding: 12px;
  }
  
  .form-section {
    padding: 20px;
  }
  
  .section-header {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }
  
  .section-icon {
    margin-right: 12px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .section-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .section-subtitle {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .tier-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .tier-input {
    width: 100%;
  }
  
  .remove-tier-btn {
    align-self: flex-start;
    margin-top: 8px;
  }
  
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
  }
  
  .cancel-btn, .submit-btn {
    width: auto;
    flex: 1;
    justify-content: center;
  }
  
  .image-preview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .upload-area {
    padding: 30px 15px;
  }
  
  .upload-icon {
    font-size: 36px;
  }
  
  .upload-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .form-grid.base {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .section-title {
    font-size: 15px;
  }
  
  .section-subtitle {
    font-size: 11px;
  }
  
  .image-preview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-form-header {
    padding: 20px 16px;
  }
  
  .product-form-header h1 {
    font-size: 22px;
  }
  
  .form-actions {
    flex-direction: row;
    gap: 8px;
  }
  
  .cancel-btn, .submit-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

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

.existing-images-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.existing-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  aspect-ratio: 1;
}

.existing-image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.existing-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.remove-existing-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff4d4f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.9;
  z-index: 10;
}

.existing-image-item:hover .remove-existing-btn {
  opacity: 1;
  transform: scale(1.1);
}

.remove-existing-btn:hover {
  background: #ff7875;
  transform: scale(1.2);
}

.overflow-x-auto {
    white-space: nowrap;
}