/**
 * WC Quick Buy - Flower Shop Premium Skin
 * Thiết kế chính xác theo mẫu 365 Happy Flower
 */

:root {
  --flower-green: #2b7a44;
  --flower-orange: #f0983a;
  --flower-price: #d0021b;
  --bg-left: #f9f9f9;
  --border-color: #e5e7eb;
  --text-dark: #333333;
  --text-muted: #666666;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MODAL BASE ===== */
.wcqbcskin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wcqbcskin-modal.open {
  display: flex;
  opacity: 1;
}

/* ===== CARD STRUCTURE ===== */
.wcqbcskin-card {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 980px;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wcqbcskin-modal.open .wcqbcskin-card {
  transform: scale(1);
}

/* ===== HEADER ===== */
.wcqbcskin-head {
  background: var(--flower-green);
  color: #fff;
  padding: 0px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wcqbcskin-head__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.wcqbcskin-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.wcqbcskin-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ===== BODY GRID ===== */
.wcqbcskin-body {
  display: grid;
  grid-template-columns: 416px 1fr;
  overflow-y: auto;
}

/* ===== LEFT COLUMN: PRODUCT INFO ===== */
.wcqbcskin-left {
  padding: 24px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.wcqbcskin-img {
  width: 100%;
  aspect-ratio: 1;
  background: #f1f1f1;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
}

.wcqbcskin-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wcqbcskin-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.wcqbcskin-price {
  color: var(--flower-price);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.wcqbcskin-qty-control {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fff !important;
	padding-left: 16px !important;
	padding-top: 16px !important;
}

/* Nút + - */
.wcqbcskin-qty-btn {
  width: 50px !important;
  height: 50px !important;
  border: none !important;
  background: #f5f5f5 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

/* Hover */
.wcqbcskin-qty-btn:hover {
  background: #eaeaea !important;
}

/* Ô số */
.wcqbcskin-qty-control input[type="number"] {
  width: 50px !important;
  height: 40px !important;
  border: none !important;
  text-align: center !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333 !important;
  background: #fff !important;
  outline: none !important;
}

/* Ẩn mũi tên input number */
.wcqbcskin-qty-control input::-webkit-outer-spin-button,
.wcqbcskin-qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.wcqbcskin-qty-control input[type="number"] {
  -moz-appearance: textfield !important;
}

/* Hiệu ứng khi click */
.wcqbcskin-qty-btn:active {
  transform: scale(0.95) !important;
}
.wcqbcskin-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #fff8e6;
  border: 1px solid #ffecb3;
  border-left: 4px solid #f0983a;
  border-radius: 4px;
  margin-top: auto;
}

.wcqbcskin-total span { font-size: 14px; font-weight: 500; color: #856404; }
.wcqbcskin-total strong { font-size: 18px; color: var(--flower-price); font-weight: 700; }

/* ===== RIGHT COLUMN: FORM ===== */
.wcqbcskin-form {
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.wcqbcskin-section-title {
  display: none; /* Ẩn đi để giống mẫu nhất */
}

.wcqbcskin-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 4px;
}

.wcqbcskin-form input, 
.wcqbcskin-form select, 
.wcqbcskin-form textarea {
  width: 100% !important;
  padding: 4px 12px !important;
  border: 1px solid #dcdcdc !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: var(--text-dark) !important;
  background: #fff !important;
}

.wcqbcskin-form input::placeholder,
.wcqbcskin-form textarea::placeholder {
  color: #aaa;
  font-size: 13px;
}

.wcqbcskin-form input:focus, 
.wcqbcskin-form select:focus, 
.wcqbcskin-form textarea:focus {
  outline: none;
  border-color: var(--flower-green);
}

.wcqbcskin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
	padding-top: 12px;
}
.wcqbcskin-checkbox-group {
  background: #f2f2f2 !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  border: 1px solid #e0e0e0 !important;
}

/* Hover */
.wcqbcskin-checkbox-group:hover {
  background: #ececec !important;
}

/* Checkbox */
.wcqbcskin-checkbox-group {
  background: #f2f2f2 !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #e0e0e0 !important;
}

/* Label làm flex */
.wcqbcskin-checkbox-group label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  color: #333 !important;
}

/* Checkbox fix lệch */
.wcqbcskin-checkbox-group input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  position: relative !important;
  top: 0 !important;
  accent-color: #b8967e !important;
  cursor: pointer !important;
}

/* ===== SUBMIT BUTTON ===== */
.wcqbcskin-submit {
  width: 100%;
  background: var(--flower-orange);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 5px;
}

.wcqbcskin-submit:hover {
  background: #e68a2e;
  filter: brightness(1.05);
}

/* ===== SUCCESS OVERLAY ===== */
.wcqbcskin-success {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.wcqbcskin-success.active {
  display: flex;
  animation: fadeIn 0.3s ease-out forwards;
}

.wcqbcskin-success__icon {
  font-size: 60px;
  margin-bottom: 20px;
  color: var(--flower-green);
}

.wcqbcskin-success__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.wcqbcskin-success__sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 300px;
  margin-bottom: 25px;
}

.wcqbcskin-close-success {
  background: #333;
  color: #fff;
  border: none;
  padding: 10px 25px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 850px) {
  .wcqbcskin-body { grid-template-columns: 1fr; }
  .wcqbcskin-left {
    gap: 15px;
    padding: 15px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .wcqbcskin-img { width: 260px; margin-bottom: 0; }
  .wcqbcskin-summary { flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .wcqbcskin-price { margin-bottom: 10px; }
  .wcqbcskin-total { margin-top: 10px; }
  .wcqbcskin-form-row { grid-template-columns: 1fr; gap: 10px; }
  .delivery-time-row { grid-template-columns: 1fr 1fr; }
  .delivery-time-row div:first-child { grid-column: span 2; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wcqbcskin-response.err {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  padding: 10px;
  color: #c53030;
  font-size: 13px;
  border-radius: 4px;
}