/* XOXG Personalized Leather - Ordering System styles */

/* Poppins (modern geometric sans) for the job order receipt */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/poppins-400.woff") format("woff");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/poppins-500.woff") format("woff");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/poppins-700.woff") format("woff");
}

:root {
  --bg-color: #f7f4f0;
  --card-bg: #ffffff;
  --accent-color: #8c6d58;
  --text-color: #333333;
  --border-color: #e0d8d0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

h1 {
  text-align: center;
  letter-spacing: 2px;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.logo {
  text-align: center;
  margin: 0 auto 20px;
}

.logo img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto;
}

.subtitle {
  text-align: center;
  font-size: 0.9em;
  color: #777;
  margin-bottom: 30px;
}

.carousel {
  position: relative;
  width: 80%;
  max-width: 384px;
  margin: 0 auto 22px;
  border-radius: 12px;
  overflow: hidden;
  background: #faf8f5;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slides::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 3 / 2;
  min-width: 0;
}

.slide-photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #eee8e1;
}

.slide-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.slide-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 9px;
  color: var(--text-color);
}

.slide-name {
  font-weight: 700;
  font-size: clamp(11px, 3vw, 13.5px);
  line-height: 1.2;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.slide-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: clamp(9px, 2.4vw, 10.5px);
  line-height: 1.28;
  color: #555;
}

.slide-specs li {
  position: relative;
  padding-left: 8px;
  margin-bottom: 1.5px;
}

.slide-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-color);
}

.slide-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: auto;
  padding-top: 6px;
}

.slide-price {
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  font-size: clamp(9.5px, 2.6vw, 11.5px);
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.slide-order {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  font-weight: 600;
  font-size: clamp(9.5px, 2.5vw, 11px);
  padding: 2px 8px;
  cursor: pointer;
}

.slide-order:hover { background: var(--accent-color); color: #fff; }

.car-btn {
  position: absolute;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  color: var(--accent-color);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.car-btn.prev { left: 6px; }
.car-btn.next { right: 6px; }

.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 9px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d9cfc5;
  cursor: pointer;
}

.dots button.active {
  background: var(--accent-color);
  width: 18px;
  border-radius: 4px;
}

@media (max-width: 480px) {
  body { padding: 10px; }
  .container { padding: 18px; }
  .carousel { margin-bottom: 20px; }
  .car-btn { display: none; }
  .logo img { max-width: 210px; }
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

select, input[type="text"], input[type="tel"], textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.item-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  background: #faf8f5;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.item-row select, .item-row input {
  flex: 1;
}

.btn {
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background-color: #6e5443;
}

.btn-secondary {
  background-color: #6c757d;
}

.btn-danger {
  background-color: #dc3545;
  padding: 8px 12px;
}

.cart-summary {
  margin-top: 30px;
  border-top: 2px solid var(--border-color);
  padding-top: 20px;
}

.cart-item {
  border-bottom: 1px dashed var(--border-color);
  padding: 10px 0;
}

.cart-item-header {
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}

.cart-subitem {
  font-size: 0.88em;
  color: #555;
  margin-left: 15px;
}

.cart-font {
  font-weight: 600;
  color: var(--accent-color);
  font-size: 0.92em;
  margin: 8px 0 2px 10px;
}

.cart-color {
  font-size: 0.88em;
  color: #555;
  margin-left: 25px;
  line-height: 1.5;
}

.cart-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88em;
  color: #555;
  margin-left: 42px;
  line-height: 1.5;
  padding: 2px 0;
}

.cart-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  color: var(--accent-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f3ece5;
}

.icon-btn.danger {
  color: #dc3545;
}

.icon-btn.danger:hover {
  background: #fdecea;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85em;
}

.remove-confirm {
  background: #fdecea;
  border-radius: 6px;
  padding: 6px 10px;
  color: #b02a37;
  flex-wrap: wrap;
}

.edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 10px 25px;
  padding: 12px;
  background: #faf8f5;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.edit-row label {
  font-size: 0.78em;
  margin-bottom: 3px;
}

.edit-wide {
  grid-column: 1 / -1;
}

.edit-buttons {
  display: flex;
  gap: 8px;
}

.checkout {
  margin-top: 35px;
  border-top: 2px solid var(--border-color);
  padding-top: 20px;
}

.pay-panel {
  display: none;
  margin-top: 15px;
  background: #faf8f5;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.pay-amount {
  font-size: 1.15em;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.pay-method-label {
  font-weight: 600;
  margin-bottom: 12px;
}

.pay-panel img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 12px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.deposit-box {
  display: none;
  margin-top: 18px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  line-height: 1.55;
}

.deposit-box .deposit-title {
  font-weight: 700;
  font-size: 1.05em;
  margin-bottom: 6px;
}

.deposit-box p {
  margin: 0 0 6px;
  font-size: 0.93em;
}

.deposit-box p:last-child {
  margin-bottom: 0;
}

input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  background: #fff;
}

