* {
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}
:root {
  /* Polaris-inspired Colors */
  --polaris-color-primary: #005bd3; /* Polaris primary blue */
  --polaris-color-primary-hover: #004aa8; /* Darker blue for hover */
  --polaris-color-secondary: #6d7175; /* Polaris secondary text/border */
  --polaris-color-success: #008060; /* Polaris success green */
  --polaris-color-info: #47c1bf; /* Polaris info teal */
  --polaris-color-warning: #ffc453; /* Polaris warning yellow */
  --polaris-color-danger: #d72c0d; /* Polaris critical red */
  --polaris-color-bg-page: #f6f6f7; /* Polaris page background */
  --polaris-color-bg-card: #ffffff; /* Polaris card background */
  --polaris-color-text-primary: #202223; /* Polaris primary text */
  --polaris-color-text-secondary: #6d7175; /* Polaris secondary text */
  --polaris-color-border: #dfe3e8; /* Polaris border color */
  --polaris-border-radius: 4px; /* Polaris border radius */
  --polaris-shadow-card: 0 0 0 1px rgba(63, 63, 68, 0.05),
    0 1px 3px 0 rgba(63, 63, 68, 0.15); /* Polaris card shadow */
  --polaris-shadow-button: 0 1px 0 0 rgba(0, 0, 0, 0.05); /* Subtle button shadow */
  --polaris-shadow-button-hover: 0 1px 0 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Slightly more shadow on hover */
  --polaris-shadow-button-active: inset 0 1px 1px 0 rgba(0, 0, 0, 0.15); /* Inset shadow for active */
  --polaris-shadow-focus-ring: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.3); /* Focus ring */
  --polaris-shadow-selected: 0 0 0 2px var(--bs-primary); /* Shadow outline for selected */
  --polaris-spacing-base: 1rem; /* 16px */
  --polaris-spacing-tight: 0.5rem; /* 8px */
  --polaris-spacing-extra-tight: 0.25rem; /* 4px */
  --polaris-font-size-base: 0.875rem; /* 14px */
  --polaris-line-height-base: 1.3; /* Polaris uses 1.3 or 1.4 */
  --polaris-font-weight-regular: 400;
  --polaris-font-weight-medium: 500;
  --polaris-font-weight-semibold: 600;
  --polaris-font-weight-bold: 700;
  --polaris-heading-font-weight: var(--polaris-font-weight-semibold);
  --polaris-color-text-critical: #a01d00; /* Darker red for critical text/icons */
  /* Map Polaris to existing Bootstrap variables (where applicable) */
  --bs-primary: var(--polaris-color-primary);
  --bs-secondary: var(--polaris-color-secondary);
  --bs-success: var(--polaris-color-success);
  --bs-info: var(--polaris-color-info);
  --bs-warning: var(--polaris-color-warning);
  --bs-danger: var(--polaris-color-danger);
  --bs-light: var(--polaris-color-bg-page); /* Use page bg for light */
  --bs-dark: var(--polaris-color-text-primary);
  --bs-primary-rgb: 0, 91, 211; /* RGB for primary blue */
  --bs-secondary-color: var(--polaris-color-text-secondary);
  --bs-body-color: var(--polaris-color-text-primary);
  --bs-body-bg: var(--polaris-color-bg-page);
  --bs-card-border-radius: var(--polaris-border-radius);
  --bs-card-shadow: var(--polaris-shadow-card);
  --bs-card-header-bg: var(--polaris-color-bg-card);
  --bs-card-footer-bg: var(
    --polaris-color-bg-page
  ); /* Footer bg same as page */
  --bs-btn-border-radius: var(--polaris-border-radius-button);
  --bs-thumbnail-border-radius: var(--polaris-border-radius);
  --bs-border-color: transparent; /* Effectively remove borders by making them transparent */
}
html,
body {
  height: 100%;
  overflow-x: hidden;
}
html {
  font-size: 100%; /* Ensure base font size isn't affected by user agent */
}
body {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, San Francisco,
    "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding-top: 0;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  font-size: var(--polaris-font-size-base);
  line-height: var(--polaris-line-height-base);
  font-weight: var(--polaris-font-weight-regular);
}
.container-fluid {
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-content {
  flex-grow: 1;
  overflow: hidden;
  display: flex;
}
.preview-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  background-color: var(--bs-body-bg);
}
.options-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 0 0;
  background-color: var(--bs-card-header-bg);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.08);
}
.options-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: none;
  border-radius: var(--bs-card-border-radius);
  overflow: hidden;
  background-color: transparent;
}
.options-card .card-body {
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
}
.card {
  border: none !important; /* Remove border */
  border-radius: var(--bs-card-border-radius);
  box-shadow: var(--bs-card-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  background-color: var(--bs-card-header-bg);
}
.card:hover {
  box-shadow: 0 0 0 1px rgba(63, 63, 68, 0.05),
    0 3px 5px 0 rgba(63, 63, 68, 0.15);
}
.card-header {
  border-bottom: none !important; /* Remove subtle line */
  background-color: var(--bs-card-header-bg);
  padding: var(--polaris-spacing-base) var(--polaris-spacing-base);
  flex-shrink: 0;
}
.card-header h5 {
  font-weight: var(--polaris-heading-font-weight);
  font-size: 1rem; /* 16px */
  line-height: 1.25;
  margin-bottom: var(--polaris-spacing-tight);
  color: var(--bs-dark);
}
.card-body {
  border: none !important;
  padding: var(--polaris-spacing-base);
  overflow-y: auto;
  flex-grow: 1;
  background-color: var(--bs-card-header-bg);
}
.card-footer {
  border-top: none !important; /* Remove subtle line */
  background-color: var(--bs-card-footer-bg);
  padding: var(--polaris-spacing-tight) var(--polaris-spacing-base);
  flex-shrink: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.options-card > .card-footer > .btn {
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  line-height: 1;
  min-width: auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.options-card > .card-footer > .btn > i {
  margin: 0 !important;
}
#reset-btn {
  width: auto;
  height: auto;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  color: #5c5f62; /* More subtle gray */
  font-weight: var(--polaris-font-weight-medium);
  border: none !important;
  background: transparent;
  box-shadow: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
#reset-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #202223; /* Darker on hover */
  opacity: 1;
}
#reset-btn:active {
  background-color: rgba(0, 0, 0, 0.1);
}
#step-subtitle {
  font-size: 0.875rem; /* Match base font size */
  color: var(--polaris-color-text-secondary);
  margin-bottom: var(
    --polaris-spacing-base
  ) !important; /* Increase bottom margin */
}
#watch-preview-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: auto;
  perspective: 1000px;
  overflow: hidden;
  border: none !important; /* Remove border */
  border-radius: var(--bs-card-border-radius);
  background: var(--bs-card-header-bg);
  box-shadow: var(--bs-card-shadow);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
