:root {
  font-family: "Gilroy-Regular", Inter, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color-scheme: light;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  background: transparent;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}
button,
input,
optgroup,
select,
textarea {
  font: inherit;
}
a {
  text-decoration: none;
  color: inherit;
}
body.admin-list {
  padding: 20px;
}
body.admin-index,
body.admin-add,
body.admin-edit,
body.admin-login {
  background: #f5f7fb;
  color: #0f172a;
  padding: 32px;
}
body.admin-index .container,
body.admin-add .container,
body.admin-edit .container,
body.admin-login .container {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 22px 45px rgba(82, 115, 148, 0.12);
}
body.admin-index h1,
body.admin-add h2,
body.admin-edit h2,
body.admin-login h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 700;
}
body.admin-index a,
body.admin-add a,
body.admin-edit a,
body.admin-login a {
  color: #045bd6;
}
body.admin-index input,
body.admin-index textarea,
body.admin-add input,
body.admin-add textarea,
body.admin-edit input,
body.admin-edit textarea,
body.admin-login input {
  width: 100%;
  padding: 12px 16px;
  margin-top: 8px;
  border: 1px solid #dbe4f3;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s;
}
body.admin-index input:focus,
body.admin-index textarea:focus,
body.admin-add input:focus,
body.admin-add textarea:focus,
body.admin-edit input:focus,
body.admin-edit textarea:focus,
body.admin-login input:focus {
  outline: none;
  border-color: #045bd6;
  box-shadow: 0 0 0 3px rgba(4, 91, 214, 0.15);
}

body.admin-index button,
body.admin-add button,
body.admin-edit button,
body.admin-login button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 9999px;
  background: #045bd6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.admin-index button:hover,
body.admin-add button:hover,
body.admin-edit button:hover,
body.admin-login button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(4, 91, 214, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}
table thead {
  background: #f1f5fb;
  color: #475569;
}
table th,
table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  text-align: left;
}
table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.notice {
  padding: 16px 20px;
  border-radius: 16px;
  background: #f1f5fb;
  color: #475569;
  margin-bottom: 24px;
}
.error {
  color: #ef4444;
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.admin-gallery-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  align-items: center;
  text-align: center;
}

.admin-gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

.admin-gallery-item span {
  font-size: 13px;
  color: #334155;
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-main-image-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.admin-main-image-remove {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.product-gallery {
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 45px rgba(58, 107, 193, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding: 16px;
}

.dark .product-gallery {
  background: transparent;
}

.product-gallery__viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #e2e8f0 0%, #ffffff 70%);
  border-radius: 28px;
  min-height: 340px;
}

.dark .product-gallery__viewport {
  background: linear-gradient(180deg, #2b2b2b 0%, #0d0d0d 80%);
}

.product-gallery__nav {
  position: absolute;
  top: 50%;
  left: 16px;
  border: none;
  background: #2881ff;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  transform: translateY(-50%);
}

.product-gallery__nav--next {
  left: auto;
  right: 16px;
}

.product-gallery__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.product-gallery__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.product-gallery__image {
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.product-gallery__image.is-loaded {
  opacity: 1;
}

.product-gallery__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 280px;
  border-radius: 24px;
  border: 2px dashed rgba(148, 163, 184, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: #94a3b8;
}

.product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.product-gallery__thumb {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery__thumb:hover,
.product-gallery__thumb:focus-visible {
  transform: scale(1.05);
  border-color: rgba(4, 91, 214, 0.4);
  outline: none;
}

.product-gallery__thumb--active {
  border-color: #045bd6;
}

.product-gallery--single .product-gallery__thumbs,
.product-gallery--empty .product-gallery__thumbs {
  display: none;
}

.product-gallery--single .product-gallery__nav {
  opacity: 0.2;
  pointer-events: none;
}

.product-gallery--empty .product-gallery__nav {
  display: none;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
}

.product-lightbox.is-open {
  display: flex;
}

.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.product-lightbox__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(90vw, 1100px);
  width: 100%;
  padding: 20px;
  justify-content: center;
}

.product-lightbox__image {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-lightbox__image.is-loaded {
  opacity: 1;
}

.product-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: none;
  background: rgba(15, 23, 42, 0.3);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.product-lightbox__nav {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: none;
  /* background: #2881ff; */
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.product-lightbox__nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.product-lightbox-open {
  overflow: hidden;
}

[data-product-card-gallery] {
  cursor: pointer;
}

[data-product-card-gallery] img[data-product-card-image] {
  transition: opacity 0.25s ease, transform 0.5s ease;
  opacity: 0;
}

[data-product-card-gallery] img[data-product-card-image].is-visible {
  opacity: 1;
}

@media (max-width: 768px) {
  .product-gallery {
    padding: 18px;
  }
  .product-gallery__viewport {
    padding: 18px;
    min-height: 280px;
  }
  .product-gallery__image {
    max-height: 320px;
  }

  .product-gallery__thumbs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }
}
body.admin-add trix-toolbar,
body.admin-edit trix-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 8px 12px;
  border: 1px solid #dbe4f3;
  border-radius: 14px 14px 0 0;
  background: #f9fbff;
}

body.admin-add trix-editor.admin-trix-editor,
body.admin-edit trix-editor.admin-trix-editor {
  border: 1px solid #dbe4f3;
  border-radius: 0 0 14px 14px;
  min-height: 220px;
  padding: 12px 16px;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.admin-add trix-editor.admin-trix-editor:focus,
body.admin-edit trix-editor.admin-trix-editor:focus {
  outline: none;
  border-color: #045bd6;
  box-shadow: 0 0 0 3px rgba(4, 91, 214, 0.15);
}

body.admin-add trix-toolbar [data-trix-button-group],
body.admin-edit trix-toolbar [data-trix-button-group] {
  margin-right: 8px;
}

body.admin-add trix-toolbar [data-trix-button-group]:last-child,
body.admin-edit trix-toolbar [data-trix-button-group]:last-child {
  margin-right: 0;
}

.trix-content p,
.trix-content div {
  margin: 0 0 0.75rem;
}

.trix-content p:last-child,
.trix-content div:last-child,
.trix-content ul:last-child,
.trix-content ol:last-child {
  margin-bottom: 0;
}

.trix-content ul,
.trix-content ol {
  margin: 0 0 0.75rem 1.5rem;
  padding: 0;
}

.trix-content li {
  margin-bottom: 0.3rem;
}

.trix-content strong,
.trix-content b {
  font-weight: 600;
}
@media (max-width: 768px) {
  .progress-bar {
    max-width: 50%;
    margin: 0 auto;
  }
}
@media (max-width: 1024px) {
  .dark .product-gallery,
  .dark .product-gallery__viewport,
  .dark .product-gallery__main {
    background: none;
    box-shadow: none;
  }

  .product-gallery__nav--prev {
    left: 0px;
  }

  .product-gallery__nav--next {
    right: 0px;
  }
}
