:root {
  /* Colors */
  --highlight-color: #afd3e2;
  --light-color: #afd3e2;
  --mid-color: #19a7ce;
  --dark-color: #146c94;
  --error-color: #c0392b;
  --section-highlight-color: #f0f6fa;
  --disabled-bg: #666666;
  --disabled-text: #CCCCCC;
  --hover-light-blue: #f0f8ff;
  --purchased-bg-color: rgba(175, 211, 226, 0.2);
  --border-neutral: #ddd;
  --bg-neutral: #fafafa;
  --card-bg: #f9f9f9;
  --text-muted: #666;

  /* Typography */
  --font-family: 'Fira Sans', sans-serif;
  --base-font-size: 18px;
  --mobile-font-size: 14px;
  --line-height: 1.5;
  --heading-line-height: 1.1;
  --menu-font-size: 1.33rem;
  --large-font-size: 2.8rem;
  --h1-size: 1.5rem;
  --h1-title-size: 2.5rem;
  --h2-size: 2rem;

  /* Spacing and Layout */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 15px;
  --space-lg: 20px;
  --space-xl: 25px;
  --space-xxl: 30px;

  /* Header and Navigation */
  --header-height: 60px;
  --menu-item-height: 55px;

  /* Grid System */
  --grid-gap-large: 50px;
  --grid-gap-small: 10px;
  --grid-gap-medium: 15px;

  /* Component Sizing */
  --pot-size: 200px;
  --button-padding-x: 50px;
  --button-padding-y: 10px;
  --variation-min-width: 170px;
  --variation-max-width: 210px;
  --variation-thumbnail-size: 35px;

  /* Border Radii */
  --border-radius-sm: 5px;
  --border-radius-md: 6px;
  --border-radius-lg: 10px;
  --border-radius-xl: 5em;

  /* Layouts - Block Margins */
  --block-margin-normal: 15%;
  --block-margin-wide: 25%;
  --block-margin-narrow: 10%;
  --block-margin-mobile: 5%;

  /* Shop specific - left inset balancing sidebar */
  --block-margin-shop-left: 5%;

  /* Breakpoints */
  --mobile-breakpoint: 768px;
  --tablet-breakpoint: 1050px;

  /* Detail View Grid */
  --detail-col1-width: 55%;
  --detail-col2-width: 45%;
}

* {
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  --mid-color-transparent: rgba(25, 167, 206, 0.3);
}

/* Error message styling */
.error-box {
  background-color: #f8f8f8;
  padding: 15px;
  border-radius: 4px;
  border-left: 4px solid var(--dark-color);
  margin: 10px 0;
}

.error-title {
  color: var(--dark-color);
  font-weight: bold;
  margin-bottom: 8px;
}

.error-message {
  color: var(--mid-color);
}

.error-hint {
  color: #666;
  font-size: 0.9em;
  margin-top: 5px;
}

/* Notification styling */
.notification {
  padding: 12px 15px;
  border-radius: 4px;
  margin: 10px 0 15px;
  font-size: 0.95em;
}

.notification.warning {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
}

.notification p {
  margin: 0;
}

#file-type-error {
  color: var(--error-color);
  margin-top: var(--space-md);
}

body {
  margin: 0;
  background-color: white;
}

/* Site footer */
#site-footer {
  display: none;
  /* default hidden; JS toggles based on auth state */
  background: transparent;
  border-top: none;
}

#site-footer .footer-content {
  margin: 0 var(--block-margin-narrow);
  padding: var(--space-xs) 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#site-footer .footer-content a {
  color: var(--mid-color);
  text-decoration: underline;
  font-weight: 500;
  display: inline;
}

h1 {
  font-size: var(--h1-size);
  font-weight: 400;
}

h1 b {
  font-size: var(--h1-size);
  font-weight: 400;
  color: var(--mid-color);
}


h1.title {
  font-size: var(--h1-title-size);
  font-weight: 700;
  color: var(--dark-color);
  line-height: var(--heading-line-height);
}

h2 {
  font-size: var(--h2-size);
  font-weight: 700;
  color: var(--dark-color);
  line-height: var(--heading-line-height);
}

h3 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--dark-color);
  line-height: var(--heading-line-height);
}

/* Hero Section Styles */
.hero-section {
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--dark-color);
  line-height: var(--heading-line-height);
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: 2rem;
  font-weight: 300;
  color: var(--dark-color);
  line-height: 1.4;
  margin-bottom: var(--space-xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-button {
  background-color: var(--mid-color);
  color: #FFFFFF;
  padding: var(--space-md) var(--space-xxl);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  text-decoration: none;
  display: block;
  margin: 0 auto;
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  align-items: center;
}

.hero-cta-row .hero-cta-button {
  display: inline-block;
  margin: 0;
}

b {
  color: var(--mid-color);
}

a:link {
  color: var(--dark-color);
}



.block {
  overflow: hidden;
}

.block.white {
  background-color: white;
}

.block.highlight {
  background-color: var(--section-highlight-color);
  color: var(--dark-color);
}

.block.highlight.normal {
  margin: 2.5rem 0;
  padding: 1.5rem var(--block-margin-narrow);
}

.block.big {
  font-weight: 700;
  font-size: var(--large-font-size);
  text-align: center;
  padding: 1.5rem var(--block-margin-wide);
  margin: 2.5rem 0;
}

.block.normal {
  margin: 2.5rem var(--block-margin-normal);
  font-weight: 300;
  text-align: left;
}

/* Minimize extra space before footer: remove bottom margin on the last .block.normal in top-level sections */
.block.normal:last-child {
  margin-bottom: 0;
}

.block.white.normal {
  margin: 1.5rem var(--block-margin-narrow);
}

/* Account status strip under vessel design tabs */
#vessel-design-overview .account-status-strip {
  font-size: 14px;
  padding: 6px 10px;
  margin: 8px auto 20px auto;
  border: 1px solid var(--border-neutral);
  border-radius: var(--border-radius-md);
  background: var(--card-bg);
  text-align: center;
  display: block;
  width: fit-content;
  max-width: 100%;
}

#vessel-design-overview .account-status-strip>span {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

#vessel-design-overview .account-status-strip a {
  text-decoration: underline;
  color: var(--dark-color);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  border: none;
  background: transparent;
}

#vessel-design-overview .account-status-strip a:hover {
  text-decoration: none;
}

/* Circular badge for plan symbols in account status strip */
#vessel-design-overview .account-status-strip .plan-symbol-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--mid-color);
  color: white;
  font-size: 10px;
  font-weight: bold;
  vertical-align: middle;
  margin-left: 2px;
}

.email {
  font-weight: 700;
  text-align: center;
  padding: var(--space-xl);
  margin: var(--space-xxl) var(--block-margin-normal);
  background-color: var(--mid-color);
  color: var(--highlight-color);
  border-radius: var(--border-radius-xl);
}

.email a {
  font-size: 50px;
  color: var(--highlight-color);
  text-decoration: none;
}

.heavy {
  font-weight: 700;
  color: var(--mid-color);
}

.signup-text.clickable {
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: var(--grid-gap-large);
}

/* Override for handle type grid to use 4 columns by default */
#handle-type-grid-container .grid {
  grid-template-columns: repeat(4, 1fr);
  grid-gap: var(--grid-gap-small);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: var(--grid-gap-large);
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: var(--grid-gap-small);
}

.single-column-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: var(--grid-gap-medium);
}

.grid-item {
  text-align: left;
}

.grid-header {
  text-align: center;
}

ul {
  line-height: 80%;
}

/* Tight list spacing when a list follows an intro sentence */
p.list-intro {
  margin-bottom: 0;
}

ul.list-compact {
  margin-top: 0;
  margin-block-start: 0;
}

ul.check {
  margin: 0 0 0 -10px;
  list-style: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMCI+PHBhdGggZD0iTTkuOC4yTDMuMyA2LjlsLTEuOC0yQy44IDQuMi0uNCA1IC4xIDZsMi4xIDMuNWMuMy40IDEuMS45IDEuOSAwIC4zLS40IDYuNi04LjMgNi42LTguMy44LS44LS4yLTEuNi0uOS0xeiIgZmlsbD0iIzZiN2M5MyIvPjwvc3ZnPg==') outside;
}

ul.check li {
  margin: var(--space-lg) 0 var(--space-lg) -10px;
}

ul.check li::marker {
  font-size: 1.5em;
}

/* Blockquote styling for testimonials */
blockquote {
  margin: 0;
  padding: 0;
  font-style: italic;
  font-size: 1.1em;
  line-height: 1.4;
  color: var(--dark-color);
  border: none;
  margin-bottom: var(--space-md);
}

