/* Gardenia Lab — Premium Home Sample Collection Section & Simplified Booking Modal */

.home-collection {
  position: relative;
  direction: rtl;
  padding-top: clamp(12px, 2.6vw, 48px);
  padding-bottom: clamp(28px, 5vw, 72px);
  padding-right: max(10px, calc((100vw - var(--container-max, 1200px)) / 2));
  padding-left: max(var(--rail-safe, 42px), calc((100vw - var(--container-max, 1200px)) / 2));
  background: linear-gradient(180deg, #ffffff 0%, #fffaf3 48%, #fffaf4 100%);
  color: #381417;
  overflow: hidden;
  scroll-margin-top: 24px;
}

.home-collection::before {
  content: "";
  position: absolute;
  top: 0;
  right: max(16px, calc((100vw - 1160px) / 2));
  left: max(var(--rail-safe, 52px), calc((100vw - 1160px) / 2));
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(213, 161, 45, 0.45) 50%, transparent 100%);
  pointer-events: none;
}

.hc-stage {
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  border-radius: clamp(20px, 2.8vw, 30px);
  background: linear-gradient(135deg, #6e000c 0%, #980014 48%, #580009 100%);
  border: 1.5px solid rgba(235, 190, 82, 0.58);
  box-shadow:
    0 20px 48px rgba(74, 0, 10, 0.16),
    inset 0 1px 0 rgba(255, 245, 214, 0.28);
  overflow: hidden;
  color: #ffffff;
  animation: hcStageFadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hcStageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hc-stage::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(245, 202, 80, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hc-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

.hc-media-col {
  position: relative;
  order: -1;
  min-height: 260px;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #470007;
  border-bottom: 2px solid rgba(235, 190, 82, 0.55);
}

.hc-media-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hc-media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hc-stage:hover .hc-media-img {
  transform: scale(1.025);
}

.hc-media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(74, 0, 9, 0.72) 0%,
    rgba(74, 0, 9, 0.16) 42%,
    transparent 100%
  );
  pointer-events: none;
}

.hc-media-gold-line {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(247, 211, 114, 0.38);
  border-radius: clamp(12px, 1.8vw, 18px);
  pointer-events: none;
  z-index: 2;
}

.hc-copy-col {
  padding: clamp(22px, 4.5vw, 48px) clamp(18px, 4.2vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fae094;
  font-size: clamp(13px, 1.4vw, 15.5px);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: clamp(8px, 1.4vw, 14px);
}

.hc-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #fff5be, #d9a126);
  flex-shrink: 0;
}

.hc-headline {
  margin: 0 0 clamp(10px, 1.8vw, 16px);
  font-size: clamp(26px, 5.8vw, 48px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
}

.hc-headline-gold {
  display: inline-block;
  background: linear-gradient(140deg, #fff8c4 0%, #f5cb56 38%, #d29017 75%, #fff5b8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  padding: 0 2px;
}

.hc-subtext {
  margin: 0 0 clamp(16px, 2.4vw, 24px);
  font-size: clamp(15px, 2.2vw, 20px);
  font-weight: 700;
  line-height: 1.68;
  color: #fff6ee;
  max-width: 44ch;
  text-wrap: balance;
}

.hc-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 clamp(20px, 3vw, 28px);
  padding: 12px 0;
  border-top: 1px solid rgba(246, 209, 115, 0.24);
  border-bottom: 1px solid rgba(246, 209, 115, 0.24);
  font-size: clamp(12.5px, 1.35vw, 14.5px);
  font-weight: 700;
  color: #fcecd2;
}

.hc-highlight-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hc-highlight-mark {
  color: #f6cd62;
  font-weight: 900;
}

.hc-highlight-sep {
  color: rgba(246, 205, 98, 0.55);
  user-select: none;
}

.hc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hc-btn-primary {
  min-height: 50px;
  padding: 11px clamp(20px, 3.2vw, 30px);
  border-radius: 999px;
  border: 2px solid #fff2ba;
  background: linear-gradient(135deg, #fff5bf 0%, #f1c349 46%, #c88b12 92%, #fbe28e 100%);
  color: #5e000a;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(28, 0, 4, 0.34);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease;
}

.hc-btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.hc-btn-primary-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.hc-btn-secondary {
  min-height: 50px;
  padding: 11px clamp(18px, 2.6vw, 24px);
  border-radius: 999px;
  border: 1.5px solid rgba(247, 210, 112, 0.72);
  background: rgba(58, 0, 8, 0.42);
  color: #fff8ea;
  font-size: clamp(14px, 1.6vw, 16.5px);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.hc-btn-secondary:hover {
  background: rgba(255, 246, 218, 0.14);
  border-color: #ffe394;
}

.hc-btn-secondary[aria-expanded="true"] {
  background: rgba(255, 246, 218, 0.18);
  border-color: #ffe394;
}

.hc-btn-chevron {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.hc-btn-secondary[aria-expanded="true"] .hc-btn-chevron {
  transform: rotate(180deg);
}

/* Expandable Service Details Panel inside Home Collection Section */
.hc-details-drawer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(245, 202, 80, 0.32);
  background: linear-gradient(180deg, rgba(48, 0, 6, 0.56) 0%, rgba(38, 0, 5, 0.78) 100%);
  padding: clamp(20px, 3.2vw, 32px) clamp(18px, 4vw, 48px);
}

.hc-details-drawer[hidden] {
  display: none;
}

.hc-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hc-details-title {
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 900;
  color: #fae094;
}

.hc-details-meta {
  font-size: 13.5px;
  font-weight: 700;
  color: #f7e6ce;
}

.hc-steps-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.hc-step-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.07);
  border: 1px solid rgba(245, 202, 80, 0.24);
}

.hc-step-num {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #f5ca50;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.hc-step-heading {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.hc-step-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #f3dfd3;
}

.hc-details-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 202, 80, 0.2);
}