#watch-preview {
  position: relative;
  width: 88%;
  height: 88%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  cursor: grab;
  display: flex;
  justify-content: center;
  align-items: center;
}
#watch-preview:active {
  cursor: grabbing;
}
.watch-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backface-visibility: hidden;
}
/* Establish proper stacking order with z-index */
#caseStrap-layer {
  z-index: 10; /* Case and strap should be behind everything */
}
#clockBody-layer {
  z-index: 20; /* Clock body on top of case/strap */
  width: 486px;
}
#bezel-layer {
  z-index: 30; /* Bezel should be on top of everything */
}
/* mobile */
@media (max-width: 991.98px) {
  #clockBody-layer {
    width: 70%;
  }
}

/* Silicon material bezel adjustment */
.watch-layer.bezel-silicon {
  transform: scale(1.2);
  transform-origin: center center;
}

/* Silicon material clock body adjustment */
.watch-layer.clockbody-silicon {
  transform: scale(1.15);
  z-index: 2;
  width: 490px;
}

/* Mobile L (992px and below) */
@media (max-width: 991.98px) {
  .watch-layer.clockbody-silicon {
    transform: scale(1.25);
    z-index: 2;
    width: 500px;
  }
  .watch-layer.bezel-silicon {
    transform: scale(1.25);
  }
  .watch-layer.clockbody-steel {
    transform: scale(1.35);
    z-index: 2;
    width: 520px;
  }
}

/* Mobile M (768px and below) */
@media (max-width: 767.98px) {
  .watch-layer.clockbody-silicon {
    transform: scale(1.3);
    z-index: 2;
    width: 510px;
  }
  .watch-layer.bezel-silicon {
    transform: scale(1.3);
  }
  .watch-layer.clockbody-steel {
    transform: scale(1.4);
    z-index: 2;
    width: 530px;
  }
}

