/* =============================================
   Customize Accessory Page — customize-page.css
   Add to your theme via Appearance → Customize → Additional CSS
   or enqueue via functions.php
   ============================================= */

/* ── Page layout ── */
#customize-page {
  padding: 3rem 1rem;
  background: #f9f9f7;
  min-height: 80vh;
}

.customize-container {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Page header (general /customize) ── */
.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #666;
  margin-bottom: 2rem;
}

/* ── Product context bar (when coming from a product page) ── */
.product-context-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid #e5e5e0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 1.5rem;
}

.product-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e5e0;
}

.product-context-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.context-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
}

.product-context-info strong {
  font-size: 15px;
  color: #111;
}

.back-link {
  font-size: 13px;
  color: #1D9E75;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover { text-decoration: underline; }

/* ── Form sections ── */
.form-section {
  background: white;
  border: 1px solid #e5e5e0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.section-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

.optional {
  font-weight: 400;
  color: #aaa;
  font-size: 12px;
}

/* ── Toggle sections ── */
.section-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.section-title {
  font-size: 15px;
  font-weight: 500;
  color: #111;
}

.section-desc {
  font-size: 13px;
  color: #888;
}

.price-badge {
  display: inline-block;
  font-size: 11px;
  background: #E1F5EE;
  color: #085041;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 500;
  margin-left: 4px;
}

.section-checkbox {
  width: 22px;
  height: 22px;
  accent-color: #1D9E75;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

/* ── Collapsible section body ── */
.section-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.2s;
}

.section-body.open {
  max-height: 500px;
  opacity: 1;
  margin-top: 1rem;
}

/* ── Fields ── */
.field-row {
  margin-bottom: 1rem;
}

.field-row label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.field-row input[type="text"],
.field-row select,
.field-row textarea,
.form-section > textarea,
.form-section > select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus,
.form-section > textarea:focus,
.form-section > select:focus {
  outline: none;
  border-color: #1D9E75;
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

/* ── Color swatches ── */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-swatch:hover { transform: scale(1.15); }

.color-swatch input[type="radio"] { display: none; }

.color-swatch:has(input:checked) {
  border-color: #111;
  transform: scale(1.1);
}

/* ── Checkbox group ── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  margin-bottom: 0 !important;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #1D9E75;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Info note ── */
.info-note {
  background: #f0fbf7;
  border-left: 3px solid #1D9E75;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #555;
  margin-bottom: 1rem;
}

/* ── Submit ── */
.form-submit-row {
  text-align: center;
  padding: 0.5rem 0 2rem;
}

.submit-btn {
  background: #1D9E75;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}

.submit-btn:hover { background: #0F6E56; }
.submit-btn:active { transform: scale(0.98); }

.submit-note {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
}

/* ── Success box ── */
.success-box {
  background: white;
  border: 1px solid #e5e5e0;
  border-radius: 14px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 480px;
  margin: 4rem auto;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E1F5EEF;
  border: 1px solid #1D9E75;
  color: #1D9E75;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-box h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.success-box p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.back-shop-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #1D9E75;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s;
}

.back-shop-btn:hover { background: #0F6E56; }

/* ── "Customize this product" button on product page ── */
.caf-customize-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin-top: 10px !important;
  background: transparent !important;
  color: #1D9E75 !important;
  border: 1px solid #1D9E75 !important;
  transition: background 0.15s, color 0.15s !important;
}

.caf-customize-btn:hover {
  background: #1D9E75 !important;
  color: white !important;
}

/* ── Menu item highlight ── */
.caf-menu-item a {
  color: #1D9E75 !important;
  font-weight: 500;
}


.caf-customize-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.caf-customize-btn.caf-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.woocommerce-cart .cart_item .variation,
.woocommerce-checkout .cart_item .variation {
  color: #111 !important;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 6px;
}

.woocommerce-cart .cart_item .variation dt,
.woocommerce-checkout .cart_item .variation dt {
  font-weight: 500;
  color: #111 !important;
  display: block;
  margin-top: 4px;
}

.woocommerce-cart .cart_item .variation dd,
.woocommerce-checkout .cart_item .variation dd {
  color: #444 !important;
  margin: 0 0 4px 0;
  display: block;
}

.woocommerce-cart .cart_item .variation dd p,
.woocommerce-checkout .cart_item .variation dd p {
  margin: 0;
}