/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Albert Sans', sans-serif;
  background: #fafafa;
  color: #1b1b1b;
  min-height: 100vh;
}

img { display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }

/* ─── CONTAINER ─────────────────────────────── */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 108px;
}

/* ═══════════════════════════════════════════════
   PAGE
═══════════════════════════════════════════════ */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Looper decorative BG */
.looper-bg {
  position: absolute;
  top: -248px;
  right: -100px;
  width: 1271px;
  height: 1093px;
  pointer-events: none;
  z-index: 0;
  transform: rotate(164.74deg);
  opacity: 0.85;
}
.looper-bg img { width: 100%; height: 100%; object-fit: contain; }

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #ededed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 108px 16px;
}

.header__logo img {
  height: 41px;
  width: auto;
}

/* ── Nav ── */
.header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: #1b1b1b;
  line-height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-link:hover { color: #3286e5; }

.nav-dropdown { position: relative; }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: flex; }

.dropdown-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}
.dropdown-item {
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #1b1b1b;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover { background: #f0f6ff; color: #3286e5; }

/* ── Actions ── */
.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-btn {
  width: 42px;
  height: 42px;
  border-radius: 24px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.cart-btn img { width: 20px; height: 20px; }
.cart-btn:hover { background: #f0f6ff; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Albert Sans', sans-serif;
  line-height: 24px;
  border: 1px solid #3286e5;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, background 0.2s;
}
.btn--primary { background: #3286e5; color: #fff; }
.btn--primary:hover { opacity: 0.88; }
.btn--outline { background: transparent; color: #2d2d2d; }
.btn--outline:hover { background: #f0f6ff; }
.btn--full { width: 100%; }

/* ═══════════════════════════════════════════════
   MAIN
═══════════════════════════════════════════════ */
.main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 40px 0 60px;
}

/* ── Hero ── */
.hero {
  max-width: 728px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.hero__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  color: #000;
}
.hero__subtitle {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #000;
}

/* ── Cards ── */
.cards {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 5.8px 0 rgba(207,207,207,0.15);
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.card__image {
  width: 100%;
  height: 249px;
  overflow: hidden;
  flex-shrink: 0;
}
.card__image img { width: 100%; height: 100%; object-fit: cover; }

.card__body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.card__text { display: flex; flex-direction: column; gap: 8px; }

.card__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #163f4d;
}
.card__title--uv { color: #345446; }

.card__desc {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #828282;
}

.card__actions {
  display: flex;
  gap: 24px;
  margin-top: auto;
}
.card__actions .btn { flex: 1; }

/* Coming soon overlay */
.card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(33,33,33,0.1);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.coming-soon-btn {
  background: #fff;
  padding: 12px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  color: #2d2d2d;
  line-height: 24px;
  width: 269px;
  text-align: center;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer {
  border-top: 1px solid #ededed;
  padding: 16px 0;
  position: relative;
  z-index: 1;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy {
  font-size: 16px;
  font-weight: 400;
  color: #515151;
  line-height: 1.5;
}
.footer__copy a { color: #427ccd; }
.footer__copy a:hover { text-decoration: underline; }
.footer__policy {
  font-size: 16px;
  font-weight: 400;
  color: #515151;
  text-decoration: underline;
  line-height: 1.5;
}
.footer__policy:hover { color: #3286e5; }

/* ═══════════════════════════════════════════════
   MODAL SYSTEM
═══════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.13);
  z-index: 100;
}
.modal-overlay.active { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 0;
  z-index: 101;
  width: 1224px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}
.modal.active { display: block; }

.modal__close {
  position: absolute;
  top: 12px;
  right: 24px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.2s;
}
.modal__close:hover { opacity: 0.6; }
.modal__close img { width: 34px; height: 34px; }

/* Shared modal elements */
.modal__content {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 12px;
}

.modal__heading {
  font-size: 24px;
  font-weight: 500;
  line-height: 36px;
  color: #000;
  margin-bottom: 16px;
}

.modal__section { display: flex; flex-direction: column; }
.modal__text {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #2d2d2d;
}

/* ═══════════════════════════════════════════════
   GANG SHEET MODAL
═══════════════════════════════════════════════ */
.modal__layout {
  display: flex;
  gap: 24px;
  min-height: 700px;
}

.modal__left {
  width: 506px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.modal__img {
  height: 388px;
  border-radius: 4px;
  overflow: hidden;
}
.modal__img img { width: 100%; height: 100%; object-fit: cover; }

/* Pricing table */
.pricing-table-wrap__title {
  font-size: 16px;
  font-weight: 500;
  color: #3a3a3a;
  line-height: 1.5;
  margin-bottom: 8px;
}
.pricing-table {
  border: 1px solid #ececec;
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pricing-row__check { width: 20px; height: 20px; flex-shrink: 0; }
.pricing-row__range {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  line-height: 1.5;
}
.pricing-row__price {
  font-size: 16px;
  font-weight: 400;
  color: #000;
  line-height: 1.5;
  white-space: nowrap;
}
.pricing-divider { height: 1px; background: #f9f9f9; }

/* Right side */
.modal__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.modal__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #000;
}

.modal__price {
  display: flex;
  align-items: center;
  gap: 12px;
}
.price-old {
  font-size: 18px;
  font-weight: 600;
  color: #9d9d9d;
  text-decoration: line-through;
  line-height: 24px;
}
.price-new {
  font-size: 18px;
  font-weight: 600;
  color: #2563aa;
  line-height: 24px;
}

.modal__desc {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #000;
}

/* Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 16px;
  font-weight: 500;
  color: #3a3a3a;
  line-height: 1.5;
}

.select-wrap {
  position: relative;
}
.form-select {
  width: 207px;
  padding: 16px;
  border: 1px solid #f2f2f2;
  border-radius: 10px;
  background: #fcfcfc;
  font-size: 16px;
  font-family: 'Albert Sans', sans-serif;
  color: #262626;
  appearance: none;
  cursor: pointer;
  line-height: 1.5;
}
.form-select:focus { outline: 2px solid #3286e5; }
.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Quantity selector */
.qty-selector {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  background: #fcfcfc;
  border: 1px solid #f2f2f2;
  border-radius: 10px;
  padding: 8px 12px;
}
.qty-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.qty-btn:hover { background: #f0f6ff; }
.qty-val {
  font-size: 18px;
  font-weight: 500;
  color: #262626;
  min-width: 28px;
  text-align: center;
  line-height: 1.5;
}

/* Textarea */
.form-textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #f2f2f2;
  border-radius: 10px;
  background: #fcfcfc;
  font-size: 16px;
  font-family: 'Albert Sans', sans-serif;
  color: #262626;
  resize: vertical;
  line-height: 1.5;
}
.form-textarea:focus { outline: 2px solid #3286e5; }
.form-textarea::placeholder { color: #6b6b6b; }

/* Shipping info */
.shipping-info { border: 1px solid #ececec; border-radius: 4px; }
.shipping-info__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 400;
  color: #1b1b1b;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.shipping-arrow { transition: transform 0.2s; }
.shipping-info--closed .shipping-arrow { transform: rotate(180deg); }
.shipping-info__body {
  padding: 0 16px 16px;
  font-size: 16px;
  font-weight: 400;
  color: #3a3a3a;
  line-height: 1.5;
}
.shipping-info__body[hidden] { display: none; }

/* ═══════════════════════════════════════════════
   ABOUT / FAQ MODAL
═══════════════════════════════════════════════ */
.faq { display: flex; flex-direction: column; gap: 16px; }

.faq__item {
  background: #f2f2f2;
  border-radius: 4px;
  overflow: hidden;
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  color: #2d2d2d;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Albert Sans', sans-serif;
}
.faq__question:hover { background: rgba(0,0,0,0.02); }

.faq__answer {
  padding: 0 16px 16px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #2d2d2d;
  background: #fff;
}
.faq__answer[hidden] { display: none; }

.faq__arrow { flex-shrink: 0; transition: transform 0.2s; }
.faq__arrow--up { transform: rotate(0deg); }

/* ═══════════════════════════════════════════════
   CONTACT MODAL
═══════════════════════════════════════════════ */
.contact-layout {
  display: flex;
  gap: 151px;
  padding-top: 12px;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.contact-right {
  width: 346px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.contact-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }

.contact-label {
  font-size: 16px;
  font-weight: 600;
  color: #2d2d2d;
  line-height: 24px;
}
.contact-value {
  font-size: 16px;
  font-weight: 400;
  color: #424242;
  line-height: 28px;
}
.contact-link {
  font-size: 16px;
  font-weight: 500;
  color: #1a6ecd;
  line-height: 24px;
}
.contact-link:hover { text-decoration: underline; }

.social-icons { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.social-icon { width: 24px; height: 24px; }

.map-wrap {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  height: 268px;
}
.map-img { width: 100%; height: 100%; object-fit: cover; }

/* Business hours table */
.hours-table {
  border-collapse: collapse;
  width: 346px;
  border: 1px solid #e7edf0;
  border-radius: 4px;
  overflow: hidden;
}
.hours-table th,
.hours-table td {
  padding: 10px 12px;
  font-size: 16px;
  color: #323232;
  line-height: 24px;
  border: 1px solid #e7edf0;
  text-align: left;
}
.hours-table th {
  font-weight: 600;
}
.hours-table td {
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   PRIVACY POLICY MODAL
═══════════════════════════════════════════════ */
.policy-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.policy-section__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  color: #13559f;
}
.policy-section__text {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #787878;
}
.policy-contact {
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  color: #000;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

/* ── TOP NAV ─────────────────────────────── */
.topnav {
  height: var(--topnav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 100;
}

.topnav__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.topnav__logo img {
  height: 32px;
  display: block;
}

.topnav__back {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark2);
  white-space: nowrap;
}
.topnav__back:hover { color: var(--blue); }
.topnav__back svg path { transition: stroke .2s; }
.topnav__back:hover svg path { stroke: var(--blue); }

.topnav__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.sheet-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.sheet-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: .6;
  transition: opacity .2s;
}
.sheet-edit-btn:hover { opacity: 1; }

.change-size-link {
  font-size: 11px;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.change-size-link:hover { text-decoration: underline; }

.topnav__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

/* Selected toolbar */
.selected-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
}

.selected-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  margin-right: 4px;
  white-space: nowrap;
}

.tool-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  color: var(--dark2);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
  white-space: nowrap;
}
.tool-action-btn:hover { background: var(--border); }
.tool-action-btn--danger { color: var(--danger); }
.tool-action-btn--danger:hover { background: #fff0f0; }

.btn-your-designs {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.btn-your-designs:hover { background: #2070cc; }

/* ── EDIT BAR ────────────────────────────── */
.edit-bar {
  height: var(--editbar-h);
  background: #f9f9f9;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
}

.edit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── BUILDER LAYOUT ──────────────────────── */
.builder-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--topnav-h) - var(--editbar-h) - var(--footer-h));
}

/* ── SIDEBAR ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-btn {
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 8px;
  font-family: inherit;
  transition: background .15s;
}
.sidebar-btn span {
  font-size: 10px;
  font-weight: 500;
  color: var(--dark2);
  text-align: center;
  line-height: 1.2;
}
.sidebar-btn:hover { background: var(--gray2); }
.sidebar-btn.active { background: #e8f0fb; }
.sidebar-btn.active span { color: var(--blue); }

/* ── LEFT PANEL ──────────────────────────── */
.left-panel {
  width: 0;
  overflow: hidden;
  background: var(--white);
  border-right: 1px solid var(--border);
  transition: width .25s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.left-panel.open {
  width: var(--panel-w);
}

.panel-content {
  width: var(--panel-w);
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.panel-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  opacity: .5;
  transition: opacity .2s;
}
.panel-close:hover { opacity: 1; }

/* Filters */
.filter-sliders { display: flex; flex-direction: column; gap: 12px; }

.slider-group { display: flex; flex-direction: column; gap: 6px; }
.slider-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--dark2);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slider-row span {
  font-size: 12px;
  color: var(--gray);
  min-width: 24px;
  text-align: right;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
}

.filter-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.filter-preset {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
}
.filter-preset--selected { border-color: var(--blue); }
.filter-preset:hover { border-color: var(--blue); }

.filter-preset__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}
.filter-preset--black .filter-preset__inner { background: #1b1b1b; }
.filter-preset--orange .filter-preset__inner { background: #ffe8cc; }
.filter-preset--green .filter-preset__inner { background: #ccf0d8; }
.filter-preset--red .filter-preset__inner { background: #f0cccc; }
.filter-preset--mint .filter-preset__inner { background: #ccf0ee; }
.filter-preset--blue .filter-preset__inner { background: #cce0f0; }
.filter-preset__inner img { width: 100%; height: 100%; object-fit: cover; }

/* Graphics panel */
.btn-add-photos {
  width: 100%;
  padding: 10px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}
.btn-add-photos:hover { background: #2070cc; }

.graphics-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--dark2);
}

.panel-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.graphics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.graphic-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #f9f9f9;
}
.graphic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.graphic-item:hover .graphic-delete { opacity: 1; }

.graphic-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
}

/* Text panel */
.panel-hint {
  font-size: 13px;
  color: var(--gray);
  text-align: center;
  padding: 12px 0;
}

.text-list { display: flex; flex-direction: column; gap: 8px; }

.text-item {
  padding: 8px 10px;
  background: #f9f9f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s;
}
.text-item:hover { border-color: var(--blue); }

/* Our Designs */
.watermark-notice {
  font-size: 11px;
  color: var(--gray);
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1.4;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  color: var(--dark);
}
.search-input::placeholder { color: var(--gray); }

.designs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.design-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #f9f9f9;
  transition: border-color .15s;
}
.design-item:hover { border-color: var(--blue); }
.design-item img { width: 100%; height: 100%; object-fit: cover; }

/* Canva panel */
.canva-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.canva-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.canva-user__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.canva-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: var(--dark2);
  transition: border-color .15s;
}
.canva-logout:hover { border-color: var(--gray); }

.canva-designs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.canva-design-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  background: #f9f9f9;
  transition: border-color .15s;
}
.canva-design-item:hover { border-color: var(--blue); }
.canva-design-item img { width: 100%; height: 100%; object-fit: cover; }

.canva-design-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 10px;
  padding: 4px 6px;
  text-align: center;
}

/* ── CANVAS AREA ─────────────────────────── */
.canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #e8e8e8;
}

.canvas-toolbar {
  height: 40px;
  background: #f5f5f5;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.canvas-toolbar__left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.undo-redo-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--gray);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.undo-redo-btn:hover { background: var(--border); color: var(--dark2); }

.fullscreen-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  opacity: .5;
  transition: opacity .2s, background .15s;
}
.fullscreen-btn:hover { opacity: 1; background: var(--border); }

/* Canvas wrapper with rulers */
.canvas-wrapper {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.ruler {
  background: #f0f0f0;
  border-color: var(--border);
}

.ruler--top {
  height: 24px;
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ruler-corner {
  width: 24px;
  height: 24px;
  background: #e8e8e8;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.ruler-ticks {
  flex: 1;
  position: relative;
  overflow: hidden;
  height: 24px;
}

.canvas-row {
  display: flex;
  flex: 1;
  overflow: auto;
}

.ruler--left {
  width: 24px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.ruler-ticks-v {
  height: 100%;
  position: relative;
}

.ruler-tick {
  position: absolute;
  background: var(--dark2);
}
.ruler-tick--h {
  width: 1px;
  height: 8px;
  bottom: 0;
}
.ruler-tick--v {
  height: 1px;
  width: 8px;
  right: 0;
}
.ruler-tick--major {
  background: var(--dark);
}
.ruler-tick--h.ruler-tick--major { height: 14px; }
.ruler-tick--v.ruler-tick--major { width: 14px; }

.ruler-label {
  position: absolute;
  font-size: 8px;
  color: var(--gray);
  line-height: 1;
}
.ruler-label--h { bottom: 14px; transform: translateX(-50%); }
.ruler-label--v { right: 16px; transform: translateY(-50%) rotate(-90deg); transform-origin: center; }

/* Canvas stage */
.canvas-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: auto;
  min-height: 400px;
}

.canvas-bg {
  position: relative;
  width: 600px;
  height: 800px;
  background-image:
    linear-gradient(45deg, #ccc 25%, transparent 25%),
    linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%),
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  overflow: hidden;
}

.canvas-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .08;
}

.safety-margin {
  position: absolute;
  inset: 16px;
  border: 2px dashed rgba(255, 80, 80, .5);
  pointer-events: none;
  z-index: 1;
}

.canvas-items {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Canvas items (placed designs) */
.canvas-item {
  position: absolute;
  cursor: move;
  user-select: none;
}
.canvas-item:hover .canvas-item__handles { opacity: 1; }
.canvas-item.selected {
  outline: 2px solid var(--blue);
}

.canvas-item__handles {
  position: absolute;
  inset: -6px;
  pointer-events: none;
  opacity: 0;
}

/* Canvas footer */
.canvas-footer {
  height: 36px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  flex-shrink: 0;
}

.canvas-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--dark2);
  cursor: pointer;
}
.canvas-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ── BUILDER FOOTER ──────────────────────── */
.builder-footer {
  height: var(--footer-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.builder-footer p {
  font-size: 12px;
  color: var(--gray);
}
.builder-footer a {
  font-size: 12px;
  color: var(--gray);
  text-decoration: none;
}
.builder-footer a:hover { color: var(--dark2); }

/* ── BUILDER MODALS ──────────────────────── */
.bmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.bmodal-overlay.active { opacity: 1; pointer-events: all; }

.bmodal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  background: var(--white);
  border-radius: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 1001;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.bmodal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.bmodal--wide { width: 600px; }

.bmodal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.bmodal__header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.bmodal__close {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  opacity: .5;
  transition: opacity .2s;
}
.bmodal__close:hover { opacity: 1; }

.bmodal__body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Size row */
.size-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.size-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark2);
  white-space: nowrap;
}

.select-wrap {
  position: relative;
  flex: 1;
}

.form-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.form-select:focus { border-color: var(--blue); }

.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Name input */
.name-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--dark);
  outline: none;
  transition: border-color .15s;
}
.name-input:focus { border-color: var(--blue); }

/* Modal primary button */
.btn-modal-primary {
  width: 100%;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}
.btn-modal-primary:hover { background: #2070cc; }

/* Your designs grid */
.your-designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.your-design-item {
  cursor: pointer;
  text-align: center;
}
.your-design-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.your-design-item:hover img { border-color: var(--blue); }
.your-design-item p {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

/* ── DRAG OVER HIGHLIGHT ─────────────────── */
.canvas-stage.drag-over .canvas-bg { outline: 3px dashed var(--blue); }

/* ── TEXT ON CANVAS ──────────────────────── */
.canvas-text {
  position: absolute;
  cursor: move;
  user-select: none;
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  min-width: 40px;
  min-height: 24px;
  outline: none;
  padding: 2px 4px;
}
.canvas-text.selected { outline: 2px solid var(--blue); }

/* ════════════════════════════════════════════════════════
   OVERLAY PAGE LAYOUT (shirt-customizer, add-to-cart, etc.)
   ════════════════════════════════════════════════════════ */
.page-overlay {
  background: #fafafa;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.looper-bg--page {
  position: fixed;
  top: -248px;
  right: -170px;
  width: 1271px;
  height: 1093px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(164.74deg);
  z-index: 0;
  pointer-events: none;
}
.looper-bg--page img {
  width: 1090px;
  height: 836px;
  object-fit: cover;
}

/* Dimmed home background */
.overlay-page-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.overlay-page-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.13);
  z-index: 2;
}
.home-bg-cards {
  position: absolute;
  inset: 0;
  padding: 139px 108px 0;
  opacity: 0.4;
  filter: blur(1px);
  z-index: 1;
}
.home-heading { margin-bottom: 32px; }
.home-heading__title {
  font-size: 28px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
  max-width: 728px;
}
.home-heading__sub {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  margin-top: 8px;
}
.home-cards {
  display: flex;
  gap: 24px;
}
.home-cards .card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  width: 392px;
  flex-shrink: 0;
  box-shadow: 0 3px 6px rgba(207,207,207,0.15);
}
.home-cards .card__body {
  padding: 16px 20px 20px;
}
.home-cards .card__title { font-size: 18px; font-weight: 600; }
.home-cards .card__desc { font-size: 14px; color: var(--gray); margin-top: 6px; }

/* ── NAVBAR ACTIONS (cart button) ─────────────── */
.navbar__cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════
   SHIRT CUSTOMIZER PANEL
   ════════════════════════════════════════════════════════ */
.sc-panel {
  position: relative;
  z-index: 10;
  background: #fff;
  width: 1224px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  margin: 112px auto 40px;
  border-radius: 4px;
  padding: 46px 24px 40px;
}
.sc-panel__close {
  position: absolute;
  top: 12px;
  right: 24px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sc-panel__body {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sc-section { display: flex; flex-direction: column; gap: 16px; }
.sc-section__title {
  font-size: 30px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}

/* Shirt / location cards grid */
.sc-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.sc-grid--3 { flex-wrap: nowrap; }
.sc-grid--5 { gap: 24px; }

.sc-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  width: 236px;
  flex-shrink: 0;
}
.sc-card__img {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
}
.sc-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}
.sc-card--selected .sc-card__img { border-color: #1a6ecd; border-width: 2px; }
.sc-card:hover .sc-card__img { border-color: #3286e5; }
.sc-card__label {
  font-size: 16px;
  color: var(--dark2);
  line-height: 1.5;
}

/* Color swatches */
.sc-colors {
  display: flex;
  gap: 10px;
  align-items: center;
}
.sc-color {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color .15s;
  position: relative;
}
.sc-color img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.sc-color--selected { border-color: #1a6ecd; }
.sc-color:hover { border-color: #3286e5; }

/* Size buttons */
.sc-sizes {
  display: flex;
  gap: 8px;
}
.sc-size {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 10px;
  font-size: 16px;
  font-family: inherit;
  background: none;
  cursor: pointer;
  color: #000;
  line-height: 1.5;
  transition: border-color .15s, background .15s, color .15s;
}
.sc-size--selected,
.sc-size:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* Upload block */
.sc-upload-block { width: 100%; }
.sc-upload-card {
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sc-upload-card__header {}
.sc-upload-card__location {
  font-size: 20px;
  font-weight: 500;
  color: #000;
  line-height: 1.5;
  text-align: center;
}

/* Upload zone */
.sc-upload-zone {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-radius: 4px;
}
.sc-upload-zone__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-upload-zone__btn {
  position: absolute;
  top: 38px;
  left: 71px;
  padding: 10px 16px;
  cursor: pointer;
}

/* Upload settings */
.sc-upload-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-upload-settings__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-upload-settings__aspect {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #000;
}
.sc-upload-settings__restore {
  font-size: 10px;
  color: #000;
  text-decoration: underline;
}
.sc-upload-dims {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sc-upload-dim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-upload-dim-row label {
  font-size: 12px;
  color: #000;
}
.sc-upload-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #f4f4f4;
  width: 236px;
  padding: 0 6px 0 10px;
  justify-content: space-between;
}
.sc-upload-input {
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #000;
  width: 60px;
  line-height: 1.5;
  background: transparent;
}
.sc-upload-input::-webkit-inner-spin-button,
.sc-upload-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.sc-upload-input__unit {
  font-size: 14px;
  color: #000;
}
.sc-upload-spinners {
  display: flex;
  flex-direction: column;
}
.sc-upload-spinners button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  padding: 1px 3px;
  color: #828282;
}
.sc-upload-spinners button:hover { color: var(--blue); }

.sc-upload-card__footer {
  display: flex;
  justify-content: flex-end;
}
.sc-upload-card__delete {
  background: none;
  border: none;
  cursor: pointer;
  width: 18px;
  height: 18px;
  padding: 0;
  display: flex;
  align-items: center;
}
.sc-upload-card__delete img { width: 18px; height: 18px; }

/* ════════════════════════════════════════════════════════
   ADD TO CART PANEL (172:3190)
   ════════════════════════════════════════════════════════ */
.atc-panel {
  position: relative;
  z-index: 10;
  background: #fff;
  width: 1224px;
  margin: 160px auto 40px;
  border-radius: 4px;
  padding: 40px;
  min-height: 520px;
}
.atc-panel__close {
  position: absolute;
  top: 12px;
  right: 24px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.atc-panel__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 390px;
  margin: 140px auto 0;
}

/* Order Summary card */
.atc-summary {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.atc-summary__title {
  font-size: 26px;
  font-weight: 600;
  color: #232323;
  line-height: 1.38;
}
.atc-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.atc-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: #787878;
}
.atc-summary__item { line-height: 1.5; }
.atc-summary__price { font-size: 18px; line-height: 1.44; }
.atc-summary__divider {
  border: none;
  border-top: 1px solid #ececec;
  margin: 0;
}
.atc-summary__row--total {
  font-size: 16px;
  font-weight: 500;
  color: #232323;
}

/* Quantity section */
.atc-qty {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.atc-qty__label {
  font-size: 16px;
  font-weight: 500;
  color: #3a3a3a;
  line-height: 1.5;
}
.qty-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fcfcfc;
  border: 1px solid #f2f2f2;
  border-radius: 10px;
  padding: 12px;
}
.qty-selector__btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.qty-selector__val {
  font-size: 18px;
  font-weight: 500;
  color: #262626;
  line-height: 1.5;
}

/* Add to cart actions */
.atc-actions { display: flex; flex-direction: column; }
.atc-actions__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s;
}
.atc-actions__btn:hover { background: #1a6ecd; border-color: #1a6ecd; }