blockquote::before,
blockquote::after {
  content: none;
}

/* Testimonials section specific spacing adjustments */
.block.highlight .grid {
  grid-gap: var(--grid-gap-medium);
}

.block.highlight .grid-item,
.single-column-grid .grid-item {
  background-color: white;
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.block.highlight .grid-item:hover,
.single-column-grid .grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.block.highlight .grid-item blockquote,
.single-column-grid .grid-item blockquote {
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.block.highlight .grid-item p,
.single-column-grid .grid-item p {
  margin: 0;
  margin-top: var(--space-xs);
  font-weight: 600;
  color: var(--mid-color);
}

/* Testimonials sections on detail pages */
.testimonials-section {
  background-color: var(--section-highlight-color);
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
}

/* Testimonial submission form */
.testimonial-submit-form {
  background-color: white;
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: var(--space-lg);
}

.testimonial-submit-form input,
.testimonial-submit-form textarea {
  width: 100%;
  margin-bottom: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid var(--mid-color);
  border-radius: var(--border-radius-sm);
  box-sizing: border-box;
}

/* FAQ section specific spacing adjustments */
.block.white .grid {
  grid-gap: var(--grid-gap-medium);
}

#screenshot {
  display: inline-block;
  max-width: 640px;
}


header {
  margin: 0;
  padding: 0;
  overflow: visible;
  color: var(--dark-color);
  background-color: white;
  text-align: center;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--header-height);
  position: fixed;
  box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.1),
    0px 2px 10px 0px rgba(0, 0, 0, 0.08),
    0px 4px 15px 0px rgba(0, 0, 0, 0.05);
  z-index: 9999;
}

.after-header {
  padding-top: var(--header-height);
  /* Same as the header height */
}

ul.menu {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
}

.menu-item {
  height: var(--menu-item-height);
}

.menu-item:nth-child(-n+2) {
  flex-grow: 1;
  text-align: left;
}

.menu-item button {
  font-size: var(--menu-font-size);
  font-weight: 700;
  display: block;
  color: var(--mid-color);
  text-align: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border: none;
  background-color: white;
}

.menu-item:nth-child(-n+2) button {
  text-align: left;
}

.menu-item.hamburger-menu {
  flex-grow: 0;
}

.menu-item.hamburger-menu button {
  display: none;
}

.menu-item button:hover:not(.inactive) {
  background-color: var(--light-color);
}

.menu-item button.inactive {
  display: none;
}

/* Auth-based visibility control that works with responsive design */
.menu-item.auth-hidden {
  display: none;
}

/* Add media query for screens smaller than 768px */
@media screen and (max-width: 768px) {
  * {
    font-size: 14px;
  }

  /* Hide all but the first and last (hamburger) menu item */
  li.menu-item:not(:first-child):not(.hamburger-menu) {
    display: none;
  }

  li.menu-item.hamburger-menu button {
    display: block;
    padding: 6px 16px;
    font-size: 34px;
    background: none;
    border: none;
    cursor: pointer;
  }

  /* Show the rest of the menu items when the hamburger is clicked */
  ul.menu.active li.menu-item:not(:first-child):not(.hamburger-menu) {
    display: block;
    width: 100%;
    text-align: left;
    background-color: white;
  }

  /* Ensure the dropdown menu does not get clipped by the header */
  ul.menu.active {
    position: absolute;
    top: 0px;
    /* Position the menu just below the header */
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    /* Add some shadow for separation */
    z-index: 9998;
    /* Ensure the menu appears below the header */
    flex-direction: column;
    /* Switch to column layout on small screens */
    align-items: flex-start;
  }
}

/* Media queries for menu items have been consolidated at the end of the file */

.grid-item:has(img.svg-pot) {
  text-align: right;
  height: 100%;
  position: relative;
}

.svg-pot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Media query for svg-pot has been consolidated at the end of the file */

.pot-3d {
  width: var(--pot-size);
  height: var(--pot-size);
}

.pot-img {
  width: var(--pot-size);
  height: var(--pot-size);
}

.input-container {
  display: block;
  margin-bottom: var(--space-xxl);
  /* Adjust as needed */
}

.full-width {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-xs);
  /* Add padding for better spacing */
  border: 2px solid #333;
  /* A more visible border */
  border-radius: var(--border-radius-sm);
  /* Rounded corners for a modern look */
  background-color: #f9f9f9;
  /* Light background for contrast */
  outline: none;
  /* Remove the default outline */
}

#create-step1-buttons {
  display: flex;
  justify-content: space-between;
}


.design-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--dark-color);
}

.design-row {
  display: contents;
}

.design-table .design-cell {
  border-right: 1px solid var(--dark-color);
  border-bottom: 1px solid var(--dark-color);
  padding: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-cell-highlight {
  border-right: 1px solid var(--dark-color);
  border-bottom: 1px solid var(--dark-color);
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--highlight-color);
}

.proof-button-container {
  white-space: nowrap;
}

.proof-button-container button {
  margin-right: var(--space-sm);
  /* Adjust as needed */
}

/* If you want to remove the margin for the last button */
.proof-button-container button:last-child {
  margin-right: 0;
}


.bundle-purchase-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  height: 150px;
}

/* Note: Using literal 768px instead of var(--mobile-breakpoint) - CSS variables not supported in media queries */
@media (max-width: 768px) {
  .bundle-purchase-container {
    flex-direction: column;
    /* Stack items vertically on smaller screens */
    height: auto;
    /* Let the container adjust its height */
    flex-wrap: wrap;
    /* Allows wrapping of items on smaller screens */
    padding: var(--space-sm);
  }
}

.bundle-item {
  text-align: center;
  /* Center text within each item */
}

.bundle-item div {
  font-weight: 700;
  margin-bottom: 10px;
}


button.buy,
button.primary-button {
  background-color: var(--dark-color);
  /* Black background */
  color: #FFFFFF;
  /* White text */
  padding: var(--button-padding-y) var(--button-padding-x);
  /* Padding for a larger clickable area */
  font-size: var(--base-font-size);
  font-weight: normal;
  /* Adjust the font weight if needed */
  text-align: center;
  /* Center the text */
  border: none;
  /* Remove the border */
  border-radius: var(--border-radius-lg);
  /* Rounded corners */
  cursor: pointer;
  /* Pointer cursor on hover */
  text-decoration: none;
  /* Remove underline if it's a link */
  display: inline-block;
  /* Ensure it's an inline block */
}

button.buy:disabled,
button.primary-button:disabled {
  background-color: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
}

button.buy:hover,
button.primary-button:hover {
  background-color: var(--mid-color);
  /* Slightly lighter black for hover effect */
}

#checkout {
  width: 100vw;
}

.popupBuy {
  position: relative;
  display: inline-block;
}

/* The actual popup (hidden by default) */
.popupBuy .popupBuytext {
  visibility: hidden;
  width: 160px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 0;
  position: absolute;
  z-index: 1;
  top: 125%;
  left: 50%;
  margin-left: -80px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Popup arrow */
.popupBuy .popupBuytext::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

/* Toggle visibility */
.popupBuy:hover .buy:disabled+.popupBuytext {
  visibility: visible;
  opacity: 1;
}


/* Handle Type Grid Styles */
.handle-type-card {
  text-align: center;
  padding: 3px;
  border-radius: 8px;
  transition: transform 0.2s;
  background-color: rgb(245, 245, 245);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.handle-type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.handle-type-image-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 5px;
  position: relative;
}

.handle-type-image {
  width: 100%;
  height: auto;
  border-radius: 5px;
  object-fit: contain;
}

/* Main/Shop page cards: ensure consistent layout and centered actions */
#main .grid,
#shop .grid {
  align-items: stretch;
}

#main .handle-type-card,
#shop .handle-type-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: var(--space-xl);
}

#main .handle-type-card h2,
#shop .handle-type-card h2 {
  margin-top: 0;
}

#main .handle-type-card p,
#shop .handle-type-card p {
  margin-bottom: var(--space-md);
}

#main .handle-type-card .account-actions,
#shop .handle-type-card .account-actions {
  justify-content: center;
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: var(--space-sm);
}

/* Common star badge overlay for cards to indicate special status (handles purchased, designs with pro mode) */
.star-badge-overlay {
  position: absolute;
  top: 5px;
  left: 5px;
  background-color: var(--mid-color);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  z-index: 2;
}

/* Container for overlay badges (star and refresh icon) */
.overlay-badges-container {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  gap: 5px;
  align-items: center;
  z-index: 2;
}

