/* 布局类 */
.flex {
  display: flex;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}

.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.mt-auto {
  margin-top: auto;
}

.w-full {
  width: 100%;
}
.w-1\/4 {
  width: 25%;
}
.w-10 {
  width: 2.5rem;
}
.w-4 {
  width: 1rem;
}

.h-full {
  height: 100%;
}
.h-48 {
  height: 12rem;
}
.h-10 {
  height: 2.5rem;
}
.h-4 {
  height: 1rem;
}

.max-w-md {
  max-width: 28rem;
}
.max-h-\[90vh\] {
  max-height: 90vh;
}

/* 间距类 */
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.ml-1 {
  margin-left: 0.25rem;
}
.ml-2 {
  margin-left: 0.5rem;
}
.mr-1 {
  margin-right: 0.25rem;
}
.mr-2 {
  margin-right: 0.5rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mt-8 {
  margin-top: 2rem;
}
.mt-12 {
  margin-top: 3rem;
}

.space-x-1 > * + * {
  margin-left: 0.25rem;
}
.space-x-2 > * + * {
  margin-left: 0.5rem;
}
.space-x-3 > * + * {
  margin-left: 0.75rem;
}
.space-x-4 > * + * {
  margin-left: 1rem;
}
.space-x-6 > * + * {
  margin-left: 1.5rem;
}
.space-y-2 > * + * {
  margin-top: 0.5rem;
}
.space-y-4 > * + * {
  margin-top: 1rem;
}
.space-y-6 > * + * {
  margin-top: 1.5rem;
}
.space-y-8 > * + * {
  margin-top: 2rem;
}

/* 外观类 */
.rounded-full {
  border-radius: 9999px;
}

.border {
  border-width: 1px;
}
.border-t {
  border-top-width: 1px;
}
.border-b {
  border-bottom: 1px solid #f4f4f4;
}
.border-gray-300 {
  border-color: #d1d5db;
}
.border-gray-700 {
  border-color: #374151;
}
.border-primary {
  border-color: #1470d8;
}

.bg-gray-50 {
  background-color: #f4f4f4;
}
.bg-gray-100 {
  background-color: #f3f4f6;
}
.bg-gray-700 {
  background-color: #374151;
}
.bg-primary {
  background-color: #1470d8;
}
.bg-primary\/10 {
  background-color: rgba(22, 93, 255, 0.1);
}
.bg-black\/50 {
  background-color: rgba(0, 0, 0, 0.5);
}
.bg-green-500 {
  background-color: #22c55e;
}

.text-white {
  color: #ffffff;
}
.text-dark {
  color: var(--color-dark);
}
.text-primary {
  color: #1470d8;
}
.text-primary\/80 {
  color: rgba(22, 93, 255, 0.8);
}
.text-secondary {
  color: var(--color-secondary);
}
.text-gray-300 {
  color: #d1d5db;
}
.text-gray-400 {
  color: #9ca3af;
}
.text-gray-500 {
  color: #6b7280;
}
.text-gray-600 {
  color: #4b5563;
}
.text-gray-700 {
  color: #374151;
}
.text-green-500 {
  color: #22c55e;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.fs-16 {
  font-size: 16px;
}

.fs-30 {
  font-size: 30px;
}

.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}
.text-center {
  text-align: center;
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.object-contain {
  object-fit: contain;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-y-auto {
  overflow-y: auto;
}
.resize-none {
  resize: none;
}

/* 自定义工具类 */
.content-auto {
  content-visibility: auto;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.category-active {
  background-color: #1470d8;
  color: #ffffff;
}
.brand-item-active {
  box-shadow: 0 0 0 2px #1470d8, 0 0 0 1px white;
}
.sub-category-active {
  color: #1470d8;
  font-weight: 500;
}
.page-active {
  border-color: #1470d8;
  background-color: #1470d8;
  color: #ffffff;
}

/* 响应式类 */
@media (min-width: 640px) {
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
  .md\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .md\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .md\:w-1\/4 {
    width: 25%;
    vertical-align: middle;
    display: flex;
    height: 220px;
  }
  .md\:w-3\/4 {
    width: 75%;
    height: 220px;
  }
  .md\:flex-row {
    flex-direction: row;
  }
}

/* 过渡效果 */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.hover\:bg-gray-50:hover {
  background-color: #f4f4f4;
  color: #000;
}
.hover\:bg-primary\/5:hover {
  background-color: rgba(22, 93, 255, 0.05);
}
.hover\:bg-primary\/90:hover {
  background-color: rgba(22, 93, 255, 0.9);
}
.hover\:text-primary:hover {
  color: #1470d8;
}
.hover\:text-primary\/80:hover {
  color: rgba(22, 93, 255, 0.8);
}
.hover\:text-white:hover {
  color: #ffffff;
}
.hover\:text-gray-700:hover {
  color: #374151;
}
.hover\:shadow-md:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 禁用状态 */
.disabled\:opacity-50:disabled {
  opacity: 0.5;
}
.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px var(--tw-ring-color);
}
.focus\:ring-primary\/50:focus {
  --tw-ring-color: rgba(22, 93, 255, 0.5);
}
.focus\:border-primary:focus {
  border-color: #1470d8;
}

/* 弹窗专用样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.modal.show {
  display: flex;
}
.modal-content {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  width: 90%;
  max-width: 28rem;
  max-height: 90vh;
  overflow: hidden;
}
