/* ===================================================================
   MudraLanka - Dynamic Product Configurator CSS
   Sleek, Tactile, Modern UI with Live Price Calculation & Artwork Upload
   Fully Responsive for Phones, Tablets, and Desktops
   =================================================================== */

.configurator-page {
  padding: 1.25rem 0 5rem;
  background: #f8fafc;
}

@media (max-width: 768px) {
  .configurator-page {
    padding: 0.75rem 0 5rem;
  }
}

.top-gallery-mount-mobile {
  display: block;
  margin-bottom: 1.25rem;
}

.top-gallery-mount-mobile:empty {
  display: none !important;
}

.sidebar-gallery-mount-desktop:empty {
  display: none !important;
}

@media (min-width: 1024px) {
  .top-gallery-mount-mobile {
    display: none !important;
  }
}

.top-gallery-mount-mobile .product-gallery-carousel {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  padding: 1rem;
  margin-bottom: 0;
}

.configurator-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .configurator-layout {
    grid-template-columns: 1.3fr 0.9fr;
  }
}

/* Left Column: Interactive Configuration Steps */
.config-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

/* Single Unified Box containing all steps (Neat & Clean Cohesive Box) */
.unified-config-box {
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  padding: 1.5rem 1.5rem !important;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .config-card {
    padding: 1.25rem;
  }
  .unified-config-box {
    padding: 1.25rem 1.15rem !important;
    border-radius: 16px !important;
  }
}

/* Step section row inside the unified single box - No divider lines, clean spacing matching design */
.config-step-section {
  padding-bottom: 0 !important;
  margin-bottom: 1.25rem !important;
  border-bottom: none !important;
}

.config-step-section:last-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

.config-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem !important;
}

