:root {
  --primary-blue: #1a73e8;
  --primary-hover: #1557b0;
  --heading-maroon: #7a1c1c;
  --bg-light: #f8f9fa;
  --border-color: #dadce0;
  --text-dark: #202124;
}

/* Prevent global horizontal scrolling on body/HTML */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #ffffff;
  color: var(--text-dark);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Section */
header {
  max-width: 1000px;
  margin: 0 auto 20px auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: auto;
  height: 80px;
  object-fit: contain;
}

.sub-heading {
  text-align: center;
  font-size: 1.5rem;
  color: #7b6a43;
  text-decoration: underline;
  margin-bottom: 30px;
  font-weight: 600;
}

/* Main Container Grid */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  flex: 1;
  margin-bottom: 2rem; /* Ensures clearance above/around the footer */
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    padding: 0 12px; /* Slightly reduced padding for tighter mobile viewports */
  }
}

/* Carousel Section */
.carousel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

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

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 10;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
}

.dot.active {
  background-color: var(--heading-maroon);
}

/* Form Container */
.form-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .form-card {
    padding: 16px; /* Tighten form padding on small mobile screens */
  }
}

/* Stepper Header Fixes for Mobile */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  width: 100%;
  overflow: hidden; /* Prevents text overflow */
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #70757a;
  z-index: 2;
  background: white;
  padding: 0 4px;
  white-space: nowrap; /* Keep step text tidy */
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8eaed;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.step-item.active {
  color: var(--primary-blue);
}

.step-item.active .step-number {
  background: var(--primary-blue);
  color: white;
}

.stepper-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}

/* Input Groups */
.form-group {
  margin-bottom: 18px;
  position: relative;
  width: 100%;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #3c4043;
}

/* Custom Dropdown Styles */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-selected {
  width: 100%;
  height: 48px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background-color: #ffffff;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.dropdown-selected::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #5f6368;
  transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-selected::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown.open .dropdown-selected {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.dropdown-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.custom-dropdown.open .dropdown-options {
  display: block;
}

.dropdown-option {
  padding: 12px 14px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: background 0.15s ease;
}

.dropdown-option:hover,
.dropdown-option.selected {
  background-color: #e8f0fe;
  color: var(--primary-blue);
  font-weight: 600;
}

/* Input controls for Step 2 */
.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  background-color: #ffffff;
  color: var(--text-dark);
}

.form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Quantity Controls Overflow Fix */
.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0; /* Ensures buttons don't get squished */
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-color);
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #e8eaed;
}

/* Dynamic Size Rows Overflow Fixes */
#sizeRowsContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.dynamic-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.size-select-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 28px 0 10px; /* Right padding leaves room for default arrow */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: var(--text-dark);
  outline: none;
  
  /* Alignment and rendering fixes for native dropdown popups */
  position: relative;
  width: 100%;
  max-width: 100%;
  text-overflow: ellipsis; /* Truncates long text gracefully */
  white-space: nowrap;
}

/* Ensure the option items inside match container alignment */
.size-select-input option {
  font-size: 0.95rem;
  padding: 8px;
  background-color: #ffffff;
  color: var(--text-dark);
}

.size-select-input:focus {
  border-color: var(--primary-blue);
}

.btn-remove-row {
  width: 34px;
  height: 34px;
  border: none;
  background: #fce8e6;
  color: #d93025;
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0; /* Prevents close button from shrinking */
}

.btn-remove-row:hover {
  background: #f8d7da;
}

.btn-add-size {
  background: transparent;
  border: 1px dashed var(--primary-blue);
  color: var(--primary-blue);
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-add-size:hover {
  background-color: #e8f0fe;
}

/* Size Selector List */
.size-selector-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.size-selector-list::-webkit-scrollbar {
  width: 5px;
}

.size-selector-list::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 4px;
}

/* Total Price Box */
.price-box {
  background-color: #e8f0fe;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.price-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-blue);
}

/* Submit / Action Buttons */
.btn-submit {
  width: 100%;
  height: 48px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-submit:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: transparent;
  color: #5f6368;
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #5f6368;
  color: #ffffff;
  border-color: #5f6368;
}

.form-control.invalid {
  border-color: #d93025 !important;
  background-color: #fce8e6;
}

.error-msg {
  display: none;
  color: #d93025;
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
}

.error-msg.visible {
  display: block;
}

.hidden {
  display: none;
}

/* Footer Styles */
footer {
  background-color: #f7f4ef;
  width: 100%;
  margin-top: 50px;
}

.footer-top {
  /*border-top: 1px dashed #d1c7bd;*/
  border-bottom: 1px dashed #d1c7bd;
  padding: 30px 20px;
  text-align: center;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #111111;
  margin-bottom: 18px;
}

.footer-contacts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #222222;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.7;
}

.footer-bottom {
  padding: 30px 20px;
  text-align: center;
}

.footer-brand {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--heading-maroon);
  margin-bottom: 12px;
}

.footer-copyright {
  font-size: 0.85rem;
  color: #333333;
}
/* Custom Select Wrapper (Replaces native select look) */
.custom-select-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  height: 44px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

/* Arrow indicator */
.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #5f6368;
  transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Clean White Dropdown Menu (Strictly positioned inside card) */
.custom-select-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.custom-select-wrapper.open .custom-select-options {
  display: block;
}

.custom-option {
  padding: 10px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: background 0.15s ease;
}

.custom-option:hover,
.custom-option.selected {
  background-color: #e8f0fe;
  color: var(--primary-blue);
  font-weight: 600;
}
.custom-select-wrapper {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-sizing: border-box;
}

.custom-select-trigger .selected-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  color: #1f2937;
}

.custom-options-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.custom-select-wrapper.open .custom-options-menu {
  display: block;
}

.custom-option {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
}

.custom-option:hover,
.custom-option.selected {
  background-color: #eff6ff;
  color: #2563eb;
}
/* Canvas CAPTCHA Styling */
.captcha-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

#captchaCanvas {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
}

.error-msg {
  color: var(--primary-color);
  font-size: 0.8rem;
  display: none;
  margin-top: 0.2rem;
}
.footer {
  background-color: #fffaef;
  color: #ffffff;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
  font-size: 0.9rem;
  padding: 1.5rem 1rem 2.5rem 1rem;
  text-align: center;
}