/* Mobile S (576px and below) */
@media (max-width: 575.98px) {
  .watch-layer.clockbody-silicon {
    transform: scale(1.35);
    z-index: 2;
    width: 520px;
  }
  .watch-layer.bezel-silicon {
    transform: scale(1.35);
  }
  .watch-layer.clockbody-steel {
    transform: scale(1.45);
    z-index: 2;
    width: 540px;
  }
}

/* Specific dimensions for consistent appearance */
@media (max-width: 425px) {
  .preview-column {
    min-height: 35vh;
    padding-top: 60px;
    padding-bottom: 15px;
  }

  #watch-preview-container {
    max-width: 85%;
    padding: 0.75rem;
  }

  .watch-layer.clockbody-steel {
    transform: scale(1.4);
    width: 520px;
  }
}

@media (max-width: 375px) {
  .preview-column {
    min-height: 32vh;
    padding-top: 55px;
    padding-bottom: 12px;
  }

  #watch-preview-container {
    max-width: 82%;
    padding: 0.625rem;
  }

  .watch-layer.clockbody-steel {
    transform: scale(1.35);
    width: 500px;
  }
}

@media (max-width: 320px) {
  .preview-column {
    min-height: 30vh;
    padding-top: 50px;
    padding-bottom: 10px;
  }

  #watch-preview-container {
    max-width: 80%;
    padding: 0.5rem;
  }

  .watch-layer.clockbody-steel {
    transform: scale(1.3);
    width: 480px;
  }
}

