/* =================================================================== */
/*    PARTIAL: COMPONENTS                                              */
/*    Contains: Styles for reusable UI components like buttons,        */
/*    forms, modals, cards, the command palette, etc.                  */
/* =================================================================== */

/* --- Icon Box --- */
.icon-box {
    position: relative;
    background: var(--border-gradient-onyx);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: var(--orange-yellow-crayola);
    box-shadow: var(--shadow1);
    z-index: 1;
}

.icon-box::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--eerie-black1);
    border-radius: inherit;
    z-index: -1;
}

.icon-box ion-icon {
  --ionicon-stroke-width: 35px;
}

/* --- Generic Content Card --- */
.content-card {
    position: relative;
    background: var(--border-gradient-onyx);
    padding: 15px;
    padding-top: 45px;
    border-radius: 14px;
    box-shadow: var(--shadow2);
    cursor: pointer;
    z-index: 1;
}

.content-card::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--bg-gradient-jet);
    border-radius: inherit;
    z-index: -1;
}

/* --- Avatar Box --- */
.avatar-box {
    background: var(--bg-gradient-onyx);
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* --- Service Item Card --- */
.service-item {
    position: relative;
    background: var(--border-gradient-onyx);
    padding: 20px;
    border-radius: 14px;
    box-shadow: var(--shadow2);
    z-index: 1;
}

.service-item::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--bg-gradient-jet);
    border-radius: inherit;
    z-index: -1;
}

.service-icon-box {
  margin-bottom: 10px;
}
.service-icon-box img {
  margin: auto;
}

.service-content-box {
  text-align: center;
  width: 100%;
}
.service-item-title {
  margin-bottom: 7px;
}

.service-item-text {
    color: var(--light-gray);
    font-size: var(--fs6);
    font-weight: var(--fw300);
    line-height: 1.6;
}
.service-item-text p {
  text-align: left;
}


/* --- Testimonials Modal --- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 20;
    pointer-events: none;
    visibility: hidden;
    
    /* Hide scrollbar on container */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.modal-container::-webkit-scrollbar {
  display: none;
}

.modal-container.active {
    pointer-events: all;
    visibility: visible;
}

.modal-container.active .testimonials-modal {
    transform: scale(1);
    opacity: 1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: hsl(0, 0%, 5%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transition: var(--transition1);
}

.overlay.active {
    opacity: .8;
    visibility: visible;
    pointer-events: all;
}

.testimonials-modal {
    background: var(--eerie-black2);
    position: relative;
    padding: 15px;
    margin: 15px 12px;
    border: 1px solid var(--jet);
    border-radius: 14px;
    box-shadow: var(--shadow5);
    transform: scale(1.2);
    opacity: 0;
    transition: var(--transition1);
    z-index: 2;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--onyx);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white2);
    font-size: 18px;
    opacity: .7;
    z-index: 10;
}

.modal-close-btn:hover, .modal-close-btn:focus {
  opacity: 1;
}
.modal-close-btn ion-icon {
  --ionicon-stroke-width: 50px;
}

.modal-avatar-box {
    background: var(--bg-gradient-onyx);
    width: max-content;
    border-radius: 14px;
    margin-bottom: 15px;
    box-shadow: var(--shadow2);
}

.modal-img-wrapper > img {
  display: none;
}

.modal-title {
  margin-bottom: 4px;
}

.modal-content time {
    font-size: var(--fs6);
    color: var(--light-gray70);
    font-weight: var(--fw500);
    margin-bottom: 10px;
}

.modal-content p {
    color: var(--light-gray);
    font-size: var(--fs6);
    font-weight: var(--fw300);
    line-height: 1.6;
}

/* =================================================================== */
/*    UPDATED: PRODUCT / CATALOG MODAL (Split Layout & Variants)       */
/* =================================================================== */

.project-modal {
  background: var(--eerie-black2);
  position: relative;
  padding: 30px;
  border: 1px solid var(--jet);
  border-radius: 20px;
  box-shadow: var(--shadow5);
  transform: scale(1.2);
  opacity: 0;
  transition: var(--transition1);
  z-index: 2;
  width: 95%;
  max-width: 900px; /* Wider for 2 columns */
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin; 
  scrollbar-color: var(--jet) transparent;
}