/* When inside the overlay badges container, remove individual positioning */
.overlay-badges-container .star-badge-overlay {
  position: static;
  top: auto;
  left: auto;
}

.overlay-badges-container .auto-refresh-icon {
  position: static;
  top: auto;
  left: auto;
}

/* Legend for handle type grid */
.handle-grid-legend {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--dark-color);
}

.legend-star {
  color: var(--mid-color);
  font-size: 0.8rem;
  font-weight: bold;
}

.handle-type-title {
  margin: 5px 0 0 0;
  color: var(--dark-color);
  font-size: 1rem;
}

.handle-type-details {
  color: var(--dark-color);
  margin: 0px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 1.1;
}

.handle-type-details span {
  position: relative;
  font-size: 0.9rem;
  margin: 0px;
  padding: 0 4px 0 0;
  line-height: 1.1;
}


.handle-type-price {
  color: var(--mid-color);
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0px;
}

/* Handle Detail View Styles */
.handle-detail-header {
  padding-bottom: 10px;
}

/* Hide the title in the header on desktop, but show on mobile */
.handle-detail-title {
  display: none;
}

/* Note: Using literal 768px instead of var(--mobile-breakpoint) - CSS variables not supported in media queries */
@media screen and (max-width: 768px) {
  .handle-detail-title {
    display: block;
    color: var(--dark-color);
    font-size: 24px;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
  }

  /* Hide the product title in the info column on mobile */
  .product-detail-title {
    display: none;
  }

  .menu-item.hamburger-menu button {
    display: block;
    padding: var(--space-xs) var(--space-md);
    font-size: 34px;
    background: none;
    border: none;
    cursor: pointer;
  }
}

#back-to-handles,
#back-to-shop-from-handles,
#back-to-shop-from-vessels {
  background-color: transparent;
  color: var(--dark-color);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--base-font-size);
  font-weight: 700;
  text-align: left;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 15px;
  position: relative;
  padding-left: 20px;
  transition: color 0.2s;
}

#back-to-handles:before,
#back-to-shop-from-handles:before,
#back-to-shop-from-vessels:before {
  content: "←";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

#back-to-handles:hover,
#back-to-shop-from-handles:hover,
#back-to-shop-from-vessels:hover {
  color: var(--mid-color);
  background-color: transparent;
}

.handle-detail-images {
  margin-bottom: 30px;
}

.handle-detail-images img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.handle-detail-description {
  margin-bottom: 20px;
  line-height: 1.6;
}

.handle-detail-implementation {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f8f8f8;
  border-radius: 5px;
}

.handle-detail-variations h3,
.handle-detail-purchase h3,
.format-selector-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.handle-variations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

/* E-commerce Product Detail Layout */
.product-images-column {
  width: 100%;
  /* Use full width of the grid cell */
  padding-right: 0;
  /* Remove padding as grid-gap handles spacing */
}

.product-info-column {
  width: 100%;
  /* Use full width of the grid cell */
}

.product-info-container {
  padding-left: 0;
  /* Remove left padding as grid-gap handles spacing */
}

/* Main product image layout */
.image-layout {
  display: flex;
  gap: 15px;
  width: 100%;
}

.main-image-area {
  flex: 1;
  position: relative;
  min-width: 0;
  width: calc(100% - 80px);
}

/* Main product image styling */
.main-image-container {
  margin-bottom: 20px;
  position: relative;
}

.main-image-display {
  width: 100%;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  --image-container-height: 450px;
  --image-padding: 2px;
  /* Small safety margin */
}

/* Vessel-specific styles */
#vessels-detail .main-image-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 350px;
  position: relative;
  width: 100%;
  overflow: visible;
}

.main-image-display img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  width: auto;
  height: auto;
  max-height: calc(var(--image-container-height) - (2 * var(--image-padding)));
}

.gallery-controls {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  box-sizing: border-box;
}

/* Gallery-specific controls */
#vessels-detail .gallery-controls {
  pointer-events: none;
  z-index: 10;
}

.gallery-prev,
.gallery-next {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s, transform 0.2s;
  pointer-events: auto;
  /* Make only the buttons receive mouse events */
}

.gallery-prev:hover,
.gallery-next:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.1);
}

.gallery-caption {
  text-align: center;
  min-height: 24px;
  margin-top: 0px;
  font-weight: bold;
  color: var(--dark-color);
  /* Set exact height based on font metrics */
  height: calc(var(--base-font-size) * var(--line-height));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gallery-specific caption */
#vessels-detail .gallery-caption {
  display: block;
  box-sizing: border-box;
  line-height: 1.4;
  word-wrap: break-word;
  overflow: visible;
  margin-top: 10px;
  margin-bottom: 5px;
}

.image-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

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

.indicator-dot.active {
  background-color: var(--dark-color);
}

/* Thumbnail gallery - vertical style */
.thumbnail-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 450px;
  /* Match the main image display height */
  overflow-y: auto;
  /* Changed from scroll to auto for better cross-browser behavior */
  overflow-x: hidden;
  /* Prevent horizontal scrolling */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
  width: 64px;
  /* Reduced width to tightly fit thumbnails */
  flex-shrink: 0;
  /* Prevent the gallery from shrinking */
  flex-grow: 0;
  /* Prevent growing beyond specified width */
  max-width: 64px;
  /* Explicitly set maximum width */
  padding: 4px 2px;
  /* Added top/bottom padding to account for the border highlight */
  box-sizing: border-box;
  /* Include padding in width calculation */
  align-items: center;
  /* Center thumbnails */
  max-height: 450px;
  /* Ensure max-height is set to match height */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.thumbnail-gallery::-webkit-scrollbar {
  display: none;
}

.thumbnail-item {
  width: 60px;
  height: 60px;
  min-height: 60px;
  /* Add min-height to prevent thumbnails from collapsing */
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
  opacity: 0.6;
  box-sizing: border-box;
  /* Include border in width/height */
  flex-shrink: 0;
  /* Prevent thumbnail from shrinking */
}

/* Thumbnail media fills the tile */
.thumbnail-item img,
.thumbnail-item .svg-thumbnail-bg {
  width: 100%;
  height: 100%;
}

.thumbnail-item img {
  object-fit: cover;
  /* Changed from contain to cover to ensure images fill the space consistently */
  object-position: center;
  /* Ensure image is centered in the thumbnail */
}

/* Special handling for SVG thumbnails */
.thumbnail-item img.svg-thumbnail {
  object-fit: contain;
}

/* SVG thumbnail background color */
.thumbnail-item img.svg-thumbnail,
.thumbnail-item .svg-thumbnail-bg {
  background-color: #f5f5f5;
}

