:root {
  --blue: #0b4a91;
  --blue-2: #1666c5;
  --red: #d92d20;
  --orange: #f59e0b;
  --green: #15803d;
  --text: #222222;
  --muted: #666666;
  --line: #dddddd;
  --soft: #f8f8f8;
  --soft-2: #fbfbfb;
  --white: #ffffff;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
}

body {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #f6f6f6;
  border-bottom: 1px solid var(--line);
  color: #555;
  font-size: 12px;
}

.topbar-inner,
.header-inner,
.nav-inner,
.stock-row,
.zip-row,
.buy-row,
.reviews-row,
.footer-grid,
.topbar-links {
  display: flex;
}

.topbar-inner {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.topbar-links {
  gap: 16px;
  flex-wrap: wrap;
}

.header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  /*position: sticky;*/
  top: 0;
  z-index: 20;
}

.header-inner {
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
}

.brand-image-link {
  display: inline-flex;
  text-decoration: none;
}

.brand-image {
  width: 260px;
  height: auto;
  display: block;
}

.searchbar {
  flex: 1;
  max-width: 700px;
  display: flex;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  overflow: hidden;
}

.searchbar input,
.section-search input,
.newsletter input,
.review-form input,
.zip-row input,
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 0;
  outline: none;
}

.searchbar input,
.newsletter input {
  padding: 14px 16px;
}

.searchbar button,
.newsletter button,
.primary-btn {
  border: 0;
  background: var(--blue);
  color: var(--white);
  padding: 0 20px;
  font-weight: 600;
}

.edit-page-menu-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.edit-page-menu-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #d4dbe6;
  border-radius: 12px;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  color: #344054;
}

.edit-page-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  padding: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.12);
  z-index: 5;
}

.edit-page-dropdown-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f2937;
  padding: 10px 12px;
  font-weight: 600;
}

.edit-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fbff;
}

.edit-panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  white-space: nowrap;
}

.wishlist-link {
  color: #444;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #d9e5f6;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  padding: 10px 16px;
  box-shadow: 0 8px 22px rgba(11, 74, 145, 0.12);
}

.cart-icon {
  position: relative;
  width: 30px;
  height: 24px;
  display: inline-block;
}

.cart-handle {
  position: absolute;
  left: 1px;
  top: 2px;
  width: 8px;
  height: 3px;
  background: var(--blue);
  border-radius: 999px;
  transform: rotate(-18deg);
  transform-origin: left center;
}

.cart-basket {
  position: absolute;
  left: 7px;
  top: 5px;
  width: 18px;
  height: 11px;
  border: 2px solid var(--blue);
  border-top: 3px solid var(--blue);
  border-radius: 2px 2px 6px 6px;
}

