:root {
  --color-text: #202223;
  --color-bg: #fafafa;
  --color-border: #e1e3e5;
  --color-muted: #6b7280;
  --color-primary: #202223;
  --color-primary-hover: #000000;
}
html, body {
  height: auto;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}
a {
  color: #000000;
  text-decoration: underline;
  transition: color 0.2s ease;
}
a:hover {
  color: #000000;
}
.text-muted {
  color: var(--color-muted) !important;
}
.btn-primary {
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 500;
  font-size: 14px;
  color: #ffffff;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}
.form-control {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--color-text);
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(32, 34, 35, 0.1);
  outline: none;
}
.alert {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-danger {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}
.text-center {
  text-align: center;
}
.link-black {
  color: #000000 !important;
  text-decoration: underline;
}
.link-black:hover {
  color: #000000 !important;
}
/* 首页-轮播与控制 */
.carousel,
.carousel-item {
  height: 100%;
}
.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}
.carousel-caption {
  top: 50%;
  transform: translateY(-50%);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
.carousel-caption h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.carousel-caption p {
  font-size: 1.5rem;
}
.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}
.carousel-control-prev { left: 3rem; justify-content: flex-start; }
.carousel-control-next { right: 3rem; justify-content: flex-end; }
@media (max-width: 768px) {
  .carousel-control-prev,
  .carousel-control-next { width: 10%; }
}
.carousel-control-prev-icon,
.carousel-control-next-icon { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)); }
.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 1)); }
/* 页脚 */
footer {
  background-color: #000;
  color: #fff;
  padding: 1.25rem 0;
}
.footer-container {
  display: flex;
  justify-content: space-between;
}
.footer-left { width: 50%; }
.footer-right {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.footer-columns-row { display: flex; width: 80%; gap: 0.5rem; }
.footer-column { flex: 1; margin-right: 0; margin-bottom: 0; }
.footer-column:last-child { margin-right: 0; }
.footer-column h5 { margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 900; line-height: 1.2; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  line-height: 1.2;
  padding: 0.25rem 0;
}
.social-icons { font-size: 0.75rem; margin-bottom: 0.75rem; }
.social-icons a { color: #fff; margin-left: 1rem; }
.email-subscribe input {
  padding: 0.25rem;
  margin-right: 0.5rem;
  width: 200px;
  font-size: 0.75rem;
  font-weight: 600;
}
.email-subscribe button {
  padding: 0.25rem 0.7rem;
  background-color: #6c757d;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}
/* 导航栏与下拉 */
.navbar {
  background-color: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}
.navbar-brand img { height: 36px; }
.navbar-nav .nav-link {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.5rem;
  line-height: 1.2;
}
#langDropdown { font-size: 0.75rem; line-height: 1.2; padding: 0.375rem 0.5rem; font-weight: 400; }
.dropdown-menu[aria-labelledby="langDropdown"] { min-width: 6rem; width: auto; }
.navbar { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.dropdown-menu[aria-labelledby="langDropdown"] .dropdown-item { font-size: 0.75rem; font-weight: 400; }
@media (max-width: 768px) {
  .footer-container, .footer-columns-row { flex-direction: column; }
  .footer-left, .footer-right { width: 100%; }
  .footer-right { align-items: flex-start; margin-top: 1rem; }
  .social-icons a { margin-left: 0; margin-right: 1rem; }
  .footer-column { margin-right: 0; margin-bottom: 1rem; }
}
.dropdown-menu .dropdown-item {
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  transform-origin: left bottom;
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
  line-height: 1.2;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active {
  transform: scale(1.05);
  background-color: #e9ecef;
  color: #212529;
  font-weight: 600;
}
.dropdown-menu[aria-labelledby="langDropdown"] .dropdown-item { font-size: 0.75rem; padding: 0.25rem 0.5rem; white-space: nowrap; }
.dropdown-menu { overflow: hidden; background-color: rgba(255, 255, 255, 0.3); }
.navbar .dropdown-menu { border: none !important; box-shadow: none !important; }
.navbar .dropdown-toggle::after { display: none !important; }
@media (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu { display: block; margin-top: 0; }
}
/* 购物车徽章 */
.cart-icon-wrapper { position: relative; display: inline-block; }
.cart-count-badge {
  position: absolute;
  top: 2px;
  right: -8px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 0 2px;
  box-sizing: border-box;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cart-count-badge.show { display: flex !important; }
.cart-count-badge.hide { display: none !important; }
.cart-count-badge.large-count {
  border-radius: 9px;
  min-width: 20px;
  padding: 0 4px;
}
/* 布局高度与滚动 */
html, body { height: 100%; }
body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
main.page-content { flex: 1 1 auto; overflow: auto; }
body.member-page { height: auto; display: block; overflow: auto; }
body.member-page main.page-content { overflow: visible; padding-top: 56px; font-size: 0.75rem; }
@media (max-width: 768px) { body.member-page main.page-content { padding-top: 60px; } }
@media (min-width: 768px) {
  body.member-page main.page-content { height: calc(100vh - 56px); overflow: hidden; }
  body.member-page .container,
  body.member-page .container > .row { height: 100%; }
  body.member-page .container > .row > .col-md-3,
  body.member-page .container > .row > .col-md-9 { height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
}

.apply-card { background: #ffffff; border: 1px solid #e1e3e5; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 16px; overflow: hidden; transition: box-shadow .2s ease; }
.apply-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.apply-card .card-header { background: #ffffff; border-bottom: 1px solid #e1e3e5; padding: 12px 16px; font-weight: 600; font-size: 12px; color: #202223; margin: 0; }
.apply-card .card-header h4 { margin: 0; font-size: 12px; font-weight: 600; color: #202223; }
.apply-card .card-body { padding: 12px; }
.apply-card .form-group label { font-weight: 500; color: #202223; margin-bottom: 4px; font-size: 12px; }
.apply-card .form-group.mb-3 { margin-bottom: 8px; }
.apply-card .form-control { border: 1px solid #d1d5db; border-radius: 8px; padding: 6px 10px; font-size: 12px; background: #ffffff; transition: border-color .2s ease, box-shadow .2s ease; color: #202223; }
.apply-card .form-control:focus { border-color: #202223; box-shadow: 0 0 0 3px rgba(32,34,35,0.1); outline: none; }
.apply-card .btn-primary { background: #202223; border: 1px solid #202223; border-radius: 8px; padding: 6px 12px; font-weight: 500; font-size: 12px; color: #ffffff; transition: all .2s ease; text-decoration: none; display: inline-block; cursor: pointer; }
.apply-card .btn-primary:hover { background: #000000; border-color: #000000; color: #ffffff; transform: translateY(-1px); }
.file-upload .btn-primary, .file-item .btn-primary { background: #ffffff; border: 1px solid #202223; color: #202223; }
.file-upload .btn-primary:hover, .file-item .btn-primary:hover { background: #ffffff; border-color: #000000; color: #000000; }
.apply-card .input-group { display: flex; align-items: stretch; gap: 6px; }
.apply-card .input-group input#verify_code { flex: 0 0 120px; max-width: 120px; }
.apply-card .input-group select#phone_code { flex: 0 0 120px; max-width: 120px; }
.apply-card .input-group-append img { height: 100%; width: auto; border: none; padding: 0; background: transparent; display: block; }
.apply-card .alert { border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid; }
.alert-success { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.file-upload { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.file-list { margin-top: 6px; font-size: 12px; color: #6b7280; }
.file-hint { display: inline-block; margin-left: 4px; font-size: 12px; color: #6b7280; }
@media (max-width: 768px) { .apply-card .card-header { padding: 12px; } .apply-card .card-body { padding: 12px; } .apply-card .input-group input#verify_code { flex: 0 0 120px; max-width: 120px; } .apply-card .input-group-append img { height: 100%; } }
.agreement-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 9999; }
.agreement-dialog { background: #ffffff; border: 1px solid #e1e3e5; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); width: 640px; max-width: 90%; max-height: 80vh; display: flex; flex-direction: column; }
.agreement-header { padding: 12px 16px; border-bottom: 1px solid #e1e3e5; display: flex; align-items: center; justify-content: space-between; }
.agreement-header h4 { margin: 0; font-size: 0.75rem; font-weight: 600; color: #202223; text-align: center; flex: 1; }
.agreement-close { background: transparent; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: #6b7280; }
.agreement-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.agreement-content { max-height: 50vh; overflow: auto; color: #6b7280; font-size: 0.75rem; line-height: 1.7; }
.agreement-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.agreement-actions .actions { display: flex; justify-content: center; gap: 8px; }
.agreement-actions .btn-primary { width: auto; }
.agreement-actions .form-check-label { display: inline-flex; align-items: center; justify-content: center; }
.agreement-actions .btn-secondary { background: #ffffff; border: 1px solid #d1d5db; border-radius: 8px; padding: 6px 12px; font-weight: 500; font-size: 0.75rem; color: #202223; transition: all 0.2s ease; cursor: pointer; }
.agreement-actions .form-check-label { font-size: 0.75rem; }
.agreement-actions .btn-secondary:hover { background: #f9fafb; border-color: #202223; transform: translateY(-1px); }
#apply-agreement-confirm:disabled { background: #e5e7eb; border-color: #e5e7eb; color: #6b7280; opacity: 1; cursor: not-allowed; pointer-events: none; }
.file-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid #e1e3e5; border-radius: 8px; margin-top: 6px; background: #ffffff; }
.agreement-actions input[type="checkbox"] { accent-color: #202223; }

/* 店铺管理页字体设置 */
.layout, .layout .content { font-size: 0.75rem; }
.layout h1, .layout h2, .layout h3, .layout h4, .layout h5, .layout h6 { font-size: 0.9rem; font-weight: 700; }
.layout .panel h2, .layout .card h3, .layout .card-header h5, .layout .form-card h2 { font-size: 0.9rem; font-weight: 700; }
.layout label { font-size: 0.75rem; }
.layout .list-group-item { font-size: 0.75rem; }
.layout .sidebar { font-size: 0.75rem !important; }
.layout .sidebar .list-group .list-group-item,
.layout .sidebar a.list-group-item,
.layout .sidebar .list-group-item-action { font-size: 0.75rem !important; }
.layout .btn, .layout .btn-primary { font-size: 0.75rem; }
.layout .content input[type="text"],
.layout .content input[type="email"],
.layout .content input[type="password"],
.layout .content input[type="tel"],
.layout .content select,
.layout .content textarea { font-size: 0.75rem; }
.layout .content { font-size: 0.75rem !important; }
.layout .content .panel,
.layout .content .card { font-size: 0.75rem !important; }
.layout .content h1,
.layout .content h2,
.layout .content h3,
.layout .content h4,
.layout .content h5,
.layout .content h6 { font-size: 0.9rem !important; font-weight: 700 !important; }
.layout .content label,
.layout .content .btn,
.layout .content .list-group-item,
.layout .content .form-input,
.layout .content .form-select,
.layout .content .table th,
.layout .content .table td { font-size: 0.75rem !important; }
.layout .content .panel { padding: 12px !important; }
.layout .content .card { padding: 12px !important; }
.layout .content .card-header { padding: 12px !important; }
.layout .content .card-section { padding: 12px !important; }
.layout .content .form-card { padding: 12px !important; }
.layout .content .form-grid { gap: 8px !important; }
.layout .content .grid { gap: 8px !important; }
.layout .content .form-row { gap: 8px !important; margin-top: 8px !important; }
.layout .content .pair { gap: 8px !important; }
.layout .content .form-actions { gap: 8px !important; }
.layout .content label { margin-bottom: 4px !important; }
.layout .content .btn { height: 32px !important; padding: 0 12px !important; }
.layout .content .form-input,
.layout .content .form-select,
.layout .content input[type="text"],
.layout .content input[type="email"],
.layout .content input[type="password"],
.layout .content input[type="tel"],
.layout .content select { padding: 6px 10px !important; height: 32px !important; }
.layout .content textarea { padding: 8px 10px !important; }
.layout .content .list-group-item { padding: 12px 16px !important; }
.layout .content .table th,
.layout .content .table td { padding: 6px 8px !important; }
.layout .content .alert { padding: 8px 10px !important; margin-bottom: 10px !important; }
.layout .content .order-grid { gap: 8px !important; }
.layout .content .order-item { padding: 4px 0 !important; }