/* SVG thumbnails rendered as a background image (used to discourage trivial right-click downloads) */
.thumbnail-item .svg-thumbnail-bg {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.thumbnail-item:hover {
  transform: translateX(2px);
  opacity: 0.8;
}

.thumbnail-item.active {
  border-color: var(--dark-color);
  opacity: 1;
}

/* Dimension image styling */
.dimension-image-container {
  margin-bottom: 20px;
}

.dimension-image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.product-detail-title {
  color: var(--dark-color);
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.2;
}

/* Responsive adjustments */
/* Note: Using literal 768px instead of var(--mobile-breakpoint) - CSS variables not supported in media queries */
@media screen and (max-width: 768px) {

  .product-images-column,
  .product-info-column {
    width: 100%;
    padding: 0;
  }

  .product-info-container {
    padding-left: 0;
    margin-top: var(--space-lg);
  }
}

/* Variation selection styling */
.handle-variations-select {
  margin-bottom: 20px;
}

.variation-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.variation-checkbox-group.variations-locked,
.format-selector-container.variations-locked {
  opacity: 0.6;
  pointer-events: none;
}

.variation-checkbox-label {
  display: flex;
  align-items: center;
  padding: var(--space-sm);
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  position: relative;
  /* Added for absolute positioning of badge */
  flex: 0 0 auto;
  min-width: var(--variation-min-width);
  max-width: var(--variation-max-width);
}

.variation-checkbox-label:hover {
  background-color: var(--hover-light-blue);
}

.variation-checkbox-label.variation-selected {
  background-color: var(--light-color);
  border-color: var(--mid-color);
}

/* Purchased variation styling */
.variation-checkbox-label.variation-purchased {
  background-color: var(--purchased-bg-color);
  border-color: var(--mid-color);
  cursor: default;
}

.owned-badge {
  position: absolute;
  top: calc(-1 * var(--space-sm) + 1px);
  right: -5px;
  background-color: var(--mid-color);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  /* Keep original circular shape */
  text-transform: uppercase;
  z-index: 2;
}

.download-link-wrapper {
  margin-left: auto;
}

a.download-link {
  margin-left: 8px;
  background-color: var(--mid-color);
  color: white;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.2s;
}

a.download-link:hover {
  background-color: var(--dark-color);
  color: white;
}

.variation-checkbox-label input {
  margin-right: 8px;
}

.variation-thumbnail {
  width: var(--variation-thumbnail-size);
  height: var(--variation-thumbnail-size);
  min-width: var(--variation-thumbnail-size);
  margin-right: var(--space-sm);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.variation-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.variation-label-text {
  flex: 1;
  margin-right: var(--space-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.handle-purchase-container {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.selection-status {
  padding: 10px;
  border-radius: 4px;
  background-color: #f9f9f9;
  margin-bottom: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #eee;
  clear: both;
  font-size: 14px;
  font-style: italic;
  display: block;
  width: 100%;
}

.selection-status-empty {
  color: #666;
}

.selection-status-partial {
  color: #d9940f;
}

.selection-status-ready {
  color: var(--mid-color);
}

.detail-purchase-heading {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--dark-color);
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

/* Connect purchase section visually with variations */
.handle-detail-purchase {
  position: relative;
}


.handle-purchase-option {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 15px;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.handle-purchase-price {
  font-weight: bold;
  font-size: 1.2em;
  color: var(--dark-color);
}

.handle-purchase-description {
  font-size: 0.9em;
  color: #555;
}

/* Owned handles container in left column */
.owned-handles-container {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.owned-handles-container h3 {
  color: var(--dark-color);
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
}

.owned-variations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.owned-variations-list .variation-checkbox-label {
  min-width: var(--variation-min-width) + 20px;
  max-width: var(--variation-max-width) + 20px;
  background-color: var(--purchased-bg-color);
  border-color: var(--mid-color);
  width: auto;
  /* Allow natural width */
}

.owned-variations-list .variation-label-text {
  white-space: normal;
  /* Allow text to wrap */
  overflow: visible;
  /* Show all text */
  text-overflow: clip;
  /* Don't use ellipsis */
}

.owned-variations-list .download-link-wrapper {
  margin-left: var(--space-xs);
}

/* Handle detail view specific grid - override the default 50/50 split */
#handle-type-detail .grid {
  --detail-grid-gap: var(--grid-gap-medium);
  grid-template-columns:
    calc(var(--detail-col1-width) - var(--detail-grid-gap)/2) calc(var(--detail-col2-width) - var(--detail-grid-gap)/2);
  grid-gap: var(--detail-grid-gap);
  /* Slightly reduced gap to provide more content space */
  box-sizing: border-box;
  /* Ensure box-sizing is set to border-box to include padding/border in width calculations */
}

/* Handle detail mobile: single column with reordered layout */
@media screen and (max-width: 768px) {

  #handle-type-detail .grid,
  #intro-offer-handle .grid {
    grid-template-columns: 1fr;
  }

  /* Flatten nested containers so we can reorder children */
  #handle-type-detail .product-images-column,
  #intro-offer-handle .product-images-column {
    display: contents;
  }

  #handle-type-detail .handle-detail-images,
  #intro-offer-handle .handle-detail-images {
    display: contents;
  }

  /* Reorder: gallery first, product info second, owned handles third, testimonials last */
  #handle-type-detail .main-image-container,
  #intro-offer-handle .main-image-container {
    order: 1;
  }

  #handle-type-detail .product-info-column,
  #intro-offer-handle .product-info-column {
    order: 2;
  }

  #handle-type-detail .owned-handles-container,
  #intro-offer-handle .owned-handles-container {
    order: 3;
  }

  #handle-type-detail .testimonials-section,
  #intro-offer-handle .testimonials-section {
    order: 4;
  }

  /* Prevent buttons from overflowing container on mobile */
  #handle-type-detail .product-info-column button,
  #handle-type-detail .testimonial-submit-form button,
  #intro-offer-handle .product-info-column button,
  #intro-offer-handle .testimonial-submit-form button {
    max-width: 100%;
    box-sizing: border-box;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Reduce bullet list indent on mobile */
  #handle-type-detail .handle-detail-implementation ul,
  #intro-offer-handle .handle-detail-implementation ul {
    padding-left: var(--space-lg);
  }

  /* Reduce gallery heights on mobile while keeping side-by-side layout */
  #handle-type-detail .thumbnail-gallery,
  #intro-offer-handle .thumbnail-gallery {
    height: 280px;
    max-height: 280px;
  }

  #handle-type-detail .main-image-display,
  #intro-offer-handle .main-image-display {
    height: 280px;
  }
}