#alternate-views-container {
  background-color: var(--bs-card-footer-bg);
  padding: 0.75rem 0.5rem 0.5rem 0.5rem;
  margin-top: auto;
  flex-shrink: 0;
  border-top: none; /* Remove subtle line */
}
@media (max-width: 767.98px) {
  .watch-layer.clockbody-silicon {
    transform: scale(1.5);
    z-index: 2;
    width: 500px;
  }
}
#alternate-views {
  justify-content: flex-start !important;
}
.alternate-view-thumb {
  max-width: 50px;
  max-height: 50px;
  border-radius: var(--polaris-border-radius);
  border: none !important; /* Remove border */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  box-shadow: var(--polaris-shadow-button); /* Subtle shadow */
}
.alternate-view-thumb:hover {
  transform: scale(1.05);
  box-shadow: var(--polaris-shadow-button-hover);
}
.alternate-view-thumb.active {
  box-shadow: var(--polaris-shadow-selected); /* Use shadow outline */
  transform: scale(1.05);
}
#step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 0;
  list-style: none;
  gap: 15px;
}
.step {
  width: 24px; /* Slightly smaller */
  height: 24px;
  border-radius: var(--polaris-border-radius); /* Keep square-ish */
  background-color: #e9ecef;
  border: none !important; /* Remove border */
  box-shadow: var(--polaris-shadow-button); /* Subtle shadow */
  color: var(--polaris-color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem; /* 12px */
  font-weight: var(--polaris-font-weight-medium);
  transition: all 0.3s ease;
  position: relative;
}
.step.completed {
  background-color: var(--bs-success);
  border-color: var(--bs-success) !important;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 128, 96, 0.2); /* Success shadow */
}
.step.completed::after {
  /* content: "\2713"; */
  position: absolute;
  font-size: 0.9rem;
  font-weight: bold;
}
.step.active {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary) !important;
  color: white;
  transform: scale(1.05); /* Slightly reduce scale */
  box-shadow: 0 1px 3px rgba(var(--bs-primary-rgb), 0.3); /* Slightly smaller shadow */
}
#thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  width: 100%;
}
@media (min-width: 576px) {
  #thumbnail-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
@media (min-width: 768px) {
  #thumbnail-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}
@media (min-width: 992px) {
  #thumbnail-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  .thumbnail-image-wrapper img {
    max-height: 120px;
  }
  .thumbnail-text {
    font-size: 0.8rem;
  }
}
.thumbnail-card {
  cursor: pointer;
  border: none !important; /* Remove border */
  transition: all 0.2s ease-in-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bs-card-header-bg);
  box-shadow: var(--polaris-shadow-button); /* Subtle shadow */
  border-radius: var(--bs-thumbnail-border-radius);
}
.thumbnail-card:hover {
  box-shadow: var(--polaris-shadow-button-hover); /* Use hover shadow */
}
.thumbnail-card.selected {
  box-shadow: var(--polaris-shadow-selected); /* Use shadow outline */
}
.thumbnail-image-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--polaris-spacing-tight);
  background-color: var(--bs-body-bg);
}
.thumbnail-image-wrapper img {
  max-width: 100%;
  max-height: 100px;
  height: auto;
  border: none !important;
  object-fit: contain;
}
.thumbnail-text {
  font-size: 0.8125rem; /* 13px */
  font-weight: var(--polaris-font-weight-regular);
  text-align: center;
  padding: var(--polaris-spacing-tight) var(--polaris-spacing-extra-tight);
  background-color: var(--bs-card-header-bg);
  flex-shrink: 0;
  line-height: 1.3;
  border-top: none; /* Remove subtle line */
}
.card-body::-webkit-scrollbar {
  width: 6px;
}
.card-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 5px 0;
}
.card-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.card-body::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}
.lazy-placeholder,
.skeleton-loader {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.8s infinite linear;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.fade-in {
  animation: fadeIn 0.3s ease-in;
}
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.loading-overlay .spinner-border {
  width: 3rem;
  height: 3rem;
  box-shadow: 0 0 15px rgba(var(--bs-primary-rgb), 0.4);
  animation: spinner-border 0.75s linear infinite,
    pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.5),
      0 0 15px rgba(var(--bs-primary-rgb), 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(var(--bs-primary-rgb), 0),
      0 0 15px rgba(var(--bs-primary-rgb), 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0),
      0 0 15px rgba(var(--bs-primary-rgb), 0.4);
  }
}
/* Button styles - black and white Polaris inspired */
/* Base button styles */
.btn {
  font-weight: var(--polaris-font-weight-medium);
  padding: 0.4375rem 0.875rem;
  line-height: 1.4;
  box-shadow: var(--polaris-shadow-button);
  background-color: #ffffff;
  /* color: #202223; Polaris text color */
  border: 1px solid #babfc4 !important; /* Light gray border */
  transition: all 0.2s ease;
}
.btn:hover {
  background-color: #f9fafb; /* Light hover state */
  border-color: #999ea4 !important;
  box-shadow: var(--polaris-shadow-button-hover);
  color: #202223; /* Darker text color on hover */
}
.btn:active {
  background-color: #f1f2f3;
  box-shadow: var(--polaris-shadow-button-active);
  border-color: #999ea4 !important;
}
/* Primary button - black */
.btn-primary {
  background-color: #202223; /* Black */
  border-color: #202223 !important;
  color: white;
  box-shadow: var(--polaris-shadow-button);
}
.btn-primary:hover {
  background-color: #2c2c2e; /* Slightly lighter black */
  border-color: #2c2c2e !important;
  color: white;
  box-shadow: var(--polaris-shadow-button-hover);
}
.btn-primary:active {
  background-color: #0e0e0f; /* Darker black */
  border-color: #0e0e0f !important;
  box-shadow: var(--polaris-shadow-button-active);
}
.btn-primary:disabled {
  background-color: rgba(32, 34, 35, 0.3); /* Faded black */
  border-color: transparent !important;
  color: rgba(255, 255, 255, 0.6);
}
/* Secondary button - outlined */
.btn-outline-secondary {
  background-color: transparent;
  border-color: #babfc4 !important;
  color: #202223;
  box-shadow: var(--polaris-shadow-button);
}
.btn-outline-secondary:hover {
  background-color: #f9fafb;
  border-color: #999ea4 !important;
  box-shadow: var(--polaris-shadow-button-hover);
  color: #202223; /* Darker text color on hover */
}
.btn-outline-secondary:active {
  background-color: #f1f2f3;
  border-color: #ffffff !important;
  box-shadow: var(--polaris-shadow-button-active);
}
/* Success button - black with success tint */
.btn-success {
  background-color: #202223;
  border-color: #202223 !important;
  color: white;
  box-shadow: var(--polaris-shadow-button);
}
.btn-success:hover {
  background-color: #2c2c2e;
  border-color: #2c2c2e !important;
  box-shadow: var(--polaris-shadow-button-hover);
}
.btn-success:active {
  background-color: #0e0e0f;
  border-color: #0e0e0f !important;
  box-shadow: var(--polaris-shadow-button-active);
}
/* Info button - light gray */
.btn-info {
  background-color: #f1f2f3;
  border-color: #babfc4 !important;
  color: #202223;
  box-shadow: var(--polaris-shadow-button);
}
.btn-info:hover {
  background-color: #e4e5e7;
  border-color: #999ea4 !important;
  box-shadow: var(--polaris-shadow-button-hover);
}
.btn-info:active {
  background-color: #dcdee0;
  border-color: #999ea4 !important;
  box-shadow: var(--polaris-shadow-button-active);
}
/* View Toggle Button */
.view-toggle-container {
  display: none; /* Hidden by default, shown only on mobile */
}
@media (max-width: 991.98px) {
  .view-toggle-container {
    display: block;
  }
  #view-toggle-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    color: #202223;
  }
  #view-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
  .options-column {
    transform: translateY(0); /* Ensure the panel is fully open */
  }
}
/* Stack Card View Styles */
#card-view-container {
  height: 100%;
  overflow: hidden;
  position: relative;
}
.cards-stack {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}
.stack-card {
  position: absolute;
  width: 90%;
  max-width: 300px;
  height: 380px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.stack-card.active {
  display: block;
  z-index: 10;
}
.stack-card-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.stack-card-image {
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bs-body-bg);
}
.stack-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.stack-card-content {
  height: 30%;
  padding: 15px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stack-card-content h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #202223;
}
.stack-card-content p {
  margin: 5px 0 0 0;
  font-size: 0.8rem;
  color: #6d7175;
  display: inline-block;
}
.material-tag,
.color-tag,
.series-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  margin-top: 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
}
.material-tag {
  background-color: #eff5f9;
  color: #1f70c2;
}
.color-tag {
  background-color: #f3f2f9;
  color: #6042bd;
}
.series-tag {
  background-color: #f5faef;
  color: #417505;
}
.stack-card.selected {
  box-shadow: 0 0 0 2px #202223;
}
/* Swipe indicators */
.stack-card::before,
.stack-card::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: bold;
  padding: 10px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.stack-card::before {
  content: "×";
  left: 20px;
  background-color: rgba(255, 50, 50, 0.8);
  color: white;
}
.stack-card::after {
  content: "✓";
  right: 20px;
  background-color: rgba(0, 200, 100, 0.8);
  color: white;
}
.stack-card.swipe-left::before {
  opacity: 0.8;
}
.stack-card.swipe-right::after {
  opacity: 0.8;
}
.stack-card.swiped-left {
  animation: swipeLeft 0.3s ease forwards;
}
.stack-card.swiped-right {
  animation: swipeRight 0.3s ease forwards;
}
@keyframes swipeLeft {
  to {
    transform: translateX(-150%) rotate(-20deg);
    opacity: 0;
  }
}
@keyframes swipeRight {
  to {
    transform: translateX(150%) rotate(20deg);
    opacity: 0;
  }
}
/* Media queries for the stack card */
@media (max-width: 767.98px) {
  .stack-card {
    height: 320px;
  }
}
@media (max-width: 575.98px) {
  .stack-card {
    height: 300px;
    width: 95%;
  }
  .stack-card-content h4 {
    font-size: 0.9rem;
  }
  .stack-card-content p {
    font-size: 0.75rem;
  }
  .material-tag,
  .color-tag,
  .series-tag {
    padding: 1px 6px;
    font-size: 0.65rem;
  }
}
/* Special case for very short screens */
@media (max-height: 600px) {
  .stack-card {
    height: 250px;
  }
  .stack-card-image {
    height: 65%;
  }
  .stack-card-content {
    height: 35%;
    padding: 10px;
  }
}
/* Mobile button adjustments */
@media (max-width: 991.98px) {
  .main-content {
    flex-direction: column;
    height: 100%;
    position: relative;
  }
  #alternate-views-container {
    display: none !important;
  }
  .preview-column {
    order: 1;
    width: 100%;
    height: auto;
    padding-top: 85px;
    padding-bottom: 40px;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f6f7;
    transition: transform 0.3s ease, padding-bottom 0.3s ease;
  }

  body.options-sheet-open .preview-column {
    padding-bottom: 35px;
    transform: scale(0.95);
  }

  #watch-preview-container {
    max-width: 85%;
    max-height: 70vh;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, max-width 0.3s ease;
  }

  body.options-sheet-open #watch-preview-container {
    transform: scale(0.95);
    max-width: 80%;
  }

  .options-column {
    order: 2;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 80vh;
    transform: translateY(calc(100% - 60px));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      box-shadow 0.4s ease;
    z-index: 1000;
    background-color: var(--bs-card-bg);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
    padding: 0;
  }

  body.options-sheet-open .options-column {
    transform: translateY(0);
  }

  .options-column.expanded {
    max-height: 90vh;
  }

  .options-card {
    height: 100%;
    max-height: inherit;
    box-shadow: none;
    border-radius: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    display: flex;
    flex-direction: column;
  }

  .options-card .card-header {
    position: relative;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
  }

  .mobile-step-details {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 1.25rem;
  }

  .mobile-step-details #mobile-step-name {
    font-size: 1.5rem;
    font-weight: var(--polaris-font-weight-semibold);
    color: #000000;
    margin-bottom: 0.5rem;
  }

  .mobile-step-details #mobile-selected-option-name {
    font-size: 1.25rem;
    color: var(--bs-primary);
    font-weight: var(--polaris-font-weight-medium);
  }

  #thumbnail-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 1.75rem 1.25rem;
    gap: 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  #thumbnail-grid::-webkit-scrollbar {
    display: none;
  }

  #thumbnail-grid .thumbnail-card {
    flex: 0 0 auto;
    width: 140px;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    scroll-snap-align: center;
  }

  #thumbnail-grid .thumbnail-card:active,
  #thumbnail-grid .thumbnail-card.selected {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.18);
  }

  .thumbnail-image-wrapper {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background-color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  .thumbnail-image-wrapper img {
    max-height: 110px;
    object-fit: contain;
    transition: transform 0.3s ease;
  }

  .thumbnail-text {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: var(--polaris-font-weight-medium);
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }

  .options-card .card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--bs-card-bg);
    justify-content: space-between;
  }

  .options-card .card-footer .btn {
    font-size: 1rem;
    padding: 0.625rem 1.25rem;
    min-width: 50px;
    border-radius: 25px;
    font-weight: var(--polaris-font-weight-medium);
    height: 48px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .options-card .card-footer .btn:active {
    transform: scale(0.98);
  }
}