.hc-details-note {
  margin: 0;
  font-size: 13px;
  color: #f2dec9;
  line-height: 1.6;
}

.hc-details-book-link {
  background: none;
  border: 0;
  padding: 6px 0;
  color: #ffe28a;
  font-weight: 900;
  font-size: 14.5px;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

/* ==================== SIMPLIFIED HOME COLLECTION BOOKING MODAL ==================== */
.hc-modal-shade {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28, 4, 8, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding-top: clamp(10px, 2.2vw, 20px);
  padding-bottom: clamp(10px, 2.2vw, 20px);
  padding-right: clamp(12px, 2.5vw, 24px);
  padding-left: max(var(--rail-safe, 52px), clamp(12px, 2.5vw, 24px));
  direction: rtl;
}

.hc-modal-shade.show {
  display: flex;
}

.hc-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #35141a;
  border-radius: 18px;
  border: 1.5px solid #ead4b4;
  border-top: 4px solid #c9972c;
  box-shadow: 0 22px 54px rgba(42, 0, 6, 0.32);
  overflow: hidden;
}

/* Single Clean Modal Header */
.hc-modal-header {
  padding: 14px clamp(16px, 3vw, 22px) 12px;
  border-bottom: 1px solid #f2e5d9;
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
  flex-shrink: 0;
}

.hc-modal-kicker {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #9b6c15;
  margin-bottom: 2px;
}

.hc-modal-title {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 900;
  color: #9e0015;
  line-height: 1.25;
}

/* Compact Scrollable Form & Live Review Body */
.hc-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px clamp(16px, 3vw, 22px);
}

.hc-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 12px;
}

.hc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hc-field label {
  font-size: 13px;
  font-weight: 800;
  color: #4c2327;
}

.hc-required {
  color: #b8001b;
  margin-right: 2px;
}

.hc-optional {
  font-size: 11px;
  font-weight: 700;
  color: #8b7274;
}

.hc-field input,
.hc-field select,
.hc-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #e4d2c8;
  background: #fffdfb;
  color: #35141a;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hc-field input[type="tel"],
.hc-field input[type="date"] {
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hc-field input[type="file"] {
  padding: 6px 10px;
  font-size: 12.5px;
  background: #fffaf3;
}

.hc-location-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hc-location-btn {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #dcb04b;
  background: #fff9ef;
  color: #8f0013;
  font-size: 12px;
  font-weight: 800;
}

.hc-location-btn:hover {
  background: #fdf0d5;
}

.hc-location-status {
  font-size: 11.5px;
  font-weight: 700;
  color: #166037;
}

.hc-location-status[data-state="error"] {
  color: #b41120;
}

.hc-location-status[hidden] {
  display: none;
}

.hc-field textarea {
  min-height: 58px;
  resize: vertical;
  line-height: 1.5;
}

.hc-field input:focus,
.hc-field select:focus,
.hc-field textarea:focus {
  border-color: #c39228;
  box-shadow: 0 0 0 3px rgba(217, 171, 56, 0.2);
  background: #ffffff;
}

.hc-field input[aria-invalid="true"],
.hc-field select[aria-invalid="true"],
.hc-field textarea[aria-invalid="true"] {
  border-color: #c91b2b;
  background: #fff8f8;
}

.hc-field-error {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #b41120;
  line-height: 1.35;
}

.hc-field-error:empty {
  display: none;
}

/* Compact Review Summary inside the form flow */
.hc-compact-review {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #fdf8ef;
  border: 1px solid #ead8bc;
}

.hc-compact-review-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 900;
  color: #8f0013;
}

.hc-compact-review-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  font-size: 12px;
}

.hc-compact-review-item {
  min-width: 0;
}

.hc-compact-review-item.is-full {
  grid-column: 1 / -1;
}

.hc-compact-review-label {
  color: #826247;
  font-weight: 700;
  margin-left: 4px;
}

.hc-compact-review-value {
  color: #35141a;
  font-weight: 800;
  word-break: break-word;
}