/* Consolidated Media Queries */
/* Add a new breakpoint for 3 columns at a wider width than tablet breakpoint */
@media screen and (max-width: 1050px) {
  #handle-type-grid-container .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Move icon positioning */
.move-icon {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 30px;
  height: 30px;
  pointer-events: none;
}

/* design grid - Responsive grid container (UL/LI structure) */
.design-grid {
  display: grid;
  gap: 20px;
  padding: 10px;
  list-style: none;
  /* Remove default bullets */
  margin: 0;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .design-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .design-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Note: Using literal 768px instead of var(--mobile-breakpoint) - CSS variables not supported in media queries */
@media screen and (max-width: 768px) {
  * {
    font-size: var(--mobile-font-size);
  }

  .grid {
    grid-template-columns: 1fr;
    grid-gap: var(--grid-gap-small);
  }

  /* Single column for testimonials and highlighted grids on mobile */
  .block.highlight .grid {
    grid-template-columns: 1fr;
    grid-gap: var(--grid-gap-small);
  }

  #handle-type-grid-container .grid,
  .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .block.white.normal {
    margin: var(--space-lg) var(--block-margin-mobile);
  }

  .svg-pot {
    position: relative;
    left: -50%;
  }

  .bundle-purchase-container {
    flex-direction: column;
    height: auto;
    flex-wrap: wrap;
    padding: var(--space-sm);
  }

  /* Hero section mobile responsive styles */
  .hero-title {
    font-size: 2.25rem;
    margin-bottom: var(--space-md);
  }

  .hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-sm);
  }

  .hero-cta-button {
    font-size: 1.5rem;
    padding: var(--space-sm) var(--space-lg);
  }

  .hero-cta-row {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* Static pricing section styles */
.static-pricing-section {
  background-color: #f7f7f7;
  border-radius: 6px;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.static-pricing-section h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
  color: var(--dark-color);
}

.pricing-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.pricing-list li {
  margin-bottom: var(--space-xs);
}

/* Pricing summary section styles */
.pricing-summary-section {
  border: none;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  width: 100%;
}

.pricing-summary-section h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  color: var(--dark-color);
}

.pricing-summary-content {
  padding: var(--space-sm);
  transition: all 0.3s ease;
}

.selected-count {
  font-weight: bold;
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.applied-pricing {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.pricing-total {
  font-weight: bold;
  margin-bottom: var(--space-md);
  font-size: 1.2rem;
  color: var(--dark-color);
}

.pricing-message {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background-color: #e8f4f8;
  border-radius: 4px;
  font-weight: bold;
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.selection-prompt {
  color: #666;
  font-style: italic;
  margin: var(--space-md) 0;
}

/* Loading message style */
.loading-handles-message {
  text-align: center;
  padding: var(--space-lg);
  width: 100%;
  color: var(--dark-color);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Load More button styling */
.load-more-button {
  margin: 20px auto;
  display: block;
}

.load-more-button.hidden {
  display: none;
}

/* Checkout button */
.checkout-form {
  margin-top: var(--space-md);
  text-align: center;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* Intro offer confirmation-style container (mirrors checkout look) */
.layout-narrow {
  max-width: 600px;
  margin: 24px auto;
  padding: 0 16px;
}

.confirmation {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.confirmation .button-group {
  justify-content: center;
}

.checkout-button {
  background-color: var(--mid-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: var(--space-sm) var(--space-xl);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 45px;
}

.checkout-button:disabled {
  background-color: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
}

.checkout-button:hover:not(:disabled) {
  background-color: var(--dark-color);
}

/* Animation classes */
.summary-update-animation {
  animation: highlight-background 0.5s ease;
}

.message-update-animation {
  animation: highlight-message 0.5s ease;
}

@keyframes highlight-background {
  0% {
    background-color: rgba(175, 211, 226, 0.3);
  }

  100% {
    background-color: transparent;
  }
}

@keyframes highlight-message {
  0% {
    transform: scale(1.05);
    background-color: rgba(175, 211, 226, 0.6);
  }

  100% {
    transform: scale(1);
    background-color: #e8f4f8;
  }
}

/* Media query adjustments */
@media screen and (max-width: 768px) {

  .static-pricing-section,
  .pricing-summary-section {
    padding: var(--space-sm);
  }

  .pricing-list {
    padding-left: var(--space-md);
  }

  .checkout-button {
    padding: var(--space-sm);
  }
}

/* Format Selector Styles */
.format-selector-container {
  padding-bottom: var(--space-sm);
}

.format-selector {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}

.format-option {
  padding: 8px 12px;
  border: 1px solid var(--light-color);
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-weight: 500;
  text-align: center;
  flex: 1;
  border-right: none;
  margin: 0;
}

/* First button gets left rounded corners */
.format-option:first-child {
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

/* Last button gets right rounded corners and a right border */
.format-option:last-child {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  border-right: 1px solid var(--light-color);
}

/* When only one button is visible, give it all rounded corners */
.format-option.only-visible {
  border-radius: var(--border-radius-sm);
  border-right: 1px solid var(--light-color);
}

.format-option:hover {
  background-color: #f0f0f0;
}

.format-option.active {
  background-color: var(--highlight-color);
  color: var(--dark-color);
  font-weight: 600;
}

/* Pricing Grid Styles */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--light-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-top: 10px;
}

.pricing-row {
  display: contents;
}

.pricing-cell {
  padding: 8px 12px;
  border-bottom: 1px solid var(--light-color);
  text-align: center;
}

.pricing-cell:not(:last-child) {
  border-right: 1px solid var(--light-color);
}

.pricing-header .pricing-cell {
  font-weight: bold;
  color: var(--dark-color);
}

.pricing-label {
  font-weight: 500;
  text-align: left;
}

/* Last row should not have bottom border */
.pricing-row:last-child .pricing-cell {
  border-bottom: none;
}

/* Highlighted format column styles */
.pricing-cell.format-highlighted {
  background-color: rgba(175, 211, 226, 0.15);
}

.pricing-header .pricing-cell.format-highlighted {
  border-bottom: 2px solid var(--highlight-color);
}

/* Shop Page Layout with Left Sidebar */
.shop-layout {
  display: flex;
  gap: var(--space-xxl);
  padding-left: var(--block-margin-narrow);
  padding-right: var(--block-margin-narrow);
  padding-bottom: var(--space-xxl);
}

/* Shop page-specific: reduce left padding to account for sidebar width */
#shop .shop-layout {
  padding-left: var(--block-margin-shop-left);
}

.shop-sidebar {
  flex: 0 0 160px;
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  height: fit-content;
  align-self: flex-start;
}

.shop-nav-item {
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: white;
  border: 1px solid transparent;
}

.shop-nav-item h3 {
  margin: 0;
}

.shop-nav-item.active {
  background-color: var(--section-highlight-color);
  border-left: 3px solid var(--mid-color);
  border-radius: var(--border-radius-md);
}

.shop-content {
  flex: 1;
  min-width: 0;
}

/* Override left/right margins on blocks inside shop-content since shop-layout provides spacing */
.shop-content .block.normal,
.shop-content .block.white.normal {
  margin-left: 0;
  margin-right: 0;
}

/* Remove top margin from description blocks to avoid double spacing with after-header */
#shop-vessels-description,
#shop-handles-description {
  margin-top: 0;
}

/* Always apply consistent padding to prevent layout shift */
#shop-vessels,
#shop-handles {
  padding: 0 var(--space-md) var(--space-md) var(--space-md);
  border-radius: var(--border-radius-md);
  transition: background-color 0.2s ease;
}

/* Active content section styling - background highlight only, no border */
#shop-vessels.shop-section-active,
#shop-handles.shop-section-active {
  background-color: var(--section-highlight-color);
}

/* When a section is active, let the highlight show by removing container white bg */
#shop-vessels.shop-section-active .block.white.normal,
#shop-handles.shop-section-active .block.white.normal {
  background-color: transparent;
  box-shadow: none;
}

/* Mobile-specific: remove fixed sidebar width to fit content */
/* Note: Using literal 768px instead of var(--mobile-breakpoint) - CSS variables not supported in media queries */
@media screen and (max-width: 768px) {
  .shop-sidebar {
    flex: none;
    width: fit-content;
  }
}

/* Softer active state for sidebar item with left bar */
.shop-nav-item.active {
  background-color: var(--section-highlight-color);
  border-left: 3px solid var(--mid-color);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Remove gap between sidebar and content when connected */
.shop-layout.shop-connected {
  gap: 0;
}

/* When a section is active, let the highlight show by removing container white bg */
#shop-vessels.shop-section-active .block.white.normal,
#shop-handles.shop-section-active .block.white.normal {
  background-color: transparent;
  box-shadow: none;
}

/* Vessels section specific styles */
#vessels-grid-container .grid {
  grid-template-columns: repeat(4, 1fr);
  grid-gap: var(--grid-gap-small);
}

.vessel-item-card {
  background-color: white;
  border-radius: var(--border-radius-md);
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.vessel-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}


.vessel-item-title {
  margin: 5px 0 0 0;
  color: var(--dark-color);
  font-size: 1rem;
}

.vessel-item-details {
  color: var(--dark-color);
  margin: 0px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 1.1;
}

.vessel-item-details span {
  position: relative;
  font-size: 0.9rem;
  margin: 0px;
  padding: 0 4px 0 0;
  line-height: 1.1;
}

/* Vessel detail view styles */
.vessel-detail-header {
  padding-bottom: 10px;
}

.vessel-detail-title {
  display: none;
}

#back-to-vessels {
  background-color: transparent;
  color: var(--dark-color);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--base-font-size);
  font-weight: 700;
  text-align: left;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 15px;
  position: relative;
  padding-left: 20px;
  transition: color 0.2s;
}

#back-to-vessels:before {
  content: "←";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

#back-to-vessels:hover {
  color: var(--mid-color);
  background-color: transparent;
}

.vessel-detail-description {
  margin-bottom: 20px;
  line-height: 1.6;
}

.vessel-detail-download {
  margin-bottom: 20px;
}

.vessel-detail-page .grid,
.handle-detail-page .grid {
  --detail-grid-gap: var(--grid-gap-medium);
  grid-template-columns:
    calc(var(--detail-col1-width) - var(--detail-grid-gap)/2) calc(var(--detail-col2-width) - var(--detail-grid-gap)/2);
  grid-gap: var(--detail-grid-gap);
  box-sizing: border-box;
}

/* Media query adjustments for vessels */
@media screen and (max-width: 1050px) {
  #vessels-grid-container .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  #vessels-grid-container .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vessel-detail-title {
    display: block;
    color: var(--dark-color);
    font-size: 24px;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
  }

  #vessels-detail .product-detail-title {
    display: none;
  }

  /* Vessel detail: single column on mobile with reordered layout */
  .vessel-detail-page .grid {
    grid-template-columns: 1fr;
  }

  /* Flatten nested containers so we can reorder children */
  .vessel-detail-page .product-images-column {
    display: contents;
  }

  .vessel-detail-page .vessel-detail-images {
    display: contents;
  }

  /* Reorder: gallery first, product info second, testimonials last */
  .vessel-detail-page .main-image-container {
    order: 1;
  }

  .vessel-detail-page .product-info-column {
    order: 2;
  }

  .vessel-detail-page .testimonials-section {
    order: 3;
  }

  /* Prevent buttons from overflowing container on mobile */
  .vessel-detail-page .product-info-column button,
  .vessel-detail-page .vessel-detail-download button,
  .vessel-detail-page .testimonial-submit-form button {
    max-width: 100%;
    box-sizing: border-box;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Reduce bullet list indent on mobile */
  .vessel-detail-page .vessel-detail-implementation ul {
    padding-left: var(--space-lg);
  }
}



.vessel-detail-page .main-image-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 350px;
  /* Reduced from 450px to leave room for caption and controls */
  position: relative;
  width: 100%;
  overflow: visible;
  /* Allow content to overflow if needed */
}

.vessel-detail-page .main-image-display .svg-pot,
.vessel-detail-page .main-image-display .svg-pot-bg,
.vessel-detail-page .main-image-display img {
  max-width: 100%;
  max-height: 350px;
}

.vessel-detail-page .main-image-display img {
  height: auto;
}

.vessel-detail-page .main-image-display .svg-pot-bg {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.vessel-detail-page .pot-3d {
  width: 100%;
  height: 100%;
  border: 1px solid #eee;
  border-radius: var(--border-radius-md);
  background-color: #333333;
}

.thumbnail-3d-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  background-color: var(--dark-color);
  color: white;
  text-align: center;
  line-height: 60px;
  font-weight: bold;
}