@media (max-width: 767.98px) {
  .preview-column {
    min-height: 45vh;
    padding-top: 75px;
  }

  #watch-preview-container {
    max-width: 90%;
    padding: 1.25rem;
  }

  .options-column {
    max-height: 75vh;
  }

  .thumbnail-image-wrapper {
    height: 100px;
  }

  .thumbnail-image-wrapper img {
    max-height: 90px;
  }
}

@media (max-width: 575.98px) {
  .preview-column {
    min-height: 40vh;
    padding-top: 65px;
    padding-bottom: 20px;
  }

  #watch-preview-container {
    max-width: 95%;
    padding: 1rem;
  }

  .options-column {
    max-height: 70vh;
    transform: translateY(calc(100% - 40px));
  }

  .mobile-step-details {
    margin-bottom: 1rem;
    padding-top: 0.75rem;
  }

  .mobile-step-details #mobile-step-name {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }

  .mobile-step-details #mobile-selected-option-name {
    font-size: 1rem;
  }

  #thumbnail-grid {
    padding: 1rem 0.75rem;
    gap: 1rem;
  }

  #thumbnail-grid .thumbnail-card {
    width: 120px;
  }

  .thumbnail-image-wrapper {
    height: 90px;
  }

  .thumbnail-image-wrapper img {
    max-height: 80px;
  }

  .thumbnail-text {
    font-size: 0.8rem;
    padding: 0.5rem 0.375rem;
  }

  .options-card .card-footer {
    padding: 0.75rem 1rem;
  }

  .options-card .card-footer .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    height: 40px;
  }
}