.hc-compact-review-value.is-ltr {
  direction: ltr;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Concise non-technical status message */
.hc-status-banner {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 9px;
  background: #fff6e5;
  border: 1px solid #e6c687;
  color: #7a4b06;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 1.6;
}

.hc-status-banner[data-state="success"] {
  background: #eef9f1;
  border-color: #bfe3ca;
  color: #145932;
}

.hc-status-banner[data-state="error"] {
  background: #fff2f2;
  border-color: #edc2c6;
  color: #9e111f;
}

.hc-status-banner a {
  color: inherit;
  text-decoration: underline;
  margin-right: 6px;
}

.hc-status-banner[hidden] {
  display: none;
}

/* Single Sticky Footer with ONLY the 3 requested buttons */
.hc-modal-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px clamp(16px, 3vw, 22px);
  border-top: 1px solid #f2e5d9;
  background: #fffdf9;
}

/* 1. تأكيد — Primary Ruby Red button */
.hc-btn-confirm {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid #d9a838;
  background: linear-gradient(95deg, #940013, #c0001e);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 900;
  white-space: nowrap;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.hc-btn-confirm:hover:not(:disabled) {
  filter: brightness(1.08);
}

.hc-btn-confirm:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* 2. إلغاء — Secondary outlined button */
.hc-btn-cancel {
  flex: 0 1 auto;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #dcb04b;
  background: #fff9ef;
  color: #8f0013;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color 0.18s ease;
}

.hc-btn-cancel:hover {
  background: #fdf0d5;
}

/* 3. إغلاق — Minimal outlined or text button */
.hc-btn-close {
  flex: 0 1 auto;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e5d5c8;
  background: transparent;
  color: #6b4c4e;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.hc-btn-close:hover {
  background: #f8efe8;
  color: #35141a;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* Ultra-narrow Mobile (320px - 359px) */
@media (max-width: 359px) {
  .home-collection {
    padding-top: 10px;
    padding-right: 8px;
    padding-left: var(--rail-safe, 38px);
  }
  .hc-copy-col {
    padding: 18px 14px 20px;
  }
  .hc-headline {
    font-size: 24px;
  }
  .hc-subtext {
    font-size: 14px;
  }
  .hc-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hc-btn-primary,
  .hc-btn-secondary {
    width: 100%;
  }
  .hc-modal-shade {
    padding-right: 8px;
    padding-left: 46px;
  }
  .hc-modal-header,
  .hc-modal-body,
  .hc-modal-footer {
    padding-right: 12px;
    padding-left: 12px;
  }
  .hc-compact-review-grid {
    grid-template-columns: 1fr;
  }
  .hc-modal-footer {
    gap: 6px;
  }
  .hc-btn-confirm,
  .hc-btn-cancel,
  .hc-btn-close {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* Mobile CTA full-width ergonomics up to 480px */
@media (max-width: 480px) {
  .hc-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hc-btn-primary,
  .hc-btn-secondary {
    width: 100%;
  }
}

/* Form 2-column row on wider mobile / tablet (540px+) */
@media (min-width: 540px) {
  .hc-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hc-field.is-full {
    grid-column: 1 / -1;
  }
}

/* Tablet & Desktop Two-Column Split (768px+) */
@media (min-width: 768px) {
  .hc-grid {
    grid-template-columns: 1.08fr 0.92fr;
    min-height: 410px;
  }
  .hc-media-col {
    order: 0;
    aspect-ratio: auto;
    min-height: 410px;
    height: 100%;
    border-bottom: 0;
    border-right: 2px solid rgba(235, 190, 82, 0.52);
  }
  .hc-media-scrim {
    background: linear-gradient(
      to left,
      rgba(90, 0, 12, 0.68) 0%,
      rgba(90, 0, 12, 0.14) 36%,
      transparent 100%
    );
  }
  .hc-steps-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .hc-stage {
    max-width: 1060px;
  }
  .hc-grid {
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 450px;
  }
}

/* Large Desktop (1536px+) */
@media (min-width: 1536px) {
  .home-collection {
    padding-right: max(48px, calc((100vw - 1380px) / 2));
    padding-left: max(88px, calc((100vw - 1380px) / 2));
  }
  .hc-stage {
    max-width: 1120px;
  }
  .hc-grid {
    min-height: 480px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc-stage,
  .hc-media-img,
  .hc-btn-primary,
  .hc-btn-secondary,
  .hc-btn-chevron {
    animation: none;
    transition: none;
  }
}

/* ==================== LTR ADAPTATION ==================== */
html[dir="ltr"] .hc-required {
  margin-right: 0;
  margin-left: 2px;
}

html[dir="ltr"] .hc-field input[type="tel"],
html[dir="ltr"] .hc-field input[type="date"] {
  text-align: left;
}

html[dir="ltr"] .hc-compact-review-label {
  margin-left: 0;
  margin-right: 4px;
}

html[dir="ltr"] .hc-status-banner a {
  margin-right: 0;
  margin-left: 6px;
}

@media (min-width: 768px) {
  html[dir="ltr"] .hc-media-col {
    border-right: 0;
    border-left: 2px solid rgba(235, 190, 82, 0.52);
  }
  html[dir="ltr"] .hc-media-scrim {
    background: linear-gradient(
      to right,
      rgba(90, 0, 12, 0.68) 0%,
      rgba(90, 0, 12, 0.14) 36%,
      transparent 100%
    );
  }
}