/* Style adjustments for vessel detail view layout */
.vessel-detail-page .image-layout {
  position: relative;
  height: 450px;
}

.vessel-detail-page .thumbnail-gallery {
  height: 450px;
}

/* Vessel detail: reduce gallery heights on mobile */
@media screen and (max-width: 768px) {

  #vessels-detail .image-layout,
  #intro-offer-vessel .image-layout {
    height: 300px;
  }

  #vessels-detail .thumbnail-gallery,
  #intro-offer-vessel .thumbnail-gallery {
    height: 280px;
    max-height: 280px;
  }

  #vessels-detail .main-image-display,
  #intro-offer-vessel .main-image-display {
    height: 280px;
  }
}

/* Additional image display for vessel detail */
.vessel-detail-additional-images {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.vessel-detail-additional-images img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
}

.vessel-detail-implementation {
  margin-top: var(--space-xl);
  line-height: 1.5;
  color: #333;
  background-color: #f8f8f8;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.vessel-detail-implementation h3 {
  margin-bottom: var(--space-sm);
  color: var(--dark-color);
  font-weight: 500;
}

.vessel-detail-implementation ul {
  margin-top: var(--space-md);
}

/* UPDATED: Each grid cell styled as a card */
.design-cell {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.design-cell-old {
  background: #fff;
  border: 1px solid #ddd;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Card image section at the top */
/* CHANGED: Set height back to 100px (original value) */
.card-image {
  width: 100%;
  height: 200px;
  /* Increased from 100px to 200px */
  overflow: hidden;
  background: var(--card-bg);
}

/* Restore SVG container styling for proper SVG rendering */
.svg-container {
  width: 100%;
  height: 100%;
  /* This will now be 200px tall */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--card-bg);
}

/* Card details section below the image */
.card-details {
  padding: 10px;
  flex-grow: 1;
}

/* Details text styling */
.card-details .design-date,
.card-details .design-wall,
.card-details .design-shrinkage,
.card-details .design-status {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 5px;
}

.design-cell.new-design {
  /* Look like a normal design-cell "card" */
  background: var(--dark-color);
  /* #146c94 */
  color: #fff;
  /* White text for contrast */
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-height: 250;
  /* Match height of regular design cells (250px image) - doesnt account for details */

  /* Match standard font style */
  font-size: 1rem;
  font-weight: 600;
  justify-content: center;
  align-items: center;
}

/* Override the default .card-image background for the new-design cell */
.design-cell.new-design .card-image {
  background: var(--dark-color) !important;
  /* #146c94, your dark brand color */
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

/* Ensure the text is white on that dark background */
.design-cell.new-design .new-design-content {
  color: #fff !important;
}

/* Styling for proof button container and buttons */
.proof-button-container {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.proof-button-container button {
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Auto-refresh icon (if used) */
.auto-refresh-icon {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  animation: spin 2.5s linear infinite;
  transform-origin: center;
  color: #555;
}

.auto-refresh-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

/* Status polling icon */
.status-polling-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  animation: spin 2.5s linear infinite;
  transform-origin: center;
  color: #555;
  vertical-align: middle;
  margin-right: 8px;
}

.status-polling-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* === Page-Specific Overrides for the Designs Page === */

/* Reduce margins and padding for blocks within #vessel-design-overview, but override top margin separately */
#vessel-design-overview .block.white.normal {
  margin: 10px 20px;
  padding: 15px;
}

#vessel-design-overview .block.white.normal.after-header {
  margin-top: 60px;
}

/* Retention Filter Styles */
.retention-filter-container {
  margin-bottom: var(--space-md);
}

.retention-filter-selector {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}

.retention-option {
  padding: 8px 16px;
  border: 1px solid var(--light-color);
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-weight: 500;
  text-align: center;
  flex: 1;
  border-right: none;
  margin: 0;
}

/* First button gets left rounded corners */
.retention-option:first-child {
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

/* Last button gets right rounded corners and a right border */
.retention-option:last-child {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  border-right: 1px solid var(--light-color);
}

.retention-option:hover {
  background-color: #f0f0f0;
}

.retention-option.active {
  background-color: var(--highlight-color);
  color: var(--dark-color);
  font-weight: 600;
}

/* Adjust the grid container margins and gaps */
#designs-list .design-grid {
  padding: 5px !important;
  /* reduced grid container padding */
  gap: 5px !important;
  /* reduced gap between grid cells */
}

/* Increase the image area to be more prominent */
#designs-list .card-image {
  height: 250px !important;
  /* increased image area (adjust as needed) */
}

/* Optionally reduce the text area padding to emphasize the image */
#designs-list .card-details {
  padding: 5px !important;
}

/* Add drop shadow on hover for design cells (Etsy-like effect) */
#designs-list .design-cell:hover {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.15),
    /* a softer shadow */
    0 6px 20px rgba(0, 0, 0, 0.25);
  /* a stronger, larger shadow */
  transition: box-shadow 0.2s ease-in-out;
}

/* --- New CSS for minimal cell details --- */
.card-minimal-details {
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  font-size: 0.9rem;
  color: #333;
  width: 100%;
  box-sizing: border-box;
}

/* Design name title styling (match vessel-item-title) */
.card-minimal-details .vessel-item-title {
  margin: 0 0 3px 0;
  color: var(--dark-color);
  font-size: 1rem;
  font-weight: 500;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Design details styling (match vessel-item-details) */
.card-minimal-details .vessel-item-details {
  color: var(--dark-color);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 1.1;
  font-size: 0.85rem;
}

/* Styling for spans in details */
.card-minimal-details .vessel-item-details span {
  position: relative;
  margin: 0;
  padding: 0 2px;
  line-height: 1.1;
}

/* Status styling */
.card-minimal-details .design-status {
  font-weight: 500;
  color: var(--mid-color);
}

/* --- New CSS for the overlay modal (details popup) --- */
.design-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.design-detail-overlay .overlay-content {
  background: #fff;
  padding: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
  border-radius: 4px;
}

.design-detail-overlay .overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.design-detail-overlay .overlay-image {
  width: 100%;
  height: 300px;
  /* Adjust this value if needed */
  background: #f9f9f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.design-detail-overlay .overlay-image svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.design-detail-overlay .overlay-details {
  font-size: 1rem;
  color: #333;
}

/* --- Unified Create/Details Page Overrides --- */

/* When showing the unified details, reuse the same styles as for new design creation.
You might add an extra class (e.g., .existing-design) if needed for further tweaks. */
#create .existing-design-details {
  margin-top: 20px;
  font-size: 1rem;
  color: #333;
}

/* Optionally adjust the header style for design details */
#create h1.title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 10px;
}

#design-detail {
  margin-top: 60px;
}

/* Two-column layout for the design details */
.design-detail-layout {
  display: flex;
  flex-direction: row;
  gap: 30px;
  box-sizing: border-box;
  align-items: flex-start;
  /* Ensure top alignment of children */
}

/* Create flow specific panel styles */
.design-panel {
  display: flex;
  flex-direction: column;
}

.design-step-title {
  font-size: var(--h1-title-size);
  font-weight: 700;
  color: var(--dark-color);
  margin: 0 0 var(--space-md) 0;
}

.info-panel {
  background-color: #f8f8f8;
  padding: var(--space-md);
  margin: var(--space-md) 0;
  border-radius: var(--border-radius-sm);
  border-left: 3px solid var(--mid-color);
}

.info-group {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-xs);
  gap: var(--space-xs);
}

.info-group:last-child {
  margin-bottom: 0;
}

.info-group label {
  font-weight: 500;
  color: var(--dark-color);
  flex-shrink: 0;
}

.info-group span {
  flex-shrink: 0;
}

.control-group {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
  min-height: 32px;
  /* Match input height for consistency */
  line-height: 1.4;
}

.control-group label {
  min-width: 120px;
  font-weight: 500;
  color: var(--dark-color);
  margin-right: var(--space-sm);
  flex-shrink: 0;
}

.control-group input[type="number"] {
  width: 80px;
  height: 28px;
  /* Slightly smaller for better proportion */
  padding: 2px var(--space-xs);
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  font-size: var(--base-font-size);
  margin-right: var(--space-xs);
  box-sizing: border-box;
  vertical-align: middle;
}

.control-group input[type="number"]:focus {
  outline: none;
  border-color: var(--mid-color);
  box-shadow: 0 0 0 2px rgba(25, 167, 206, 0.1);
}

.control-group input[type="number"]::-webkit-inner-spin-button,
.control-group input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

