/* ==========================================================================
   TRANG ĐẶT HÀNG (CHECKOUT) — mở khi khách bấm "ĐẶT HÀNG" trong trang chi tiết tranh
   ========================================================================== */
.ock-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000050;
  background: #ffffff;
  display: none;
  overflow-y: auto;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1f2937;
  -webkit-overflow-scrolling: touch;
}

.ock-overlay.open {
  display: block;
}

body.ock-lock {
  overflow: hidden;
}

body.ock-lock .floating-contact-widget {
  display: none !important;
}

.ock-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: 100vh;
}

.ock-main {
  padding: 28px 40px 48px max(24px, calc((100vw - 1240px) / 2));
}

.ock-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.ock-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: #1f3b37;
  letter-spacing: 1px;
  line-height: 1.2;
}

.ock-brand-name small {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9c7a26;
  letter-spacing: 2px;
  margin-top: 2px;
}

.ock-close {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}

.ock-close:hover {
  background: #f3f4f6;
}

.ock-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.ock-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
}

.ock-field {
  margin-bottom: 12px;
}

.ock-input,
.ock-select,
.ock-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 13px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ock-select {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.ock-select:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.ock-textarea {
  min-height: 88px;
  resize: vertical;
}

.ock-input:focus,
.ock-select:focus,
.ock-textarea:focus {
  border-color: #1f3b37;
  box-shadow: 0 0 0 3px rgba(31, 59, 55, 0.12);
}

.ock-field.has-error .ock-input,
.ock-field.has-error .ock-select {
  border-color: #dc2626;
}

.ock-error {
  display: none;
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 4px;
}

.ock-field.has-error .ock-error {
  display: block;
}

.ock-select-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0 0 4px 2px;
}

.ock-info-box {
  background: #e0f2f1;
  border: 1px solid #b2dfdb;
  color: #1f3b37;
  border-radius: 5px;
  padding: 14px 16px;
  font-size: 0.92rem;
  margin-bottom: 30px;
}

.ock-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #d1d5db;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  background: #ffffff;
}

.ock-option + .ock-option {
  border-top: none;
}

.ock-option:first-of-type {
  border-radius: 5px 5px 0 0;
}

.ock-option:last-of-type {
  border-radius: 0 0 5px 5px;
}

.ock-option:only-of-type {
  border-radius: 5px;
}

.ock-option input {
  margin-top: 3px;
  accent-color: #1f3b37;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.ock-option-text {
  flex: 1;
}

.ock-option-text small {
  display: block;
  color: #6b7280;
  font-size: 0.82rem;
  margin-top: 3px;
  line-height: 1.45;
}

.ock-option-icon {
  font-size: 1.2rem;
}

.ock-option.selected {
  background: #f6faf9;
  border-color: #1f3b37;
  position: relative;
  z-index: 1;
}

.ock-option + .ock-option.selected {
  border-top: 1px solid #1f3b37;
  margin-top: -1px;
}

.ock-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Cột phải: đơn hàng */
.ock-summary {
  background: #f7f7f7;
  border-left: 1px solid #e5e7eb;
  padding: 28px 28px 40px;
}

.ock-summary-inner {
  position: sticky;
  top: 24px;
  max-width: 380px;
}

.ock-summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.ock-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.ock-item-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff center / cover no-repeat;
}

.ock-item-qty {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #1f3b37;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ock-item-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.ock-item-name small {
  display: block;
  color: #6b7280;
  font-weight: 500;
  margin-top: 2px;
}

.ock-item-price {
  font-size: 0.92rem;
  white-space: nowrap;
}

.ock-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: #4b5563;
  margin: 14px 0;
}

.ock-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 4px;
}

.ock-total-label {
  font-size: 1.05rem;
}

.ock-total-label small {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
}

.ock-total-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1f3b37;
}

.ock-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}

.ock-back {
  background: none;
  border: none;
  color: #1f3b37;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
}

.ock-submit {
  background: #1f3b37;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 16px 30px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s;
}

.ock-submit:hover {
  background: #132724;
}

.ock-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ock-form-error {
  display: none;
  margin-top: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

/* Màn hình cảm ơn */
.ock-done {
  max-width: 560px;
  margin: 0 auto;
  padding: 50px 24px 60px;
  text-align: center;
}

.ock-done-tick {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #1f3b37;
  color: #1f3b37;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.ock-done h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  color: #111827;
  margin: 0 0 12px;
}

.ock-done p {
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 8px;
}

.ock-done-code {
  display: inline-block;
  margin: 12px 0 22px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #1f3b37;
  border: 1px dashed #1f3b37;
  border-radius: 6px;
  padding: 8px 14px;
}

.ock-bank {
  text-align: left;
  background: #fdfbf5;
  border: 1px solid #ead9a8;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 22px;
  font-size: 0.92rem;
}

.ock-bank h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  color: #9c7a26;
}

.ock-bank-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f1e6c8;
}

.ock-bank-row:last-child {
  border-bottom: none;
}

.ock-bank-row span:first-child {
  color: #6b7280;
}

.ock-bank-row b {
  text-align: right;
  word-break: break-all;
}

.ock-done-actions {
  display: grid;
  gap: 10px;
}

.ock-btn-zalo {
  display: block;
  background: #0068ff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  padding: 13px;
  font-weight: 700;
}

.ock-btn-continue {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 13px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}

/* Màn hình nhỏ: xếp dọc, đơn hàng lên đầu */
@media (max-width: 1023px) {
  .ock-page {
    grid-template-columns: 1fr;
  }

  .ock-summary {
    order: -1;
    border-left: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 16px;
  }

  .ock-summary-inner {
    position: static;
    max-width: none;
  }

  .ock-summary .ock-actions {
    display: none;
  }

  .ock-main {
    padding: 20px 16px 120px;
  }

  .ock-brand {
    display: none;
  }

  .ock-topbar {
    display: flex !important;
  }

  .ock-summary-title {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .ock-cols {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ock-mobile-bar {
    display: flex !important;
  }
}

.ock-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}

.ock-mobile-bar .ock-total-value {
  font-size: 1.2rem;
}

.ock-mobile-bar .ock-submit {
  flex: 1;
  max-width: 220px;
  padding: 14px 16px;
}

/* Nút "ĐẶT HÀNG" trong trang chi tiết tranh */
.public-btn-order {
  width: 100%;
  max-width: 520px;
  height: 52px;
  margin-bottom: 0.75rem;
  border: none;
  border-radius: 8px;
  background: #dfb85b;
  color: #141b18;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(223, 184, 91, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.public-btn-order:hover {
  background: #d4a944;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(223, 184, 91, 0.55);
}

/* Thanh trên cùng chỉ dùng trên điện thoại (tên cửa hàng + nút quay lại) */
.ock-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 4;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ock-topbar .ock-brand-name {
  font-size: 1.1rem;
}
