/* Overlay & Loading */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 44, 44, 0.75); /* softer overlay */
  z-index: 999;
  display: none;
}
.overlay.active {
  display: block;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--background-color);
}
.loading-circle {
  width: 40px;
  height: 40px;
  stroke: var(--accent-color);
}

/* Markdown */
.markdown-block p {
  margin: 0 0 8px;

}
.description_sec{
  border-radius: 1.2rem;
  border: 2px solid var(--border-color);
  padding: 10px;
  background-color: #0000003b;
}
.markdown-block code {
  color: var(--text-color);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
}
.markdown-block pre {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0;
  margin: 8px 0;
}
.markdown-block pre code {
  display: block;
  padding: 10px;
  overflow-x: auto;
  background: transparent;
}
.markdown-block strong {
  font-weight: 600;
}
.markdown-block em {
  font-style: italic;
}
.markdown-block u {
  text-decoration: underline;
}

/* No Product Banner */
.no-product-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
  margin: 30px auto;
  box-shadow: 0 2px 8px var(--shadow-color);
}
.no-product-banner h2 {
  font-size: 1.4rem;
  color: var(--accent-color);
}
.no-product-banner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.contact-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--button-bg);
  color: var(--button-text);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}
.contact-btn:hover {
  background: var(--button-hover);
}

/* Product Detail Card */
.product-detail-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 14px var(--shadow-color);
  max-width: 1100px;
  margin: 20px auto;
}

/* Image Gallery */
.left-col {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.main-image {
  width: 100%;
  aspect-ratio: 1/1;
  border: 2px solid var(--coral-peach);
  border-radius: 10px;
  overflow: hidden;
  background: var(--background-color);
  cursor: zoom-in;
}
.main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thumbs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.thumb {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  background: var(--background-color);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.thumb:hover {
  transform: scale(1.05);
  border-color: var(--accent-color);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.right-col {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
}
.brand-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-text-brand);
}
.category-genre {
  font-size: 0.85rem;
  color: var(--secondary-text);
}

/* Price */
.price-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.price-now {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}
.price-old {
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--text-muted);
}
.price-unspecified {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--expired-bg);
  white-space: nowrap;
}
.currency {
  font-size: 0.85rem;
  margin-left: 2px;
}
.badge-promo {
  background: var(--expired-bg);
  color: var(--expired-text);
  padding: 3px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  margin-left: 4px;
}

/* Stock Chip */
.stock-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}
.stock-chip.in-stock {
  background: var(--success-bg);
  color: var(--success-text);
}
.stock-chip.out-of-stock {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Info Sections */
.description, .additional, .colors, .dimensions {
  padding-top: 6px;

}
.description h3,
.additional h3,
.colors h3,
.dimensions h3 {
  font-size: 0.9rem;
  color: var(--accent-color);
}
.description p,
.additional p,
.colors p,
.dimensions p {
  font-size: 0.80rem;
  color: var(--text-muted);
  background-color: var(--background-color);
  border-radius: 1.2rem;
  border: 1px solid var(--border-color);
  padding: 10px;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  z-index: 1000;
}
.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  border: 2px solid var(--coral-peach);
}

/* Scrollbar */
.thumbs-container::-webkit-scrollbar {
  height: 4px;
}
.thumbs-container::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 2px;
}

/* Color dots */
.color-circle {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow-color);
  margin-right: 0.5rem;
  vertical-align: middle;
}
.colors-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;       /* allow wrap on small screens */
  gap: 8px;              /* consistent spacing */
  margin: 0.3rem 0;
}

/* Dimensions canvas container */
.dimensions-canvas-holder {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
/* SVG dimensions panel */
.dimensions-canvas-holder {
  margin-top: 8px;
  display: block;
}

.dimensions-grid {
  display:flex;
  flex-direction: column;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.dimension-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 2px 6px var(--shadow-color);
}

.dimension-icon {
  width: 48px;
  height: auto;
  flex: 0 0 auto;
  filter: grayscale(1) opacity(0.9); /* keeps icons subtle on both themes */
}
[data-theme="light"] .dimension-icon {
  filter: brightness(0) saturate(100%) invert(0);
}

/* Dark theme: show white */
[data-theme="dark"] .dimension-icon {
  filter: brightness(0) saturate(100%) invert(1);
}

.dimension-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dimension-label {
  font-size: 0.88rem;
  color: var(--secondary-text-brand);
  line-height: 1.2;
}

.dimension-value {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .dimension-icon { width: 42px; }
  .dimension-label { font-size: 0.84rem; }
  .dimension-value { font-size: 0.9rem; }
}

.dims-canvas {
  width: 300px;   /* CSS size; JS sets internal high-DPI size */
  height: 200px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 2px 6px var(--shadow-color);
}


.purchase-block {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  background: var(--secondary-bg);
}

.qty-row, .lenses-row { margin-bottom: 10px; }
.qty-row label { font-size: .9rem; color: var(--secondary-text-brand); margin-right: 8px; }
.qty-select { padding: 6px 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--background-color); color: var(--text-color); }

