@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Source+Sans+3:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Source Sans 3", sans-serif;
  background: #f9f6f2;
  color: #2d2117;
  min-height: 100vh;
}

header {
  background: #fffcf9;
  border-bottom: 1px solid #e8dfd5;
  padding: 1.25rem 1rem;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  width: 42px;
  height: 42px;
  background: #e07a20;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.header-text h1 {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.header-text p {
  font-size: 0.75rem;
  color: #8a7968;
}

main {
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  main {
    grid-template-columns: 2fr 1fr;
  }
}

/* Search */
.search-wrap {
  position: relative;
  margin-bottom: 0.25rem;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a7968;
  width: 18px;
  height: 18px;
}

.search-wrap input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 2.5rem;
  border: 1px solid #e8dfd5;
  border-radius: 10px;
  background: #fffcf9;
  font-family: inherit;
  font-size: 0.875rem;
  color: #2d2117;
  outline: none;
  transition: box-shadow 0.2s;
  padding-left: 40px !important;
}

.search-wrap input:focus {
  box-shadow: 0 0 0 2px #e07a2044;
}

.search-wrap input::placeholder {
  color: #b3a494;
}

.clear-btn {
  width: 5% !important;
  position: absolute;
  right: 10px;
  top: 35%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #8a7968;
  display: none;
  font-size: 1.1rem;
  line-height: 1;
}

.clear-btn.visible {
  display: block;
}

/* Category */
.category-block {
  border: 1px solid #e8dfd5;
  border-radius: 12px;
  background: #f5f0ea;
  overflow: hidden;
  margin-bottom: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: background 0.15s;
}

.category-header:hover {
  background: #ede6dc;
}

.category-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2d2117;
  padding-left: 15px !important;
}

.category-header .cat-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-header .cat-total {
  font-weight: 700;
  font-size: 0.875rem;
  color: #e07a20;
}

.category-header .chevron {
  color: #8a7968;
  font-size: 1.1rem;
  transition: transform 0.2s;
  margin-right: 10px !important;
}

.category-header.collapsed .chevron {
  transform: rotate(180deg);
}

.category-body {
  padding: 5px !important;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-body.hidden {
  display: none;
}

/* Product */
.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid #e8dfd5;
  background: #fffcf9;
  transition: all 0.2s;
}

.product-card.active {
  border-color: #d4a574;
  background: #fdf5ed;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-info .name {
  text-align: left !important;
  font-weight: 600;
  font-size: 0.875rem;
  color: #2d2117;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-info .meta {
  text-align: left !important;
  font-size: 0.82rem !important; /* bigger */
  font-weight: 500 !important; /* readable */
  color: #5c4634 !important; /* higher contrast */
  opacity: 0.9 !important;
  margin-top: 4px !important;
  letter-spacing: 0.2px !important;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
}

.qty-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  border: 1px solid #e8dfd5 !important;
  background: #f5f0ea !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 1rem !important;
  color: #2d2117 !important;
  transition: all 0.15s !important;
  line-height: 1 !important;
}

.qty-btn:hover:not(:disabled) {
  background: #e07a20 !important;
  color: #fff !important;
  border-color: #e07a20 !important;
}

.qty-btn:disabled {
  opacity: 0.3 !important;
  cursor: default !important;
}

.qty-val {
  margin-top: 10px !important;
  width: 24px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
}