.cart-wheel {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.cart-wheel-left {
  left: 10px;
}

.cart-wheel-right {
  right: 2px;
}

.cart-text-wrap {
  display: grid;
  text-align: left;
}

.cart-title {
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
}

.cart-total {
  color: #5b6470;
  font-size: 12px;
  font-weight: 600;
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid #d9e5f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 8px 22px rgba(11, 74, 145, 0.1);
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--blue);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-inner {
  display: grid;
  gap: 2px;
  padding: 12px 16px 18px;
}

.mobile-menu-inner a {
  color: #1f2937;
  text-decoration: none;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f8fbff;
  font-weight: 600;
}

.nav {
  background: var(--soft-2);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 0;
  font-size: 14px;
  color: #333;
}

.main-content {
  padding: 24px 0 48px;
}

.breadcrumbs {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.product-hero,
.content-grid,
.admin-layout {
  display: grid;
  gap: 32px;
}

.product-hero {
  grid-template-columns: 1.02fr 1fr;
  gap: 40px;
}

.product-image-card,
.card,
.admin-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.product-image-card {
  padding: 16px;
}

.sale-badge,
.eyebrow,
.status-pill {
  display: inline-flex;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
}

.sale-badge,
.eyebrow {
  background: var(--red);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.status-pill.in-stock {
  background: var(--green);
}

.status-pill.backorder {
  background: var(--orange);
}

.status-pill.no-longer-available {
  background: var(--danger);
}

.sub-eyebrow {
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
  font-weight: 700;
}

.product-image-area {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(to bottom right, #f3f4f6, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  margin-top: 12px;
  overflow: hidden;
  position: relative;
}

.product-image-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-image-note {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #444;
}

.product-info h1,
.admin-header h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.15;
}

.part-number,
.product-description,
.small-note,
.review-text,
.footer-text,
.card p,
.meta-grid,
.admin-intro,
.form-help,
.route-note,
.generated-list-note,
.empty-note,
.error-box,
.success-box,
.toggle-text,
.edit-note {
  color: #444;
}

.part-number,
.meta-grid,
.review-count,
.form-help,
.route-note,
.generated-list-note,
.empty-note,
.toggle-text,
.edit-note {
  font-size: 14px;
}

.reviews-row {
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 14px;
}

.stars {
  color: var(--orange);
}

.reviews-link {
  color: var(--blue);
  text-decoration: underline;
}

.product-description,
.card p,
.steps-list,
.admin-intro {
  font-size: 15px;
  line-height: 1.8;
}

.meta-grid {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.stock-box,
.card,
.admin-card,
.info-card {
  padding: 24px;
}

.stock-box {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.stock-row {
  justify-content: space-between;
  gap: 12px;
}

.stock-row .in-stock-text,
.save-price {
  color: var(--green);
  font-weight: 700;
}

.zip-row {
  gap: 8px;
}

.zip-row input,
.review-form input,
.section-search input,
.form-field input,
.form-field textarea,
.form-field select {
  padding: 12px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #fff;
}

.zip-row button,
.review-form button,
.secondary-btn,
.ghost-btn,
.delete-btn,
.edit-btn,
.toggle-btn {
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: var(--white);
  padding: 10px 16px;
}

.price-block {
  margin-top: 24px;
}

.old-price {
  color: #777;
  font-size: 14px;
  text-decoration: line-through;
}

.new-price {
  color: var(--red);
  font-size: 42px;
  font-weight: 700;
  margin-top: 4px;
}

.buy-row {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.qty-box {
  display: flex;
  align-items: center;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  overflow: hidden;
}

.qty-box span {
  padding: 0 16px;
  color: #555;
  font-size: 14px;
}

.qty-box input {
  width: 80px;
  padding: 14px 12px;
  border: 0;
  border-left: 1px solid #d4d4d4;
  outline: none;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 14px 24px;
  font-weight: 700;
}

.btn-cart {
  background: var(--orange);
  color: var(--white);
}

.btn-buy {
  background: #111827;
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--text);
  border: 1px solid #d4d4d4;
}

.content-grid {
  grid-template-columns: 1fr 320px;
  margin-top: 48px;
}

.content-left {
  display: grid;
  gap: 32px;
}

.card h2,
.admin-card h2,
.info-card h2 {
  margin: 0 0 20px;
  font-size: 32px;
}

.card h3,
.info-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.section-search {
  margin-top: 16px;
}

.small-note {
  margin-top: 20px;
  font-size: 14px;
}

.link-list,
.steps-list {
  margin: 20px 0 0;
  padding-left: 22px;
}

.link-list {
  display: grid;
  gap: 10px;
  color: var(--blue);
}

.link-list li {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pagination {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: var(--white);
}

.page-btn.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.instruction-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 20px;
}

.sidebar {
  display: grid;
  gap: 24px;
  align-content: start;
  display: none;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.brand-tags span {
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
}

.sidebar-stars {
  margin-top: 16px;
}

.review-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.review-form button,
.primary-btn {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  font-weight: 600;
}

.footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 40px 0;
}

.footer-brand {
  color: var(--blue);
  font-size: 24px;
  font-weight: 700;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  gap: 12px;
  color: var(--blue);
  font-size: 14px;
}

.newsletter {
  display: flex;
  overflow: hidden;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: var(--white);
}

.admin-page {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 240px);
  min-height: 100vh;
}

.admin-layout {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.admin-header {
  margin-bottom: 24px;
}

.admin-header p {
  margin: 12px 0 0;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.toggle-label {
  font-weight: 700;
  color: #1f2937;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.error-box,
.success-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.error-box {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

.success-box {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.generated-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.generated-item {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe7f7;
  border-radius: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.generated-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.generated-item-title {
  font-weight: 700;
  color: #111827;
}

.generated-item-url {
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}

.generated-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: #5b6470;
}

.generated-item-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn {
  color: #1f2937;
}

.delete-btn {
  color: #b42318;
  border-color: #f3c7c4;
  background: #fff7f7;
}

.info-list {
  display: grid;
  gap: 14px;
  padding-left: 20px;
  margin: 0;
  color: #475467;
  line-height: 1.6;
}

.empty-state {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
  background: #fafcff;
}

.not-found {
  padding: 80px 0;
}

.not-found-box {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  background: #fff;
}

.not-found-box h1 {
  margin-top: 0;
  font-size: 36px;
}

.toggle-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.toggle-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.manual-fields {
  display: grid;
  gap: 16px;
}

.clickable-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-bottom: 1px dashed #b9c7db;
}

.clickable-edit:hover {
  border-bottom-color: var(--blue);
}

.image-edit-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(11, 74, 145, 0.92);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 0;
}

.edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.inline-edit-box {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.inline-edit-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .header-inner,
  .product-hero,
  .content-grid,
  .footer-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .header-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .searchbar {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .searchbar {
    grid-column: 1 / -1;
    order: 4;
  }

  .wishlist-link,
  .nav {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .cart-button {
    padding: 10px 14px;
  }

  .cart-text-wrap {
    display: none;
  }
}

@media (min-width: 861px) {
  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .brand-image {
    width: 210px;
  }

  .searchbar button {
    padding: 0 16px;
  }

  .container {
    width: min(100% - 20px, 1280px);
  }

  .product-info h1,
  .admin-header h1,
  .card h2,
  .admin-card h2,
  .info-card h2,
  .not-found-box h1 {
    font-size: 28px;
  }

  .new-price {
    font-size: 34px;
  }

  .two-columns,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .stock-row,
  .reviews-row,
  .topbar-inner,
  .zip-row,
  .buy-row,
  .generated-item-header,
  .toggle-row,
  .edit-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .qty-box,
  .btn,
  .zip-row input,
  .zip-row button,
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .delete-btn,
  .edit-btn,
  .toggle-btn,
  .inline-edit-box input {
    width: 100%;
  }
}
.image-edit-badge {
    opacity: 0;
}
.sourcelink {
    max-width: 90%;
    margin: auto;
    display: none;
}
.edit-note {
    opacity: 0!important;
}

.part-number {
    display: none;
}
section.product-hero, section.content-grid {
    max-width: 90%;
    margin: auto;
}
.sub-eyebrow {
    display: none;
}
input#imageFileInput {
    height: 50px;
    width: 100% !important;
    padding: 0 !important;
}
.product-image-card .inline-edit-box {
    opacity: 0 !important;
}