.btn-lenses-toggle, .btn-add-cart, .btn-add-cart-direct, .file-label .file-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-color);
  cursor: pointer; background: var(--secondary-bg); color: var(--text-color);
}

.btn-lenses-toggle:hover, .file-label .file-btn:hover { background: var(--footer-bg); }
.btn-add-cart, .btn-add-cart-direct { margin-top: 6px; background: var(--button-bg); color: var(--button-text); border-color: transparent; }
.btn-add-cart:hover { background: var(--button-hover); }
.btn-add-cart-direct:hover { background: var(--button-hover); }
.lenses-panel { margin-top: 10px; border-top: 1px solid var(--border-color); padding-top: 10px; }
.file-list { margin-top: 8px; font-size: .85rem; color: var(--secondary-text-brand); }
.file-ul { list-style: none; padding: 0; margin: 0; }
.file-ul li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.file-ul .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.file-ul .upload-row .prog {
  margin-left: 8px;
  font-weight: 600;
  color: var(--secondary-text-brand);
}
.file-ul .meta { color: var(--secondary-text); font-size: .82rem; }
.lenses-note textarea {
  width: 90%; resize: vertical; border-radius: 8px; padding: 8px 10px;
  border: 1px solid var(--border-color); background: var(--background-color); color: var(--text-color);
}

.btn-contact-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
  background: var(--footer-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: background 0.5s ease, transform 0.30s ease;
  white-space: nowrap;        /* 🔑 prevent wrapping */
  overflow: hidden;           /* avoid overflow issues */
  text-overflow: ellipsis;    /* fallback: ellipsis if too long */
}

.btn-contact-product:hover {
  background: var(--button-hover);
  color: var(--button-text);
  transform: translateY(2px);
}

/* On small screens, adjust font-size if needed */
@media (max-width: 600px) {
  .btn-contact-product {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}



.addcart-feedback { margin-top: 8px; font-size: .9rem; }


.color-row { margin-bottom: 12px; }
.color-label { display:inline-block; font-size:.9rem; color:var(--secondary-text-brand); margin-bottom:6px; }
.color-select-list { display:flex; gap:8px; flex-wrap:wrap; }
.color-option {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow-color);
  cursor: pointer; padding:0; outline: none;
}
.color-option.selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 20%, transparent);
}
.color-selected-name {
  margin-top: 6px; font-size: .9rem; color: var(--secondary-text-brand);
}
@media (max-width: 600px) {
  .color-option { width: 24px; height: 24px; }
}



/* Exclusive Product Notice */
.exclusive-box {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px dashed var(--accent-color);
  border-radius: 10px;
  background: var(--secondary-bg);
  box-shadow: 0 2px 8px var(--shadow-color);
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

.ex-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ex-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.ex-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--button-text);
  transition: background 0.2s ease, transform 0.15s ease;
}

.ex-contact-btn:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}


.verres-selection-container {
    margin-bottom: 10px; /* Space below the select */
}

.verres-selection-container label {
    font-size: .9rem; /* Match other labels */
    color: var(--secondary-text-brand); /* Match other labels */
    margin-right: 8px; /* Space between label and select */
    display: block; /* Ensure label is on its own line */
    margin-bottom: 5px;
}

.verres-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 1em;
}

.verres-note {
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--warning-bg); /* Or another appropriate color */
    display: none; /* Hidden by default */
}

.summary-item.lenses-line {
    font-size: 0.85em; /* Slightly smaller font */
    color: var(--text-muted); /* Muted color */
    /* Or use a specific color */
    /* color: #555; */
    border-left: 2px solid var(--accent-color); /* Indent with a border */
    padding-left: 8px;
    margin-left: 10px; /* Indent slightly */
}

/* Ensure it appears just below the main item line */
.summary-item.lenses-line {
    margin-top: 2px;
    margin-bottom: 2px;
}

.btn-row {
    display: flex;
    margin-top: 10px;
    align-items: center;

    justify-content: space-evenly;
}