.modal-container.active .project-modal {
  transform: scale(1);
  opacity: 1;
}

.project-modal::-webkit-scrollbar { width: 6px; }
.project-modal::-webkit-scrollbar-track { background: transparent; }
.project-modal::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 20px; }
.project-modal:hover::-webkit-scrollbar-thumb { background-color: var(--jet); }
.project-modal::-webkit-scrollbar-thumb:hover { background-color: var(--orange-yellow-crayola); }

/* --- New: Split Layout Grid --- */
.project-modal-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .project-modal-columns {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Left Column: Media & Thumbnails --- */
.project-modal-media {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-modal-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background-color: var(--eerie-black1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--jet);
}

.project-modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Thumbnails Strip */
.modal-thumbnails-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Hide scrollbar but allow scroll */
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
.modal-thumbnails-row::-webkit-scrollbar { display: none; }

.modal-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition1);
    background: var(--eerie-black1);
    object-fit: cover;
    flex-shrink: 0;
}

.modal-thumbnail:hover { opacity: 1; }
.modal-thumbnail.active {
    opacity: 1;
    border-color: var(--orange-yellow-crayola);
    box-shadow: 0 0 10px rgba(255, 172, 51, 0.2);
}

/* --- Right Column: Details & Controls --- */
.project-modal-content {
    display: flex;
    flex-direction: column;
}

.project-modal-title {
    font-size: var(--fs-3);
    margin-bottom: 5px;
    line-height: 1.2;
    color: var(--white2);
}

.price-stock-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--jet);
    padding-bottom: 15px;
}

.project-category {
    font-size: var(--fs-4);
    color: var(--orange-yellow-crayola);
    font-weight: 600;
}

/* Badge Styles */
.stock-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stock-status-badge.in-stock { background: rgba(92, 184, 92, 0.15); color: #5cb85c; border: 1px solid rgba(92, 184, 92, 0.3); }
.stock-status-badge.low-stock { background: rgba(240, 173, 78, 0.15); color: #f0ad4e; border: 1px solid rgba(240, 173, 78, 0.3); }
.stock-status-badge.out-stock { background: rgba(217, 83, 79, 0.15); color: #d9534f; border: 1px solid rgba(217, 83, 79, 0.3); }

/* ... (Keep everything above "Visual Variants" unchanged) ... */

/* --- Visual Variants (Buttons) --- */
.variant-selector-wrapper {
    margin-bottom: 20px;
}

.variant-label {
    display: block;
    color: var(--light-gray);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variant-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-btn {
    background: var(--onyx);
    border: 1px solid var(--jet);
    color: var(--white2);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
    font-family: inherit;
    /* Cleaned up transitions: transform is faster for a "tactile" feel */
    transition: background-color 0.2s, color 0.2s, transform 0.1s, border-color 0.2s, box-shadow 0.2s;
}

.variant-btn:hover {
    background: var(--jet);
    border-color: var(--light-gray70);
    color: var(--white1);
    transform: translateY(-2px);
}

/* Add this to make the button actually move when pressed */
.variant-btn:active {
    transform: scale(0.95);
}

.variant-btn.active {
    background: var(--orange-yellow-crayola);
    border-color: var(--orange-yellow-crayola);
    color: var(--smoky-black);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 172, 51, 0.3);
}

.variant-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--eerie-black1);
    border-color: var(--jet);
    text-decoration: line-through;
}

/* --- Quantity Control --- */
.catalog-actions-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quantity-group {
    flex-shrink: 0;
}

.qty-control {
    display: flex;
    align-items: center;
    background: var(--onyx); /* Darker background */
    border-radius: 8px;
    border: 1px solid var(--jet);
    overflow: hidden;
}

.qty-control button {
    width: 36px;
    height: 38px;
    background: transparent;
    border: none;
    color: var(--white1); /* White + / - */
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-control button:hover {
    background: var(--jet);
    color: var(--orange-yellow-crayola);
}

.qty-input {
    width: 60px !important; /* Increased from 45px */
    text-align: center;
    border: none;
    background: transparent;
    color: var(--white1);
    font-size: 16px; /* Ensure text is readable */
    font-weight: 600;
    padding: 0;
    margin: 0;
    -moz-appearance: textfield; /* Remove spinner on Firefox */
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* Action Buttons Container */
.buttons-group {
    flex-grow: 1;
    display: flex;
    gap: 10px;
}

.buttons-group .form-btn {
    margin: 0; /* Reset margins */
    height: 40px; /* Match Qty height */
}

/* Gallery Arrows (Overlay) */
.gallery-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    backdrop-filter: blur(2px);
}
.gallery-nav-btn:hover {
    background: var(--orange-yellow-crayola);
    color: black;
    border-color: var(--orange-yellow-crayola);
}
.gallery-nav-btn.prev { left: 10px; }
.gallery-nav-btn.next { right: 10px; }

/* --- Forms and Buttons --- */
.form-input {
    color: var(--white2);
    font-size: var(--fs6);
    font-weight: var(--fw400);
    padding: 13px 20px;
    border: 1px solid var(--jet);
    border-radius: 14px;
    outline: none;
}

.form-input::placeholder {
  font-weight: var(--fw500);
}
.form-input:focus {
  border-color: var(--orange-yellow-crayola);
}
.form-input:focus:invalid {
  border-color: var(--bittersweet-shimmer);
}

textarea.form-input {
    min-height: 100px;
    height: 120px;
    max-height: 200px;
    resize: vertical;
}

textarea.form-input::-webkit-realizer {
  display: none;
}

.form-btn {
    position: relative;
    width: 100%;
    background: var(--border-gradient-onyx);
    color: var(--orange-yellow-crayola);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 14px;
    font-size: var(--fs6);
    text-transform: capitalize;
    box-shadow: var(--shadow3);
    z-index: 1;
    transition: var(--transition1);
}

.form-btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--bg-gradient-jet);
    border-radius: inherit;
    z-index: -1;
    transition: var(--transition1);
}