.step-badge {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.config-step-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.config-step-header p {
  display: none !important;
}

/* Dynamic Configurator Product Header & Breadcrumb */
.configurator-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.configurator-breadcrumb-bar a {
  color: var(--color-primary, #0f172a);
  text-decoration: none;
  transition: color 0.2s;
}
.configurator-breadcrumb-bar a:hover {
  color: var(--color-accent, #ea580c);
  text-decoration: underline;
}
.configurator-breadcrumb-bar .crumb-sep {
  color: #94a3b8;
  font-size: 0.75rem;
}
.configurator-breadcrumb-bar .crumb-current {
  color: var(--color-accent, #ea580c);
  font-weight: 700;
}

/* Product Switcher Bar */
.product-type-switcher {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.switcher-tab {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  box-sizing: border-box;
  min-width: 0;
}

.switcher-tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Grid of Selectable Option Cards (2-in-a-row on mobile, auto-fill on desktop) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .options-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.85rem;
  }
  .options-grid.large-cards {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

.option-box {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.5rem;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.option-box:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.option-box.selected {
  border-color: var(--color-accent);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.option-box.selected::after {
  content: '✓';
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--color-accent);
}

.option-box .opt-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.option-box .opt-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.25;
  text-align: center;
}

.option-badge-pop {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  background: #f59e0b;
  color: white;
  border-radius: var(--radius-full);
  margin-bottom: 0.35rem;
}

/* ===================================================================
   Ultra-Clean Custom Dropdowns (Shape & Dimensions)
   - Guaranteed 100% visible across all browsers
   - Never changes value on mouse wheel scroll
   - Rich options with icons, badges, descriptions, and checkmarks
   =================================================================== */
.custom-dropdown-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 0 !important;
  user-select: none;
}

#cardYieldExplanationText {
  display: none !important;
}

.custom-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-align: left;
  outline: none;
  box-sizing: border-box;
  min-height: 50px;
}

.custom-dropdown-btn:hover {
  border-color: #94a3b8;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.custom-dropdown-wrapper.open .custom-dropdown-btn {
  border-color: var(--color-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dropdown-selected-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.dropdown-selected-content .dropdown-icon {
  display: none !important;
}

.dropdown-selected-content .dropdown-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.dropdown-chevron-box {
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.custom-dropdown-wrapper.open .dropdown-chevron-box {
  transform: rotate(180deg);
  color: var(--color-accent, #2563eb);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  padding: 0.4rem;
  max-height: 310px;
  overflow-y: auto;
  display: none;
  animation: dropdownFadeIn 0.15s ease-out;
  scroll-behavior: smooth;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.sheet-pill,
.sheet-header {
  display: none;
}

.sheet-scroll-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  scroll-behavior: smooth;
}

.custom-dropdown-btn:focus-visible {
  border-color: var(--color-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.custom-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #0f172a;
  min-height: 48px;
  box-sizing: border-box;
}

.custom-dropdown-item:hover {
  background-color: #f1f5f9;
}

.custom-dropdown-item.selected {
  background-color: #eff6ff;
  color: #1d4ed8;
}

.custom-dropdown-item .item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.custom-dropdown-item .item-icon {
  display: none !important;
}

.custom-dropdown-item .item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-dropdown-item .item-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.custom-dropdown-item .item-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
}

.custom-dropdown-item .item-badge.rate-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}

.custom-dropdown-item.selected .item-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.custom-dropdown-item.selected .item-badge.rate-badge {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.custom-dropdown-item .item-check {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2563eb;
}

/* ===================================================================
   Mobile Bottom-Sheet Popup Mode (Screens <= 768px)
   =================================================================== */
.custom-dropdown-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 999990;
  animation: fadeInBackdrop 0.2s ease-out;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

body.dropdown-sheet-open .custom-dropdown-backdrop {
  display: block;
}

body.dropdown-sheet-open {
  overflow: hidden !important;
}

@media (max-width: 768px) {
  .custom-dropdown-wrapper.open .custom-dropdown-menu {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 75vh !important;
    border-radius: 20px 20px 0 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3) !important;
    z-index: 999999 !important;
    padding: 0.75rem 1rem 2rem !important;
    animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    overflow-y: hidden !important;
  }

  .sheet-pill {
    display: block;
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 3px;
    margin: 0.25rem auto 0.75rem;
  }

  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
  }

  .sheet-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
  }

  .sheet-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s;
  }

  .sheet-close-btn:active {
    background: #e2e8f0;
  }

  .sheet-scroll-body {
    max-height: calc(75vh - 90px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.25rem;
  }

  .custom-dropdown-item {
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
    border-radius: 10px;
    min-height: 52px;
  }

  .custom-dropdown-item .item-title {
    font-size: 1.025rem;
  }
}

/* Fallback native select styling */
.config-dropdown-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 0.85rem;
}

.config-dropdown-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff !important;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem 2.8rem 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  line-height: 1.4;
  outline: none;
  box-sizing: border-box;
}

/* ===================================================================
   Clean Text Input for Numbers - No Wheel Change, No Spinners
   Only accepts user typed text/numbers
   =================================================================== */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.custom-qty-row input[type="number"] {
  width: 90px;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s;
  box-sizing: border-box;
}

.custom-qty-row input[type="number"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

/* Active Preview Pill Card */
.active-preview-card {
  display: none !important;
}

.active-preview-card .preview-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.active-preview-card .preview-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.active-preview-card .preview-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
}

.active-preview-card .preview-sub {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 1px;
}

.active-preview-card .preview-badge {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Custom Dimensions Inputs */
.custom-dimensions-box {
  background: #f8fafc;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 0.85rem;
  animation: fadeIn 0.25s ease-out;
}

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

.dimensions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dim-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.dim-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  background: white;
}

.dim-field input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Quantity Tiers Bar */
.qty-tiers-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.qty-card {
  min-width: 90px;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-card:hover {
  border-color: #93c5fd;
}

.qty-card.selected {
  border-color: var(--color-brand-emerald);
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.qty-card .qty-num {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.qty-card .qty-discount {
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
  margin-top: 0.2rem;
}

.custom-qty-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.custom-qty-row input {
  width: 140px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-weight: 700;
}

/* Artwork Upload Box */
.artwork-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all var(--transition-fast);
  position: relative;
}

.artwork-dropzone:hover,
.artwork-dropzone.dragover {
  border-color: var(--color-accent);
  background: #eff6ff;
}

.artwork-dropzone.artwork-required-pulse {
  border: 2px dashed #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25) !important;
  animation: artworkPulseGlow 1.2s infinite ease-in-out !important;
}

@keyframes artworkPulseGlow {
  0%, 100% {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35);
  }
  50% {
    border-color: #dc2626;
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.15);
  }
}

.dropzone-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: #eff6ff;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.dropzone-text h4 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.dropzone-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.artwork-preview-card {
  display: none;
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.artwork-preview-card.active {
  display: flex;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.artwork-thumb-wrap:hover img {
  transform: scale(1.05);
  border-color: var(--color-accent) !important;
}

.artwork-thumb-wrap img {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

@keyframes artworkModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Right Column: Sticky Live Price Card & Checkout */
.price-summary-sidebar {
  position: sticky;
  top: 6rem;
}

.price-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  overflow: hidden;
}

.price-card-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.price-card-header h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.price-card-header span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.config-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.spec-item .spec-label {
  color: var(--text-secondary);
}

.spec-item .spec-value {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

/* Price Breakdown */
.pricing-math-breakdown {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.math-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.math-row.discount-row {
  color: #059669;
  font-weight: 600;
}

.math-row.total-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-light);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.per-unit-hint {
  display: none !important;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: -0.25rem;
  margin-bottom: 0.75rem;
}

/* Dual Conversion CTAs */
.checkout-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-actions-group .btn {
  width: 100%;
}

.secure-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Modal for Customer Details & Checkout */
.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.checkout-modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ===================================================================
   Compact & Neat Dimension Options
   =================================================================== */
/* Quick Size Filter Pills */
.size-filter-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.size-filter-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.size-filter-tab.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25);
}

/* Size grid: 2-in-a-row on mobile, auto-fill on larger displays */
.sizes-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .sizes-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (min-width: 1024px) {
  .sizes-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

.compact-size-chip {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 48px;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.compact-size-chip:hover {
  border-color: #fdba74;
  background: #fffaf5;
  transform: translateY(-1px);
}

.compact-size-chip.selected {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.16);
}

.compact-size-chip .size-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.compact-size-chip.selected .size-val {
  color: #c2410c;
}

.compact-size-chip .size-desc {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}

.compact-size-chip.selected .size-desc {
  color: #9a3412;
}

.compact-size-chip.selected::after {
  content: '✓';
  position: absolute;
  top: 0.25rem;
  right: 0.4rem;
  font-size: 0.7rem;
  font-weight: 900;
  color: #ea580c;
}

/* In-place Delete button on dimension chip (for admin) */
.chip-delete-btn {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  line-height: 18px;
  text-align: center;
  border: 1.5px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 5;
}

body.admin-mode-active .compact-size-chip:hover .chip-delete-btn {
  display: block;
}

/* Add Dimension Chip button */
.add-dimension-chip {
  display: none;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  background: #f8fafc;
  color: #ea580c;
  font-size: 0.775rem;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

body.admin-mode-active .add-dimension-chip {
  display: flex;
}

.add-dimension-chip:hover {
  background: #ffedd5;
  border-color: #ea580c;
}

/* ===================================================================
   Swipeable Product Photo Carousel (User Request)
   Supports touch gestures, mouse drag, dots, arrows & thumbnail strip
   =================================================================== */
.product-gallery-carousel {
  margin-bottom: 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.carousel-track-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ffffff;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.carousel-track-wrapper:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 4px;
  box-sizing: border-box;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

/* Nav arrows */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #0f172a;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.carousel-nav-btn:hover {
  background: #ffffff;
  color: #ea580c;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev {
  left: 8px;
}

.carousel-nav-btn.next {
  right: 8px;
}

.carousel-counter-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 5;
}

.admin-carousel-edit-btn {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.725rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: all 0.15s ease;
}

body.admin-mode-active .admin-carousel-edit-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.admin-carousel-edit-btn:hover {
  background: #fff7ed;
  color: #ea580c;
  border-color: #ea580c;
}

/* In-Step Admin Button (Hidden by default; ONLY visible when admin is logged in) */
.in-step-admin-btn {
  display: none !important;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

body.admin-mode-active .in-step-admin-btn {
  display: inline-flex !important;
}

.in-step-admin-btn:hover {
  background: #fff7ed;
  color: #ea580c;
  border-color: #ea580c;
}

/* In-Dropdown Admin Trigger Option (Hidden by default for customers) */
.admin-only-item {
  display: none !important;
}

body.admin-mode-active .admin-only-item {
  display: flex !important;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0 0.25rem;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dot.active {
  background: #ea580c;
  width: 18px;
  border-radius: 4px;
}

/* Thumbnail Strip */
.carousel-thumbs {
  display: flex;
  gap: 6px;
  padding: 0.35rem 0.6rem 0.6rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.carousel-thumb-item {
  width: 46px;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.6;
  transition: all 0.15s ease;
}

.carousel-thumb-item.active {
  border-color: #ea580c;
  opacity: 1;
  box-shadow: 0 0 0 1px #ea580c;
}

.carousel-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}

/* Product Photos Manager Grid */
.photos-mgr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.photo-mgr-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
}

.photo-mgr-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.photo-mgr-actions {
  padding: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

/* ===================================================================
   Mobile Responsiveness & Floating Sticky Checkout Bar
   =================================================================== */

/* Floating Checkout Bar for Mobile Screens */
.mobile-sticky-checkout-bar {
  display: none;
}

@media (max-width: 1023px) {
  .configurator-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .config-options-column,
  .price-summary-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Fixed Mobile Sticky Bottom Bar */
  .mobile-sticky-checkout-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #e2e8f0;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    z-index: 990;
    box-sizing: border-box;
  }

  .mobile-bar-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }

  .mobile-bar-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-heading);
    line-height: 1.15;
  }

  .mobile-bar-meta {
    font-size: 0.72rem;
    color: #059669;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-bar-buttons {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .btn-mobile-checkout {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.15rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
    white-space: nowrap;
    transition: all 0.15s ease;
  }

  .btn-mobile-checkout:active {
    transform: scale(0.97);
  }

  .btn-mobile-wa {
    background: #22c55e;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .configurator-page {
    padding: 1rem 0 6.5rem !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .config-card {
    padding: 1.25rem 0.85rem !important;
    border-radius: 16px !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .config-step-header {
    gap: 0.65rem !important;
    margin-bottom: 1rem !important;
  }

  .config-step-header h2 {
    font-size: 1.15rem !important;
  }

  .config-step-header p {
    font-size: 0.78rem !important;
  }

  .step-badge {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.78rem !important;
    flex-shrink: 0 !important;
  }

  .product-type-switcher {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .switcher-tab {
    padding: 0.65rem 0.4rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Options Grid (Shapes & Materials): Clean 2-in-a-row */
  .options-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.55rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .options-grid.large-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .option-box {
    padding: 0.75rem 0.45rem !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .option-box .opt-title {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    text-align: center !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
  }

  .option-box .opt-sub {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
    margin-top: 0.2rem !important;
  }

  /* Quick Size Filter Pills: Horizontal scroll touch gestures */
  .size-quick-filters {
    display: flex !important;
    gap: 0.4rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0.2rem 0 0.5rem !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .size-quick-filters::-webkit-scrollbar {
    display: none !important;
  }

  .size-filter-tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.74rem !important;
  }

  /* Compact Size Chips: Symmetrical 2 in a row */
  .sizes-grid-compact {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.55rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .compact-size-chip {
    padding: 0.5rem 0.6rem !important;
    min-height: 50px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .compact-size-chip .size-val {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  .compact-size-chip .size-desc {
    font-size: 0.68rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* Custom Dimensions Box */
  .custom-dimensions-box {
    padding: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dimensions-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dim-field {
    min-width: 0 !important;
    width: 100% !important;
  }

  .dim-field label {
    font-size: 0.74rem !important;
  }

  .dim-field input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.55rem 0.65rem !important;
    font-size: 0.88rem !important;
  }

  /* Quantity Tiers & Custom Qty */
  .qty-tiers-scroll {
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.6rem !important;
  }

  .qty-card {
    min-width: 82px !important;
    padding: 0.75rem 0.4rem !important;
  }

  .qty-card .qty-num {
    font-size: 1.05rem !important;
  }

  .custom-qty-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.6rem !important;
    width: 100% !important;
  }

  .custom-qty-row input {
    width: 110px !important;
    padding: 0.55rem 0.75rem !important;
  }

  /* Artwork Dropzone */
  .artwork-dropzone {
    padding: 1.75rem 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dropzone-icon {
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1.5rem !important;
    margin-bottom: 0.65rem !important;
  }

  .dropzone-text h4 {
    font-size: 0.95rem !important;
  }

  .dropzone-text p {
    font-size: 0.75rem !important;
  }

  /* Artwork Preview Card */
  .artwork-preview-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .artwork-preview-card button {
    width: 100% !important;
  }

  /* Right Column Price Card */
  .price-summary-sidebar {
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .price-card {
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .price-card-header h3 {
    font-size: 1.15rem !important;
  }

  .pricing-math-breakdown {
    padding: 1rem !important;
  }

  .math-row {
    font-size: 0.82rem !important;
  }

  .math-row.total-row {
    font-size: 1.1rem !important;
  }

  .checkout-actions-group .btn {
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
  }
}