.proof-preview {
  display: none;
  max-width: 200px;
  max-height: 260px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.proof-msg {
  color: #b02a37;
  font-size: 0.85em;
  font-weight: 600;
  margin-top: 6px;
}

.pay-note {
  font-size: 0.85em;
  color: #666;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.thanks-msg {
  font-size: 0.93em;
  line-height: 1.55;
  color: #555;
  max-width: 460px;
  margin: 0 auto;
}

.min-notice {
  display: none;
  margin-top: 12px;
  background: #fdecea;
  border: 1px solid #dc3545;
  border-left: 5px solid #dc3545;
  color: #b02a37;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9em;
}

.error-notice {
  display: none;
  background: #fdecea;
  border: 1px solid #dc3545;
  border-left: 5px solid #dc3545;
  color: #b02a37;
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 20px;
  font-weight: 600;
  font-size: 0.92em;
  text-align: left;
}

.error-notice ul {
  margin: 6px 0 0;
  padding-left: 20px;
  font-weight: 500;
}

.field-error {
  border-color: #dc3545 !important;
  background-color: #fff5f5 !important;
}

.total-price {
  font-size: 1.2em;
  font-weight: bold;
  text-align: right;
  margin-top: 15px;
  color: var(--accent-color);
}

/* ===== Thank-you screen + job order receipt ===== */
.thanks-head {
  text-align: center;
  margin: 6px 0 22px;
}

.thanks-check {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.thanks-head h2 {
  margin: 12px 0 8px;
  color: var(--accent-color);
  font-size: 1.4em;
}

.receipt-wrap {
  max-width: 380px;
  margin: 0 auto 22px;
  padding-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(60, 40, 25, 0.16));
}

.receipt {
  position: relative;
  background: #fff;
  border-top: 5px solid var(--accent-color);
  padding: 20px 22px 18px;
  font-family: "Poppins", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  color: #333;
}

/* torn paper edge */
.receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 10px;
  background:
    linear-gradient(135deg, #fff 5px, transparent 0) 0 0 / 10px 10px repeat-x,
    linear-gradient(225deg, #fff 5px, transparent 0) 0 0 / 10px 10px repeat-x;
}

.rc-logo {
  text-align: center;
  margin-bottom: 4px;
}

.rc-logo img {
  height: 46px;
  width: auto;
  max-width: 100%;
}

.rc-title {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 5px;
  padding-left: 5px;
  color: var(--accent-color);
  margin: 8px 0 4px;
}

.rc-sep {
  border-top: 1px dashed #cbbfb3;
  margin: 8px 0;
}

.rc-kv {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 6px;
}

.rc-kv span:first-child {
  color: #8a7a6c;
}

.rc-kv span:last-child,
.rc-color,
.rc-amount span:last-child {
  font-weight: 500;
}

.rc-kv .b,
.rc-name,
.rc-product {
  font-weight: 700;
}

.rc-kv span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rc-section {
  font-size: 10.5px;
  letter-spacing: 2px;
  color: #8a7a6c;
}

.rc-product {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.rc-product span:last-child {
  white-space: nowrap;
}

.rc-font {
  padding-left: 10px;
  color: #8a7a6c;
}

.rc-color {
  padding-left: 18px;
}

.rc-name {
  padding-left: 32px;
  overflow-wrap: anywhere;
}

.rc-amount {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rc-amount.big,
.rc-amount.big span:last-child {
  font-weight: 700;
  font-size: 14px;
}

.rc-amount.big {
  margin-bottom: 2px;
}

.rc-ready {
  text-align: center;
  padding: 2px 0;
}

.rc-ready .lbl {
  font-size: 10.5px;
  letter-spacing: 2px;
  padding-left: 2px;
  color: #8a7a6c;
}

.rc-ready .date {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--accent-color);
  margin: 4px 0;
}

.rc-ready .note {
  font-size: 10.5px;
  line-height: 1.5;
  color: #8a7a6c;
}

.rc-foot {
  text-align: center;
  color: #6b5d51;
  margin-top: 4px;
}

.rc-foot {
  font-size: 11.5px;
  line-height: 1.55;
}

.rc-foot.small {
  font-size: 10.5px;
}

.next-step {
  max-width: 460px;
  margin: 0 auto 22px;
  padding: 14px 16px;
  border: 1px solid var(--accent-color);
  border-left: 5px solid var(--accent-color);
  border-radius: 8px;
  background: #faf8f5;
  font-size: 0.9em;
  line-height: 1.55;
  color: #444;
}

.next-step-title {
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.78em;
  margin-bottom: 4px;
}

.next-step p {
  margin: 0 0 6px;
}

.next-step p:last-child {
  margin-bottom: 0;
}

@media print {
  @page { margin: 12mm; }
  body { background: #fff; padding: 0; }
  .container { box-shadow: none; padding: 0; max-width: none; }
  .logo,
  .thanks-head,
  .next-step,
  .confirm-actions,
  #actionStatus { display: none !important; }
  .receipt-wrap { filter: none; margin: 0 auto; }
  .receipt { border: 1px solid #ddd; border-top: 5px solid var(--accent-color); }
  .receipt::after { display: none; }
}