.form-btn ion-icon {
  font-size: 16px;
}

.form-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.form-btn:disabled:hover {
  background: var(--border-gradient-onyx);
}
.form-btn:disabled:hover::before {
  background: var(--bg-gradient-jet);
}

/* --- Custom File Input Styling --- */
.file-upload-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.file-upload-wrapper .form-input[type="file"] {
  opacity: 0;
  position: absolute;
  z-index: -1;
  width: 0.1px;
  height: 0.1px;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: auto;
  flex-shrink: 0; 
  margin: 0;
}

.file-upload-filename {
  margin-left: 15px;
  color: var(--light-gray70);
  font-size: var(--fs7);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Form Feedback Styling --- */
.form-feedback {
  margin-top: 20px;
  padding: 15px;
  border-radius: 14px;
  font-size: var(--fs6);
  text-align: center;
}

.form-feedback.alert-success {
  background-color: hsla(120, 60%, 85%, 1); 
  color: hsl(120, 60%, 15%); 
  border: 1px solid hsl(120, 60%, 75%);
}

.form-feedback.alert-error {
  background-color: hsla(0, 70%, 90%, 1); 
  color: hsl(0, 70%, 20%);
  border: 1px solid hsl(0, 70%, 80%);
}

/* --- UI Toggle Buttons --- */
.ui-toggle-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.ui-toggle-btn {
  background-color: var(--onyx);
  color: var(--white1);
  font-size: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow1);
  transition: var(--transition1);
}

.ui-toggle-btn:hover {
  background-color: var(--jet);
  color: var(--orange-yellow-crayola);
}

.ui-toggle-btn .sun-icon,
.ui-toggle-btn .moon-icon {
  display: none;
}

html.theme-dark .ui-toggle-btn .sun-icon,
html.theme-dracula .ui-toggle-btn .sun-icon,
html.theme-workshop .ui-toggle-btn .sun-icon {
  display: block;
}
html.theme-light .ui-toggle-btn .moon-icon {
  display: block;
}

.ui-toggle-btn ion-icon[name="mouse-outline"] {
  display: block;
}