.button-group {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* Design flow final step: wrap buttons on mobile to prevent clipping */
@media screen and (max-width: 768px) {
  #design-final-complete .button-group {
    flex-wrap: wrap;
  }

  #design-final-complete .button-group button {
    flex: 1 1 auto;
    min-width: 80px;
  }
}

/* Generic pending utility */
.is-pending {
  opacity: 0.6;
  pointer-events: none;
}

/* Drop zone styling */
.drop-zone {
  border: 2px dashed var(--border-neutral);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  text-align: center;
  background-color: var(--bg-neutral);
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--mid-color);
  background-color: var(--hover-light-blue);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.drop-zone-text {
  color: var(--text-muted);
  font-size: var(--base-font-size);
  line-height: 1.4;
}

.secondary-button {
  background-color: #f8f8f8;
  color: var(--dark-color);
  border: 1px solid var(--dark-color);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  font-size: var(--base-font-size);
  font-weight: normal;
}

.secondary-button:hover {
  background-color: #f0f0f0;
}

select {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  font-size: var(--base-font-size);
  background-color: white;
  margin-left: var(--space-xs);
}

select:focus {
  outline: none;
  border-color: var(--mid-color);
  box-shadow: 0 0 0 2px rgba(25, 167, 206, 0.1);
}

.design-detail-images {
  flex: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
}

.image-container {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.design-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

@media screen and (max-width: 768px) {
  .design-detail-layout {
    flex-direction: column;
  }

  .design-detail-images,
  .design-detail-info {
    max-width: 100%;
  }
}

.outer-molds-wrapper {
  margin-bottom: 20px;
}

.submit-wrapper {
  margin-top: 20px;
}

.pot-3d-preview {
  width: 100%;
  height: 600px;
  display: none;
}

.pot-2d-preview {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: #f5f5f5;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding-top: 0;
}

.pot-2d-preview svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background-color: transparent;
  object-fit: contain;
}

.pot-2d-preview svg path {
  vector-effect: non-scaling-stroke;
  stroke-width: 2;
}

.pot-2d-preview .grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-color: transparent;
}

.pot-2d-preview .grid line {
  stroke: #999;
  stroke-width: 0.5;
}

.pot-2d-preview .grid text {
  fill: #666;
  font-size: 12px;
  pointer-events: none;
}

#back-to-designs {
  background-color: transparent;
  color: var(--dark-color);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--base-font-size);
  font-weight: 700;
  text-align: left;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 0;
  /* Remove margin to align with title */
  position: relative;
  padding-left: 20px;
  transition: color 0.2s;
  width: fit-content;
  margin-left: 0;
  align-self: flex-start;
}

#back-to-designs:before {
  content: "←";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

#back-to-designs:hover {
  color: var(--mid-color);
  background-color: transparent;
}

.info-icon {
  cursor: pointer;
  display: inline-block;
  margin-left: 1px;
  color: var(--mid-color);
  font-weight: bold;
  font-size: 0.75rem;
  vertical-align: 0.4em;
  line-height: 1;
}

.info-icon:hover {
  color: var(--dark-color);
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  background-color: #f5f5f5;
  color: var(--dark-color);
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: absolute;
  z-index: 10;
  /* NOTE: width is actually set in @design-flow-ui.js */
  width: 160px;
  opacity: 0;
  transition: opacity 0.3s;
  top: 25px;
  left: -100px;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transition-delay: 0.5s;
}

/* Make info icons clickable and visible as interactive elements */
.info-icon {
  cursor: pointer;
  user-select: none;
}

/* Ensure tooltips have high z-index when shown via click and no delay */
.tooltip .tooltip-text[style*="visibility: visible"] {
  z-index: 1000;
  transition-delay: 0s !important;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 15px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #ddd transparent;
}

/* Special arrow for volume tooltip when positioned above */
#volume-tooltip-text::after {
  top: 100%;
  bottom: auto;
  border-color: #ddd transparent transparent transparent;
}

/* Preview info container for side-by-side layout */
.preview-info-container {
  display: flex;
  gap: var(--space-lg);
  width: 100%;
}

.info-panel-left,
.info-panel-right {
  flex: 1;
  min-width: 200px;
  /* Prevent too narrow panels that cause wrapping */
}

/* Config controls wrapper for proper reset button positioning */
.config-controls-wrapper {
  margin-top: var(--space-lg);
}

.config-inputs-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.config-input-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
}



/* Reset button styling - simple button that won't move */
.reset-defaults-button {
  background-color: transparent;
  color: var(--mid-color);
  border: 1px solid var(--mid-color);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.reset-defaults-button:hover {
  background-color: rgba(25, 167, 206, 0.1);
}

/* Reset icon button styling - small, subtle icon */
.reset-icon-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 16px;
  border-radius: 3px;
  line-height: 1;
  vertical-align: middle;
}

.reset-icon-button:hover {
  opacity: 1;
  color: var(--mid-color);
  background-color: rgba(0, 0, 0, 0.05);
}

.reset-icon-button:active {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Ensure control groups in configure panel can handle inline layout */
#design-configure .control-group {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

#design-configure .control-group label {
  min-width: 140px;
  line-height: 1.4;
}

#design-configure .control-group input[type="number"],
#design-configure .control-group select {
  width: 80px;
  height: 28px;
  padding: 2px var(--space-xs);
  margin-right: var(--space-xs);
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  font-size: var(--base-font-size);
  box-sizing: border-box;
  vertical-align: middle;
}

/* Wider slip well mode dropdown to accommodate longer text options */
#design-configure .control-group select.slip-well-dropdown,
#design-configure .control-group select.flange-ridges-dropdown,
#design-configure .control-group select.model-type-dropdown,
#design-submit-proof .control-group select.model-type-dropdown {
  width: 140px;
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
  .preview-info-container {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .config-controls-main {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }



  .reset-defaults-button {
    width: auto;
    display: inline-block;
  }

  #design-configure .control-group {
    flex-direction: column;
    align-items: flex-start;
  }

  #design-configure .control-group label {
    min-width: auto;
    margin-bottom: var(--space-xs);
  }
}

/* Specifically override the title top margin without affecting other titles */
#design-step-title {
  margin-top: 0 !important;
}

/* Kebab menu and panel header styles */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.panel-header h1.title {
  margin: 0;
  flex: 1;
}

.title-actions {
  position: relative;
  margin-left: 1rem;
}

.kebab-menu-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--mid-color);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin: 2px;
  border-radius: var(--border-radius-sm);
  line-height: 1;
  min-width: auto;
}

.kebab-menu-btn:hover {
  background-color: var(--hover-light-blue);
  color: var(--dark-color);
}

.kebab-menu-btn:focus {
  outline: 2px solid var(--mid-color);
  outline-offset: 0px;
}

.kebab-menu-popover {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 120px;
  margin-top: 0.25rem;
}

.kebab-menu-popover .menu-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: white;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--dark-color);
  border-radius: 0;
}

.kebab-menu-popover .menu-item:first-child {
  border-top-left-radius: var(--border-radius-sm);
  border-top-right-radius: var(--border-radius-sm);
}

.kebab-menu-popover .menu-item:last-child {
  border-bottom-left-radius: var(--border-radius-sm);
  border-bottom-right-radius: var(--border-radius-sm);
}

.kebab-menu-popover .menu-item:hover {
  background-color: var(--hover-light-blue);
}

.kebab-menu-popover .menu-item:active {
  background-color: var(--light-color);
}

/* Card kebab menu styles - smaller version for design cards */
.card-kebab-menu {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
}

.design-cell {
  position: relative;
}

.card-kebab-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--mid-color);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  margin: 2px;
  border-radius: var(--border-radius-sm);
  line-height: 1;
  min-width: auto;
}

.card-kebab-btn:hover {
  background-color: var(--hover-light-blue);
  color: var(--dark-color);
}

.card-kebab-btn:focus {
  outline: 2px solid var(--mid-color);
  outline-offset: 0px;
}

.card-kebab-popover {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 100px;
  margin-top: 0.25rem;
}

.card-kebab-popover .menu-item {
  display: block;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: none;
  background: white;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--dark-color);
  border-radius: 0;
}

.card-kebab-popover .menu-item:first-child {
  border-top-left-radius: var(--border-radius-sm);
  border-top-right-radius: var(--border-radius-sm);
}

.card-kebab-popover .menu-item:last-child {
  border-bottom-left-radius: var(--border-radius-sm);
  border-bottom-right-radius: var(--border-radius-sm);
}

.card-kebab-popover .menu-item:hover {
  background-color: var(--hover-light-blue);
}

.card-kebab-popover .menu-item:active {
  background-color: var(--light-color);
}

