/* Separate Lucius Zen blue-purple theme for shop and admin surfaces. */
:root {
  --color-text-primary: #4d5878;
  --color-text-secondary: #25234f;
  --color-surface-base: #f7fbff;
  --color-surface-muted: #20223f;
  --color-surface-raised: #eaf3ff;
  --color-border-default: #bcd9ff;
  --color-border-muted: #7667ee;
}
body {
  background: linear-gradient(135deg, #f7fbff 0%, #f2edff 52%, #edf8ff 100%) !important;
  color: #4d5878 !important;
}
.header { background: rgba(234,243,255,.88) !important; border-color: #bcd9ff !important; box-shadow: 0 8px 26px rgba(100,152,255,.16); }
.form-section, .product-card, .product-item, .login-panel { border-color: #bcd9ff !important; box-shadow: 0 12px 30px rgba(100,152,255,.15), 0 0 24px rgba(182,139,255,.12); }
.btn-primary, .add-to-cart-btn, .contact-line-btn { background: linear-gradient(135deg, #8fd8ff, #927bff) !important; }
.page-title span, .product-price { color: #5647c9 !important; }
.filter-tab.active { background: #7667ee !important; color: #fff !important; }
.form-input, .form-textarea, .form-select { border-color: #bcd9ff !important; background: #fbfdff !important; }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: #7667ee !important; box-shadow: 0 0 0 3px rgba(118,103,238,.15) !important; }
.login-panel h1, .form-section h2, .page-title { color: #28355f !important; }
.product-card h3, .product-item h3 { color: #28355f !important; }

.product-contact-link {
  display: block;
  margin-top: 8px;
  color: #59658a;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.product-contact-link:hover { color: #5b4bd5; }

.shop-footer {
  position: relative;
  margin-top: 34px;
  padding: 46px 24px 18px;
  border-top: 1px solid rgba(118,103,238,.3);
  background:
    linear-gradient(90deg, rgba(255,255,255,.32) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(135deg, #e5f4ff, #eee8ff 55%, #e5faff);
  box-shadow: 0 -14px 34px rgba(100,152,255,.1), inset 0 1px 0 rgba(255,255,255,.9);
}
.shop-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #80d2ff, #8976ef, #80d2ff, transparent);
  box-shadow: 0 0 16px rgba(126,213,255,.6);
}
.shop-footer-inner {
  width: min(100%, 1120px);
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 1.35fr .8fr 1fr;
  gap: 0;
}
.shop-footer-brand,
.shop-footer-column { min-width: 0; padding: 4px 34px; }
.shop-footer-brand { padding-left: 0; }
.shop-footer-column { border-left: 1px dashed rgba(86,71,201,.25); }
.shop-footer-column:last-child { padding-right: 0; }
.shop-footer-logo {
  display: inline-block;
  margin-bottom: 10px;
  color: #302969;
  font-size: 25px;
  font-weight: 700;
  text-decoration: none;
}
.shop-footer-brand p {
  max-width: 390px;
  margin: 0 0 15px;
  color: #596384;
  font-size: 13px;
  line-height: 1.75;
}
.shop-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4e5d83;
  font-size: 12px;
  font-weight: 600;
}
.shop-footer-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #45c98b;
  box-shadow: 0 0 10px rgba(69,201,139,.7);
}
.shop-footer-column h2 {
  margin: 0 0 12px;
  color: #302969;
  font-size: 16px;
}
.shop-footer-column h2::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, #7ed2ff, #8976ef);
}
.shop-footer-column a {
  display: block;
  width: fit-content;
  padding: 5px 0 5px 13px;
  position: relative;
  color: #596384;
  font-size: 13px;
  text-decoration: none;
  transition: transform .2s ease, color .2s ease;
}
.shop-footer-column a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8175ed;
  transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(126,213,255,.7);
}
.shop-footer-column a:hover { color: #5145b8; transform: translateX(5px); }
.shop-footer-bottom {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding-top: 14px;
  border-top: 1px solid rgba(86,71,201,.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #737b9a;
  font-size: 11px;
}
.shop-footer-bottom a { color: #5145b8; font-weight: 700; text-decoration: none; }

@media (max-width: 768px) {
  .container {
    width: 100% !important;
    padding: 24px 12px 54px !important;
  }
  .page-title {
    margin-bottom: 6px !important;
    font-size: 27px !important;
    line-height: 1.25 !important;
  }
  .page-subtitle {
    max-width: 520px;
    margin: 0 auto 20px !important;
    font-size: 12px !important;
    line-height: 1.55;
  }
  .filter-tabs {
    gap: 6px !important;
    margin-bottom: 18px !important;
  }
  .filter-tab {
    padding: 6px 9px !important;
    border-width: 1px !important;
    font-size: 10px !important;
  }
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 180px)) !important;
    grid-auto-flow: row;
    justify-content: center;
    align-items: start;
    gap: 9px !important;
  }
  .product-card {
    min-width: 0;
    padding: 7px !important;
    border-width: 2px !important;
    border-radius: 13px !important;
  }
  .product-image {
    aspect-ratio: 1 / .78 !important;
    margin-bottom: 6px !important;
    border-radius: 9px !important;
  }
  .product-badge {
    top: 7px !important;
    right: 7px !important;
    max-width: calc(100% - 14px);
    padding: 3px 6px !important;
    font-size: 9px !important;
    line-height: 1.25;
  }
  .view-image-btn,
  .toggle-details-btn {
    min-height: 29px;
    margin-bottom: 6px !important;
    padding: 4px 3px !important;
    border-width: 1px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
    line-height: 1.2;
  }
  .product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 29px;
    overflow: hidden;
    margin-bottom: 6px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  .product-details-short {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 5px 3px !important;
    margin-bottom: 6px !important;
    border-width: 1px !important;
    border-radius: 9px !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
  }
  .product-details-short .detail-item {
    min-width: 0;
    overflow: hidden;
    padding: 3px 1px !important;
    border: 0 !important;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 8px !important;
  }
  .product-details-full {
    margin-bottom: 7px !important;
    border-width: 1px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
  }
  .product-details-full.expanded { padding: 6px !important; }
  .product-details-full .detail-item {
    padding: 4px 0 !important;
    font-size: 10px !important;
    line-height: 1.35;
  }
  .installment-info { margin-top: 5px; padding-top: 5px; }
  .product-price {
    margin-top: 5px !important;
    padding-top: 6px !important;
    border-top-width: 1px !important;
    font-size: 15px !important;
    text-align: center !important;
  }
  .add-to-cart-btn {
    min-height: 31px;
    padding: 5px 3px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
    line-height: 1.2;
  }
  .product-contact-link { margin-top: 5px; font-size: 9px; }
  .shop-footer { margin-top: 18px; padding: 30px 14px 14px; }
  .shop-footer-inner { grid-template-columns: 1fr 1fr; gap: 22px 0; margin-bottom: 22px; }
  .shop-footer-brand { grid-column: 1 / -1; padding: 0 4px 18px; border-bottom: 1px dashed rgba(86,71,201,.24); }
  .shop-footer-column { padding: 0 12px; }
  .shop-footer-column:nth-child(2) { border-left: 0; padding-left: 4px; }
  .shop-footer-column:last-child { padding-right: 0; }
  .shop-footer-logo { font-size: 20px; }
  .shop-footer-brand p { font-size: 11px; line-height: 1.6; }
  .shop-footer-column h2 { font-size: 13px; }
  .shop-footer-column a { font-size: 10px; line-height: 1.4; }
  .shop-footer-bottom { padding: 12px 4px 0; font-size: 9px; }
}

@media (min-width: 560px) and (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 180px)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 390px) {
  .container { padding-left: 8px !important; padding-right: 8px !important; }
  .products-grid { gap: 7px !important; }
  .product-card { padding: 6px !important; }
  .product-name { min-height: 27px; font-size: 10px !important; }
  .product-details-short .detail-item { font-size: 7px !important; }
  .view-image-btn, .toggle-details-btn, .add-to-cart-btn { font-size: 8px !important; }
}

@media (min-width: 769px) {
  body { padding-bottom: 32px !important; }
  .header { padding: 18px clamp(28px, 5vw, 64px) !important; }
  .header-content { max-width: 1240px !important; }
  .logo { font-size: 24px !important; }
  .container {
    width: min(100% - 64px, 1240px) !important;
    max-width: 1240px !important;
    padding: 46px 0 64px !important;
  }
  .page-title { margin-bottom: 10px !important; font-size: 40px !important; line-height: 1.25; }
  .page-subtitle { margin-bottom: 30px !important; font-size: 15px !important; }
  .filter-tabs { gap: 10px !important; margin-bottom: 28px !important; }
  .filter-tab { padding: 9px 15px !important; border-width: 2px !important; }
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 310px)) !important;
    justify-content: center;
    align-items: start;
    gap: 24px !important;
  }
  .product-card { width: 100%; border-radius: 18px !important; padding: 14px !important; }
  .product-image { border-radius: 13px !important; }
  .login-panel {
    width: min(100% - 48px, 460px) !important;
    margin: 72px auto !important;
    padding: 32px !important;
  }
  #adminApp.container { width: min(100% - 64px, 1120px) !important; }
  #adminApp .form-section { padding: 32px !important; border-radius: 18px !important; }
  #adminApp #productForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
  #adminApp #productForm > .form-group:has(.form-textarea),
  #adminApp #productForm > .image-upload,
  #adminApp #productForm > button { grid-column: 1 / -1; }
  #adminApp .product-item { align-items: flex-start; border-radius: 16px !important; }
}

@media (min-width: 1440px) {
  .container, .header-content { max-width: 1320px !important; }
  #adminApp.container { max-width: 1180px !important; }
}