/* --- Command Palette --- */
.command-palette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: hsla(0, 0%, 0%, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.command-palette {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 90%;
  max-width: 600px;
  background-color: var(--eerie-black2);
  border: 1px solid var(--jet);
  border-radius: 16px;
  box-shadow: var(--shadow5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, transform 0.2s ease-in-out;
  overflow: hidden;
}

.command-palette-overlay.active,
.command-palette.active {
  opacity: 1;
  visibility: visible;
}

.command-palette.active {
  transform: translateX(-50%) scale(1);
}

.command-palette-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--jet);
}

.command-palette-search ion-icon {
  font-size: 20px;
  color: var(--light-gray70);
}

.command-palette-search input {
  width: 100%;
  font-size: var(--fs5);
  color: var(--white2);
  background: none;
  border: none;
  outline: none;
}

.command-palette-results {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}
.command-palette-results::-webkit-scrollbar { width: 8px; }
.command-palette-results::-webkit-scrollbar-track { background: transparent; }
.command-palette-results::-webkit-scrollbar-thumb { background: var(--jet); border-radius: 8px; }

.command-palette-results li a {
  display: flex;
  align-items: center;
  padding: 10px 12px; /* Slightly tighter padding for image layout */
  border-radius: 8px;
  transition: var(--transition1);
}

.command-palette-results li img {
    flex-shrink: 0; /* Don't let image squish */
}

.command-palette-results li a:hover,
.command-palette-results li a:focus {
  background-color: var(--onyx);
}

.command-palette-results .result-title {
  color: var(--light-gray);
}

.command-palette-results .result-type {
  font-size: var(--fs8);
  color: var(--light-gray70);
  background-color: var(--jet);
  padding: 2px 6px;
  border-radius: 4px;
}

.command-palette-footer {
  padding: 8px 16px;
  text-align: right;
  font-size: var(--fs8);
  color: var(--light-gray70);
  border-top: 1px solid var(--jet);
}

.command-palette-footer kbd {
  background: var(--jet);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--onyx);
  font-family: inherit;
}

/* --- Custom Cursor --- */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--orange-yellow-crayola);
}

.cursor-outline {
  width: 30px;
  height: 30px;
  border: 1px solid hsla(45, 100%, 72%, 0.5);
}

/* --- NEW: Interactive Cursor States --- */

/* State when hovering over links/buttons */
html.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(0.5); /* Shrink dot for precision */
  background-color: var(--white1);
}

html.cursor-hover .cursor-outline {
  width: 60px; /* Expand outline */
  height: 60px;
  border-color: var(--orange-yellow-crayola);
  border-width: 2px;
  background-color: hsla(45, 100%, 72%, 0.1); /* Subtle fill */
}

/* State when hovering over "Danger" or "Remove" items */
html.cursor-danger .cursor-outline {
  border-color: var(--bittersweet-shimmer);
  background-color: hsla(0, 43%, 51%, 0.1);
}

html:not(.default-cursor) body {
  cursor: none;
}

html.default-cursor {
  cursor: auto !important;
}

html.default-cursor .cursor-dot,
html.default-cursor .cursor-outline {
  display: none !important;
}


/* --- Back to Top Button --- */
.back-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--onyx);
  color: var(--white1);
  font-size: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow1);
  z-index: 4; 
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition1);
}

.back-to-top-btn.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background-color: var(--jet);
  color: var(--orange-yellow-crayola);
}

/* --- Select Styling --- */
select.form-input {
  background-color: var(--eerie-black2);
  cursor: pointer;
}

select.form-input option {
  background: var(--eerie-black1);
  color: var(--white1);
}

/* --- Product Visualizer Modal --- */
.visualizer-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background-color: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.visualizer-container.active {
  opacity: 1;
  visibility: visible;
}

.visualizer-modal {
  background: var(--eerie-black2);
  border: 1px solid var(--jet);
  border-radius: 16px;
  width: 95vw;
  height: 90vh;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow5);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.visualizer-container.active .visualizer-modal {
  opacity: 1;
  transform: scale(1);
}

.visualizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  border-bottom: 1px solid var(--jet);
  flex-shrink: 0;
}

.visualizer-header .modal-close-btn {
    position: static; 
    transform: none;
}

.visualizer-body {
  display: grid;
  grid-template-columns: 300px calc(100% - 480px) 300px;
  flex-grow: 1;
  overflow: hidden;
}