/* Design name display with ellipsis for long names */
.design-name-display span {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}

/* Override design name display styling in modal header to inherit h2 font */
#upgrade-modal-title .design-name-display span {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  flex-shrink: unset;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-family);
  line-height: var(--heading-line-height);
}

/* Vessel Design Pro Mode Visibility Controls */
/* Elements that are shown only in vessel design pro mode */
.vessel-design-pro-mode-controls {
  display: none;
}

/* Elements that are hidden only in vessel design pro mode */
.hide-in-vessel-design-pro-mode {
  display: block;
}

/* When body has vessel-design-pro-mode class, show vessel-design-pro-mode elements and hide non-pro elements */
body.vessel-design-pro-mode .vessel-design-pro-mode-controls {
  display: block;
}

body.vessel-design-pro-mode .hide-in-vessel-design-pro-mode {
  display: none;
}

/* Special case for inline elements that should use inline display */
body.vessel-design-pro-mode .hide-in-vessel-design-pro-mode.inline {
  display: none;
}

.hide-in-vessel-design-pro-mode.inline {
  display: inline;
}



/* Vessel design pro mode gating for parameter containers */
.vessel-design-pro-mode-gated .vessel-design-pro-mode-controls {
  display: none;
}

body.vessel-design-pro-mode .vessel-design-pro-mode-gated .vessel-design-pro-mode-controls {
  display: block;
}

/* Pro Mode Modal Styles */
.modal-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: calc(98vh - var(--header-height));
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0;
}

.modal-header h2 {
  margin: 0;
  color: var(--dark-color);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--mid-color);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--dark-color);
}

.modal-body {
  padding: 0 1.5rem 0 1.5rem;
}

.modal-body p {
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.modal-footer {
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #eee;
}

.upgrade-features-list {
  margin: 1.5rem 0;
  padding-left: 0;
  list-style: none;
}

.upgrade-features-list li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
  color: var(--dark-color);
}

.upgrade-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mid-color);
  font-weight: bold;
}



/* Make modal wider for side-by-side layout */
#vessel-design-upgrade-modal .modal-content {
  max-width: 800px;
  width: 90%;
}

/* Single purchase vs subscription purchase visibility */
#vessel-design-upgrade-modal .subscription-purchase {
  display: none;
}

#vessel-design-upgrade-modal.is-subscription .subscription-purchase {
  display: block;
}

#vessel-design-upgrade-modal.is-subscription .single-purchase {
  display: none;
}

/* Match Pro Info modal width to purchase modal for consistent wrapping */
#vessel-design-pro-info-modal .modal-content {
  max-width: 800px;
  width: 90%;
}

/* Upgrade options container */
.upgrade-options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 0 2rem;
  /* Only horizontal gap between columns */
  margin: 1.0rem 0;
}

/* Create visual cards that span the grid rows */
.basic-option {
  background: #eee;
}

.pro-option {
  background: var(--light-color);
}

/* Apply card styling to columns */
.upgrade-option-header,
.upgrade-option-content,
.upgrade-option-footer {
  box-sizing: border-box;
}


.upgrade-option-header {
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  padding: 1.0rem 2rem 0.5rem 2rem;
  border-bottom: none;
}

.upgrade-option-content {
  padding: 0 2rem;
}

.upgrade-option-footer {
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  padding: 0 2rem 1.125rem 2rem;
  display: flex;
  justify-content: center;
}



/* Make upgrade buttons consistent width and centered */
.upgrade-option-button {
  white-space: nowrap;
  padding: 0.75rem 2rem;
  text-align: center;
  min-width: 0;
  /* Allow flexbox to work */
}

/* Handle hiding columns when basic is purchased */
.upgrade-options-container.basic-hidden {
  grid-template-columns: 1fr;
}

.upgrade-options-container.basic-hidden .basic-option {
  display: none;
}

.upgrade-options-container.pro-hidden {
  grid-template-columns: 1fr;
}

.upgrade-options-container.pro-hidden .pro-option {
  display: none;
}

/* Upgrade modal: single column on mobile */
@media screen and (max-width: 768px) {
  .upgrade-options-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  /* Reorder so Basic card stays together, then Pro card */
  .upgrade-option-header.basic-option {
    order: 1;
  }

  .upgrade-option-content.basic-option {
    order: 2;
  }

  .upgrade-option-footer.basic-option {
    order: 3;
  }

  .upgrade-option-header.pro-option {
    order: 4;
  }

  .upgrade-option-content.pro-option {
    order: 5;
  }

  .upgrade-option-footer.pro-option {
    order: 6;
  }
}

/* Upgrade option titles */
.upgrade-option-header h3 {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--dark-color);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Upgrade option content area - takes up flexible space */
.upgrade-option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.upgrade-option-content ul {
  margin: 0;
}

/* Upgrade option descriptions and lists */
.upgrade-option-content p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}


.modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.modal-buttons button {
  min-width: 120px;
}

/* Vessel design pro mode link button styles for tooltips */
.vessel-design-pro-mode-link {
  background: none;
  border: none;
  color: var(--mid-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  margin: 0;
}

.vessel-design-pro-mode-link:hover {
  color: var(--dark-color);
}

.vessel-design-pro-mode-link:focus {
  outline: 1px solid var(--mid-color);
  outline-offset: 1px;
}

/* Sign-in modal full screen styles */
#signin-modal.modal-overlay {
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  z-index: 9998;
  /* Below header (9999) but above everything else */
  align-items: flex-start;
  padding-top: 2rem;
}

#signin-modal .modal-content {
  max-width: 600px;
  width: 95%;
  max-height: calc(100vh - var(--header-height) - 4rem);
  margin: 0 auto;
  border-radius: var(--border-radius-lg);
}

/* Account Overview Styles */
.account-stat {
  display: flex;
  align-items: baseline;
  margin-bottom: var(--space-md);
}

.stat-number {
  font-size: var(--h1-title-size);
  font-weight: 700;
  color: var(--mid-color);
  margin-right: var(--space-sm);
}

.stat-label {
  font-size: var(--base-font-size);
  color: var(--dark-color);
  font-weight: 400;
}

.account-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.account-actions button {
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.account-actions .primary-button {
  background-color: var(--mid-color);
  color: white;
}

.account-actions .primary-button:hover {
  background-color: var(--dark-color);
}

.account-actions .secondary-button {
  background-color: transparent;
  color: var(--mid-color);
  border: 1px solid var(--mid-color);
}

.account-actions .secondary-button:hover {
  background-color: var(--mid-color);
  color: white;
}



.loading-message,
.no-items-message,
.error-message {
  color: #666;
  font-style: italic;
  padding: var(--space-md);
  text-align: center;
}

.no-items-message a,
.error-message a {
  color: var(--mid-color);
  text-decoration: none;
}

.no-items-message a:hover,
.error-message a:hover {
  text-decoration: underline;
}

.view-all-link {
  text-align: center;
  margin-top: var(--space-md);
}

.view-all-link a {
  color: var(--mid-color);
  text-decoration: none;
  font-size: 0.9em;
}

.view-all-link a:hover {
  text-decoration: underline;
}

/* Note: Using literal 768px instead of var(--mobile-breakpoint) - CSS variables not supported in media queries */
@media screen and (max-width: 768px) {
  .account-actions {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .account-actions button {
    width: 100%;
  }
}

/* Cart Sidebar */
#cart-sidebar {
  position: fixed;
  right: 0;
  top: var(--header-height);
  width: 140px;
  height: calc(100vh - var(--header-height));
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

#cart-sidebar.visible {
  transform: translateX(0);
}

.cart-sidebar-header {
  font-weight: 600;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.cart-sidebar-items-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

#cart-sidebar-items {
  height: 100%;
  overflow-y: auto;
  padding: var(--space-sm);
}

#cart-scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5.0em;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
  display: none;
}

.cart-sidebar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.cart-sidebar-item:last-child {
  margin-bottom: var(--space-lg);
}

.cart-item-name {
  font-size: 0.95em;
  line-height: 1.1;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-price {
  font-size: 0.95em;
  color: #666;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1em;
  padding: 0;
  line-height: 1;
}

.cart-item-remove:hover {
  color: #c00;
}

#cart-sidebar-total {
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

#cart-sidebar-checkout.primary-button {
  width: 100%;
  padding: var(--space-sm);
}

/* Adjust main content when cart is visible */
body.cart-open {
  padding-right: 140px;
}

@media screen and (max-width: 768px) {
  #cart-sidebar {
    width: 120px;
  }

  body.cart-open {
    padding-right: 120px;
  }
}