/* Mobile Header Styles */
.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background-color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  height: 70px;
}

.mobile-header .product-info {
  line-height: 1.2;
}

.mobile-header .product-title {
  font-size: 1.25rem;
  font-weight: var(--polaris-font-weight-semibold);
  margin-bottom: 0.125rem;
  color: #000000;
}

.mobile-header .product-price {
  font-size: 1rem;
  font-weight: var(--polaris-font-weight-medium);
  color: #000000;
  margin-bottom: 0;
}

.mobile-header #mobile-add-to-cart-btn {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  font-weight: var(--polaris-font-weight-medium);
  border-radius: 25px;
  box-shadow: var(--polaris-shadow-button);
  min-width: 120px;
  background-color: #000000;
  border-color: #000000;
}

/* Remove color option styles */

/* Mobile sheet handle - make it bigger and more prominent */
.mobile-sheet-handle {
  width: 60px;
  height: 6px;
  background-color: #e0e0e0;
  border-radius: 3px;
  margin: 15px auto 10px; /* More space top and bottom */
  display: block;
}

/* Color options with more space */
.color-options {
  margin: 1.5rem auto 2rem; /* More margin especially on bottom */
  padding: 1rem 1.5rem; /* More internal padding */
}

/* Step indicator with more space */
#step-indicator {
  margin-bottom: 1.5rem; /* More space below indicators */
  gap: 15px; /* More space between indicators */
}