/* Info Panel on the left */
.visualizer-info-panel {
  width: 240px;
  flex-shrink: 0; 
  padding: 20px;
  border-right: 1px solid var(--jet);
  display: flex;
  align-items: flex-end;
}

.visualizer-disclaimer {
    width: 100%;
    font-size: var(--fs8);
    color: var(--light-gray70);
    line-height: 1.6;
}

.visualizer-canvas-container {
  flex-grow: 1; 
  padding: 15px;
  background-color: var(--onyx);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  min-width: 0; 
}

/* This is a wrapper around the canvas element set by Fabric.js */
.canvas-container {
  box-shadow: var(--shadow3);
}

.visualizer-toolbar {
  width: 240px;
  flex-shrink: 0;
  padding: 20px;
  border-left: 1px solid var(--jet);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  
  scrollbar-width: thin;
}

.visualizer-toolbar::-webkit-scrollbar { width: 6px; }
.visualizer-toolbar::-webkit-scrollbar-track { background: transparent; }
.visualizer-toolbar::-webkit-scrollbar-thumb { background: var(--orange-yellow-crayola); border-radius: 8px; }


.visualizer-toolbar .tool-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visualizer-toolbar .tool-group label {
    font-size: var(--fs7);
    color: var(--light-gray70);
}

.visualizer-toolbar .form-btn {
    width: 100%;
}

.visualizer-footer {
    margin-top: auto; 
    padding-top: 20px;
    border-top: 1px solid var(--jet);
}


/* =================================================================== */
/*    NEW THEME-AWARE NPROGRESS BAR                                    */
/* =================================================================== */
#nprogress .bar {
  background: var(--orange-yellow-crayola) !important;
}

#nprogress .peg {
  box-shadow: 0 0 10px var(--orange-yellow-crayola), 0 0 5px var(--orange-yellow-crayola) !important;
}

#nprogress .spinner-icon {
  border-top-color: var(--orange-yellow-crayola) !important;
  border-left-color: var(--orange-yellow-crayola) !important;
}

#visualizer-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  background-color: var(--onyx);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#visualizer-placeholder.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.visualizer-canvas-container {
    position: relative; 
}

/* --- Mobile Customization Warning Logic --- */
.mobile-visualizer-msg {
  display: none;
  width: 100%;
  margin-top: 15px;
  padding: 15px;
  background: var(--bg-gradient-jet);
  border: 1px solid var(--jet);
  border-radius: 12px;
  text-align: center;
  color: var(--light-gray70);
}

.mobile-visualizer-msg ion-icon {
  margin: 0 auto 10px;
  font-size: 24px;
  color: var(--orange-yellow-crayola);
}

.mobile-visualizer-msg p {
  font-size: var(--fs-7);
  line-height: 1.5;
}

@media (max-width: 900px) {
  [data-catalog-detail-customize-btn] {
    display: none !important;
  }
  .mobile-visualizer-msg {
    display: block;
  }
}

button[data-cursor-toggler] {
  display: none;
}

/* --- Visualizer Disclaimer Note --- */
.visualizer-note {
  border: 1px solid var(--orange-yellow-crayola);
  background: var(--bg-gradient-jet); /* Matches the card background style */
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: var(--fs-7);
  color: var(--light-gray);
  line-height: 1.5;
  box-shadow: var(--shadow1);
  animation: fade 0.3s ease-in-out;
}

/* =================================================================== */
/*    NEW: OFFCANVAS CART DRAWER (SLIDE-IN SIDEBAR)                    */
/* =================================================================== */

/* 1. Overlay (Dims Background) */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 199; /* Just below drawer */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 2. The Drawer Itself */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw; /* Responsive constraint */
    height: 100%;
    background: var(--eerie-black2);
    border-left: 1px solid var(--jet);
    box-shadow: var(--shadow5);
    z-index: 200; /* Highest UI element */
    transform: translateX(100%); /* Hidden by default */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

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

/* 3. Header */
.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--jet);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-gradient-jet);
}

.cart-sidebar-header .h3 {
    margin: 0;
    font-size: var(--fs-4);
    color: var(--white2);
}