.line-total {
  margin-left: 1rem;
  width: 70px;
  text-align: right;
  font-weight: 700;
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .product-card {
    align-items: flex-start; /* top align */
    gap: 6px;
  }

  .product-info .name {
    white-space: normal !important; /* wrap allow */
    overflow: visible !important;
    text-overflow: unset !important;
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .product-info .meta {
    font-size: 0.75rem !important;
    line-height: 1.2;
  }

  .qty-controls {
    margin-left: 8px;
    flex-shrink: 0; /* squeeze nahi hone dega */
  }

  .line-total {
    margin-left: 8px;
    width: auto; /* fixed width hatao */
    min-width: 55px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 1.5rem;
}

.summary-card {
  border: 1px solid #e8dfd5;
  border-radius: 12px;
  background: #fffcf9;
  padding: 1.25rem;
  animation: fadeIn 0.3s ease-out;
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.summary-title span {
  color: #e07a20;
  font-size: 1.2rem;
}

.summary-divider {
  border: none;
  border-top: 1px solid #e8dfd5;
  margin: 0.75rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.summary-row .label {
  color: #8a7968;
}
.summary-row .value {
  font-weight: 600;
}

.grand-total {
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #e07a20;
}

.reset-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.65rem;
  border: 1px solid #e8dfd5;
  border-radius: 10px;
  background: #f5f0ea;
  color: #2d2117;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
}

.reset-btn:hover {
  background: #ede6dc;
}

.empty-msg {
  text-align: center;
  color: #8a7968;
  padding: 3rem 0;
}

.total-price-container {
  margin-top: 1.5rem;
  padding: 14px 18px;

  background: #f3e7db;
  border-radius: 12px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Label */
.total-label {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #d9822b;
}

/* Amount Wrapper */
.total-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;

  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: #d9822b;
}

/* ₹ symbol fix */
.currency {
  font-size: 1.5rem;
  line-height: 1;
  position: relative;
  top: 4px;
}

/* Number */
#total-price {
  font-size: 1.8rem;
}

header,
.category-block,
.product-card {
  background: #fff7ef;
  border: 1px solid #f1c89d;
}

.category-header:hover {
  background: #fdebd8;
}

.product-card.active {
  background: #fde3c7;
  border-color: #e6a86b;
}

.cat-total,
.grand-total {
  color: #d9822b;
}

.qty-btn:hover:not(:disabled) {
  background: #d9822b !important;
  border-color: #d9822b !important;
  color: white !important;
}

/* Delivery Badge */
.delivery-tag {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 0.65rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: capitalize;
}

.delivery-tag.pending {
  background: #fde3c7;
  color: #d9822b;
}

.delivery-tag.delivered {
  background: #e6f4ea;
  color: #2e7d32;
}

/* Pending Grid */
.pending-grid-container {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fff7ef;
  border: 1px solid #f1c89d;
  border-radius: 12px;
}

.pending-grid-container h3 {
  font-family: "Playfair Display", serif;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.pending-card {
  background: #fffcf9;
  border: 1px solid #e8dfd5;
  border-radius: 10px;
  padding: 0.75rem;
}

.p-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.p-cat {
  font-size: 0.7rem;
  color: #8a7968;
  margin-top: 3px;
}

.p-status {
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #d9822b;
}

#pending-container {
  display: none;
}

.comment-section {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-section label {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-section textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #e5b98c;
  background: #fff7ef;
  resize: vertical;
  font-family: inherit;
}

/*review selection css start*/
/* ===== Checkout Summary Container ===== */
.checkout-summary-container {
  margin-top: 1.5rem !important;
  padding: 1.2rem !important;
  background: #fff7ef !important;
  border: 1px solid #f1c89d !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
  display: block !important;
}

/* Header */
.checkout-summary-header {
  font-family: "Playfair Display", serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #2d2117 !important;
  margin-bottom: 1rem !important;
  text-align: center !important;
}

/* Item Row */
.checkout-item-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 8px 0 !important;
  border-bottom: 1px dashed #e8dfd5 !important;
  font-size: 0.9rem !important;
}

/* Left Section */
.checkout-item-left {
  display: flex !important;
  flex-direction: column !important;
}

.checkout-item-name {
  font-weight: 600 !important;
  color: #2d2117 !important;
  font-size: 0.9rem !important;
}

.checkout-item-meta {
  text-align: left !important;
  font-size: 0.75rem !important;
  color: #8a7968 !important;
  margin-top: 2px !important;
}

/* Right Amount */
.checkout-item-amount {
  font-weight: 700 !important;
  color: #d9822b !important;
  font-size: 0.95rem !important;
}

/* Remove last border */
.checkout-item-row:last-child {
  border-bottom: none !important;
}

/* ===== Grand Total Section ===== */
.checkout-summary-total {
  margin-top: 1rem !important;
  padding-top: 0.8rem !important;
  border-top: 2px solid #f1c89d !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-family: "Playfair Display", serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #d9822b !important;
}

.checkout-total-amount {
  font-size: 1.4rem !important;
}

.disabled-submit-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

.disabled-textarea {
  background-color: #f0f0f0;
  cursor: not-allowed;
}

.delivery-tag.pending {
  background: #fff4e5; /* light orange */
  color: #e65100; /* dark orange */
}

/* Partial */
.delivery-tag.partial {
  background: #fff8e1; /* light yellow */
  color: #f9a825; /* golden yellow */
}

/*etnry container css*/
.entry-container {
  padding: 24px;
  background: #f6d7b5;
  border-radius: 16px;
}

/* Question Card */
.entry-question-group {
  background: #fff7ef;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 8px !important;
}

/* Question text */
.entry-question-text {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  color: #3e2f23;
}

/* Radio options */
.entry-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Radio item (card style) */
.entry-radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1d2aa;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

/* Hover */
.entry-radio-item:hover {
  background: #e8c49a;
  transform: translateX(3px);
}

/* Radio input */
.entry-radio-item input {
  accent-color: #28a745;
  transform: scale(1.1);
}

/* Selected state (IMPORTANT ✨) */
.entry-radio-item input:checked + span {
  font-weight: 600;
  color: #1e7e34;
}

.entry-radio-item:has(input:checked) {
  border: 1px solid #28a745;
  background: #e6f4ea;
}

/* -------------------- */
/* DOCUMENT SECTION */
/* -------------------- */

.entry-documents {
  background: #fff7ef;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* Title */
.entry-title {
  font-size: 18px;
  font-weight: 600;
}

.entry-subtitle {
  font-size: 13px;
  color: #7a6a5a;
  margin-bottom: 16px;
  text-align: left;
}

/* List */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Item */
.entry-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1d2aa;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.entry-item:hover {
  background: #e8c49a;
  transform: translateX(3px);
}

/* Checkbox */
.entry-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #c89b6d;
  border-radius: 5px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Checked */
.entry-checkbox:checked {
  background: #28a745;
  border-color: #28a745;
}

/* Tick */
.entry-checkbox:checked::after {
  content: "✓";
  color: white;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

/* Text */
.entry-item span {
  font-size: 14px;
  font-weight: 500;
  color: #3e2f23;
}

/* Checked row */
.entry-item:has(.entry-checkbox:checked) {
  background: #e6f4ea;
  border: 1px solid #28a745;
}

.entry-checkbox:checked + span {
  text-decoration: line-through;
  opacity: 0.6;
}

/* -------------------- */
/* BUTTON */
/* -------------------- */

.entry-btn-row {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* Button */
.entry-next-btn {
  padding: 11px 26px;
  border: none;
  background: linear-gradient(135deg, #28a745, #1f7a33);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Hover */
.entry-next-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* Disabled */
.entry-next-btn:disabled {
  background: #bfbfbf;
  cursor: not-allowed;
  box-shadow: none;
}

.entry-category {
  margin-bottom: 18px;
}

/* Category title */
.entry-category-title {
  font-size: 15px;
  font-weight: 600;
  color: #2f241c;
  margin-bottom: 8px;
  padding-left: 4px;
  border-left: 4px solid #28a745;
}

/* Add slight spacing between groups */
.entry-category .entry-list {
  margin-top: 6px;
}

.entry-mapping-box {
  margin-top: 10px;
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2c3a5;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* Top Title */
.entry-mapping-box > h4 {
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #7a4218;
}

/* Category Heading */
.entry-output > h4 {
  font-size: 13px; /* 👈 smaller than main */
  font-weight: 600;
  color: #5a3a1c;
  background: #efd0a8; /* 👈 lighter than main */
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 14px;
  text-align: left;
}

/* List Box */
.entry-output ul {
  background: #fff7ef;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 14px 0;
  list-style: none;

  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* List Item */
.entry-output ul li {
  padding: 6px 4px;
  border-bottom: 1px dashed #e5c7a6;
  font-size: 14px;
  transition: 0.2s ease;
}

/* Hover */
.entry-output ul li:hover {
  padding-left: 8px;
  color: #a3541c;
}

.entry-output ul li:last-child {
  border-bottom: none;
}

/* Checkbox Row */
.entry-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* Checkbox */
.entry-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #28a745;
  margin: 0; /* 👈 remove default browser margin */
  transform: translateY(1px); /* 👈 micro-adjust (optional) */
  margin-right: 5px !important;
}

/* Checked effect */
.entry-checkbox-row input:checked + span {
  text-decoration: line-through;
  opacity: 0.6;
}

.entry-output .entry-subtitle {
  font-size: 13px;
  color: #7a6a5a;
  margin-bottom: 8px;
}

/* Radio specific (optional polish) */
.entry-checkbox-row input[type="radio"] {
  accent-color: #28a745;
  transform: scale(1.05);
}

.entry-question-header {
  background: #f4c89f;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  color: #4a2f16;
  margin-bottom: 6px;
  list-style: none;
  font-size: 14px;
  line-height: 1.4;
}

.entry-hindi-text {
  display: block; /* 👈 force new line */
  font-size: 13px;
  color: #6b5b4d;
  margin-top: 2px;
  text-align: left;
}

.entry-note {
  margin-top: 12px;
  font-size: 13px;
  color: #7a6a5a;
  background: #fff7ef;
  padding: 8px 10px;
  border-radius: 8px;
}

.hidden {
  display: none;
}