/* Subtitle info with more space */
.subtitle-info {
  margin-top: 0.75rem; /* More space above */
  margin-bottom: 1rem; /* More space below */
  font-size: 1rem; /* Bigger text */
}

/* Make the reset button more subtle but still accessible */
#reset-btn {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#reset-btn:hover {
  opacity: 1;
}

@media (max-width: 576px) {
  .mobile-header {
    padding: 0.675rem 0.875rem;
    height: 55px;
  }

  .mobile-header .product-title {
    font-size: 0.95rem;
  }

  .mobile-header .product-price {
    font-size: 0.85rem;
  }

  .mobile-header #mobile-add-to-cart-btn {
    min-width: 90px;
    font-size: 0.75rem;
    padding: 0.325rem 0.625rem;
  }

  .preview-column {
    padding-top: 65px;
    padding-bottom: 25px;
    min-height: 38vh;
  }

  #watch-preview-container {
    max-width: 80%;
    max-height: 65vh;
    padding: 0.75rem;
  }

  .mobile-sheet-handle {
    width: 40px;
    height: 4px;
    margin: 8px auto 6px;
  }

  .mobile-step-details {
    margin-bottom: 0.5rem;
    padding-top: 0.375rem;
  }

  .mobile-step-details #mobile-step-name {
    font-size: 1.15rem;
    margin-bottom: 0.175rem;
  }

  .mobile-step-details #mobile-selected-option-name {
    font-size: 0.9rem;
  }

  #step-subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.375rem;
  }

  #step-indicator {
    margin-bottom: 0.5rem;
    gap: 6px;
  }

  .step {
    width: 14px;
    height: 14px;
    font-size: 0.55rem;
    background-color: #e0e0e0;
    color: #666;
  }

  .step.active {
    background-color: #000000;
    border-color: #000000;
  }

  .step.completed {
    background-color: #007a5e;
    border-color: #007a5e;
  }

  #thumbnail-grid {
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
  }

  #thumbnail-grid .thumbnail-card {
    width: 90px;
  }

  .thumbnail-image-wrapper {
    height: 80px;
  }

  .thumbnail-image-wrapper img {
    max-height: 65px;
  }

  .thumbnail-text {
    font-size: 0.7rem;
    padding: 0.375rem 0.25rem;
  }

  .options-card .card-footer {
    padding: 0.5rem 0.75rem;
  }

  .options-card .card-footer .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    height: 36px;
  }

  #prev-step-btn,
  #next-step-btn,
  #summary-btn {
    min-width: 80px;
  }

  #mobile-step-indicator {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  /* Make the reset button smaller */
  #reset-btn {
    top: 0;
    right: 0.5rem;
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
}

@media (max-width: 991.98px) {
  .preview-column {
    background-color: #f6f6f7;
  }

  #watch-preview-container {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .options-card .card-header {
    position: relative;
  }

  .subtitle-info {
    color: #6d7175;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 400;
  }

  /* Change navigation button colors */
  #prev-step-btn {
    background-color: transparent;
    color: #000000;
    border-color: #e5e5e5;
  }

  #next-step-btn,
  #summary-btn {
    background-color: #000000;
    border-color: #000000;
  }

  /* For the summary "done" button */
  #summary-btn,
  .btn-done {
    background-color: rgba(0, 0, 0, 0.6);
    border-color: transparent;
    color: white;
  }

  /* Enhanced thumbnail card styles */
  #thumbnail-grid .thumbnail-card {
    border: none;
    overflow: hidden;
  }

  /* Better spacing for the options title */
  .mobile-step-details {
    margin-bottom: 1rem;
  }
}