.cart-sidebar-header .modal-close-btn {
    position: static; /* Override absolute positioning from general modal style */
    transform: none;
    background: var(--onyx);
}

/* 4. Body (Scrollable List) */
.cart-sidebar-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

/* 5. Footer (Checkout) */
.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--jet);
    background: var(--eerie-black2);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: var(--fs-5);
    font-weight: 600;
    color: var(--white2);
}

.cart-total-row span:last-child {
    color: var(--orange-yellow-crayola);
}

/* 6. Individual Item Styles in Drawer */
.cart-drawer-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--border-gradient-onyx);
    border-radius: 12px;
    margin-bottom: 10px;
    position: relative;
    border: 1px solid var(--jet);
}

.cart-drawer-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--onyx);
    flex-shrink: 0;
    object-fit: cover;
}

.cart-drawer-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-drawer-title {
    font-size: var(--fs-7);
    color: var(--white2);
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-drawer-meta {
    font-size: 11px;
    color: var(--light-gray70);
}

.cart-drawer-price {
    color: var(--orange-yellow-crayola);
    font-weight: 600;
}

.cart-drawer-remove {
    background: transparent;
    border: none;
    color: var(--bittersweet-shimmer);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    align-self: center;
    opacity: 0.7;
    transition: var(--transition1);
}

.cart-drawer-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* --- Success Animation State --- */
.form-btn.success {
    background: var(--bg-gradient-yellow1) !important;
    color: var(--smoky-black) !important;
    border-color: var(--orange-yellow-crayola) !important;
    box-shadow: 0 0 20px rgba(255, 172, 51, 0.4) !important;
    transform: translateY(-2px);
}

/* We must color the inner 'ghost' layer too */
.form-btn.success::before {
    background: var(--bg-gradient-yellow1) !important;
    opacity: 0.8;
}

/* =================================================================== */
/*    ORDER TRACKER (VISUAL TIMELINE)                                  */
/*    Add to the very bottom of _components.css                        */
/* =================================================================== */

.order-tracker {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 30px 0; /* Increased margin for spacing */
    position: relative;
    width: 100%;
}

/* Connecting Line Background */
.order-tracker::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--jet);
    z-index: 0;
}

.tracker-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
    text-align: center;
}

/* The Icon Circle */
.tracker-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--eerie-black2); 
    border: 2px solid var(--jet);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: var(--light-gray70);
    transition: all 0.3s ease;
    margin-bottom: 8px;
    box-shadow: 0 0 0 4px var(--eerie-black2); /* Creates gap around line */
}

/* The Label Text */
.tracker-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--light-gray70);
    font-weight: 500;
    transition: color 0.3s ease;
}

/* --- ACTIVE STATE (Current Step) --- */
.tracker-step.active .tracker-icon {
    border-color: var(--orange-yellow-crayola);
    color: var(--orange-yellow-crayola);
    box-shadow: 0 0 15px rgba(255, 172, 51, 0.4); /* Glow effect */
    background: var(--bg-gradient-jet);
}

.tracker-step.active .tracker-label {
    color: var(--white2);
    font-weight: 700;
}

/* --- COMPLETED STATE (Past Steps) --- */
.tracker-step.completed .tracker-icon {
    background: var(--orange-yellow-crayola);
    border-color: var(--orange-yellow-crayola);
    color: var(--smoky-black);
}

.tracker-step.completed .tracker-label {
    color: var(--orange-yellow-crayola);
}

/* --- ANIMATION FOR "CRAFTING" STEP --- */
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(255, 172, 51, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 172, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 172, 51, 0); }
}

.tracker-step.active[data-step="crafting"] .tracker-icon {
    animation: pulse-ring 2s infinite;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .tracker-label { font-size: 8px; }
    .tracker-icon { width: 28px; height: 28px; font-size: 12px; }
    .order-tracker::before { top: 13px; }
}

/* =================================================================== */
/*    WISHLIST / FAVORITES SYSTEM                                      */
/* =================================================================== */

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20; /* Much higher than card link (z-index: 1) */
    background: rgba(0, 0, 0, 0.4);
    color: var(--white2);
    width: 40px; /* Bigger touch target */
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px; /* Bigger icon */
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    padding: 0; /* Reset padding */
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.wishlist-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.15);
    color: white;
}

.wishlist-btn.active {
    color: var(--bittersweet-shimmer); /* Red */
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--bittersweet-shimmer);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

/* Ensure inner icon does not capture clicks */
.wishlist-btn ion-icon {
    pointer-events: none; 
}

/* Pulse animation on click */
.wishlist-btn:active {
    transform: scale(0.9);
}

/* IMPORTANT: Ensure card link doesn't cover the button */
.store-card > a, .project-item > a {
    z-index: 1; /* Lower than button */
}

/* =================================================================== */
/*    MODAL ENTRANCE ANIMATIONS (Wow Factor)                           */
/* =================================================================== */

/* Define a specific slide-in for the modal content */
@keyframes modalContentSlideUp {
    from { 
        opacity: 0; 
        transform: translateY(15px); /* Subtle slide */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* 
   We default these elements to opacity: 0 
   ONLY when the modal wrapper has the .active class.
   This ensures they are ready to animate when opened.
*/

.modal-container.active .project-modal-title {
    opacity: 0;
    animation: modalContentSlideUp 0.5s ease-out forwards;
    animation-delay: 0.2s; /* Start after modal zoom begins */
}

.modal-container.active .price-stock-row {
    opacity: 0;
    animation: modalContentSlideUp 0.5s ease-out forwards;
    animation-delay: 0.3s;
}

.modal-container.active .variant-selector-wrapper {
    opacity: 0;
    animation: modalContentSlideUp 0.5s ease-out forwards;
    animation-delay: 0.35s;
}

/* The Quantity/Buttons Row */
.modal-container.active .catalog-actions-row {
    opacity: 0;
    animation: modalContentSlideUp 0.5s ease-out forwards;
    animation-delay: 0.4s;
}

/* The Description Text */
.modal-container.active .project-modal-description {
    opacity: 0;
    animation: modalContentSlideUp 0.6s ease-out forwards;
    animation-delay: 0.5s;
}

/* 
   Optional: Image Entrance 
   Make the main image scale in slightly after the modal opens
*/
.modal-container.active .project-modal-img-wrapper img {
    animation: scaleUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =================================================================== */
/*    BRANDED PLACEHOLDERS (No Image State)                            */
/* =================================================================== */

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--eerie-black1); /* Matches the card vibe */
    color: var(--light-gray70);
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
}

.no-image-placeholder ion-icon {
    font-size: 48px;
    color: var(--orange-yellow-crayola);
    opacity: 0.5;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.no-image-placeholder span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--light-gray70);
}

/* Hover Effect for the Placeholder */
.project-item > a:hover .no-image-placeholder ion-icon,
.store-card:hover .no-image-placeholder ion-icon {
    transform: scale(1.2);
    opacity: 1;
    color: var(--vegas-gold);
}

/* =================================================================== */
/*    PRODUCT GRID STATUS BADGES                                       */
/* =================================================================== */

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

/* Red for Sold Out */
.card-badge.sold-out {
    background-color: var(--bittersweet-shimmer);
    color: var(--white1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Optional: Orange for Low Stock if you want it later */
.card-badge.low-stock {
    background-color: var(--orange-yellow-crayola);
    color: var(--eerie-black2);
}

/* =================================================================== */
/*    SKELETON LOADING UI                                              */
/* =================================================================== */

/* The Base Shimmer Animation */
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-box {
    background: linear-gradient(90deg, 
        var(--eerie-black1) 25%, 
        var(--onyx) 50%, 
        var(--eerie-black1) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 12px;
    border: 1px solid var(--jet);
}

/* Skeleton Structural Layouts */
.skeleton-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.skeleton-header {
    height: 40px;
    width: 200px;
    margin-bottom: 20px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.skeleton-card {
    height: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

.skeleton-img-circle {
    height: 150px;
    width: 150px;
    border-radius: 50%;
    margin: 0 auto;
}

.skeleton-line {
    height: 12px;
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
}

/* Ensure skeleton content fades out smoothly when real content arrives */
#swup.is-changing {
    transition: opacity 0.2s ease-in-out;
}