/* === Global Resets & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}
body {
    background-image: url(background.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
}
.page-content-wrapper {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 90px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
a {
    text-decoration: none;
    color: white;
}
hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    margin: 30px 0;
}
footer {
    text-align: center;
    margin-top: 40px;
}
footer small {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black, -1px -1px 2px black;
}

/* === Loading Screen === */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 29, 0.98);
    z-index: 10005;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    opacity: 1;
}
#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loading-content {
    text-align: center;
    color: #f0f0f0;
}
.loading-content p {
    margin-top: 20px;
    font-size: 1.2rem;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid gray;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Navbar & Header === */
.navbar {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10002;
}
.dropdown {
    position: relative;
    display: inline-block;
}
.logo-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}
.logo-container:hover {
    background-color: rgba(60, 60, 63, 0.9);
}
.logo-container img {
    max-width: 200%;
    max-height: 200%;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2d2d30;
    border: 1px solid #444;
    border-radius: 6px;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1;
    top: 100%;
    left: 0;
    padding: 8px 0;
    margin-top: 5px;
}
.dropdown-content a {
    color: #f0f0f0;
    padding: 12px 20px;
    display: block;
}
.dropdown-content a:hover {
    background-color: white;
    color: black;
}
header {
    margin-bottom: 30px;
}
.header-logo {
    max-width: 300px;
    height: auto;
    border-radius: 3%;
}

/* === Content & Forms === */
.content-block {
    background-color: #2d2d30;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #333;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    color: white;
}
h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: white;
}
h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}
h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}
.form-group {
    text-align: center;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #1a1a1d;
    color: #f0f0f0;
    font-size: 1rem;
}
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}
.checkbox-group:hover label {
    color: #4a90e2;
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: #27ae60;
}
.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 10px;
}
.error-message {
    font-weight: bold;
    margin-top: 15px;
    display: none;
    color: #e74c3c;
}
.success-message {
    font-weight: bold;
    margin-top: 15px;
    display: none;
    color: #2ecc71;
}
#employee-select,
#manager-employee-select,
#login-employee-select {
    text-align: center;
    text-align-last: center;
}

/* === Buttons === */
button,
.action-button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: rgba(26, 26, 29, 0.5);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
button:hover,
.action-button:hover {
    background-color: #888;
    transform: translateY(-1px);
}
button:disabled {
    background-color: #555 !important;
    color: #888 !important;
    cursor: not-allowed;
    transform: none;
}
.clear-button {
    background-color: #c0392b;
}
.clear-button:hover {
    background-color: #e74c3c;
}
.clock-in-btn {
    background-color: #27ae60;
    color: white;
}
.clock-in-btn:hover {
    background-color: #2ecc71;
}
.clock-out-btn {
    background-color: #c0392b;
    color: white;
}
.clock-out-btn:hover {
    background-color: #e74c3c;
}

/* === Specific Components & Converted Inline Styles === */
#employee-login-container,
#manager-login-container,
#sop-login-container {
    max-width: 450px;
}

#employee-content,
#sop-content,
#manager-content,
.interiors-page-block { /* Generic class for interiors page */
    display: none;
    width: 100%;
}

#employee-content {
    max-width: 800px;
}

#manager-content {
    max-width: 1100px;
}

#sop-content {
    max-width: 1000px;
}

.interiors-page-block {
    max-width: 1200px;
}

#time-clock-interface {
    display: none;
}

#clock-out-btn {
    display: none;
}

#cancel-edit-btn {
    display: none;
}

#welcome-message {
    display: none;
    color: #f0f0f0;
    border-bottom: none;
    margin-bottom: 20px;
}

#commission-calculator-section {
    margin-top: 30px;
    background-color: transparent;
    border: none;
    padding: 0;
}

#export-logs-btn,
#export-transactions-btn {
    margin-bottom: 20px;
}

#password-status {
    display: none;
}

#sop-login-container p {
    margin-bottom: 20px;
}

.interiors-page-block h2 {
    margin-bottom: 20px;
}

.status-box {
    background-color: rgba(26, 26, 29, 0.7);
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    margin: 20px 0;
}
#time-clock-controls {
    margin-bottom: 15px;
}
.log-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: rgba(26, 26, 29, 0.5);
    padding: 10px;
    text-align: left;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th,
td {
    padding: 10px;
    border-bottom: 1px solid #444;
}
th {
    background-color: #2d2d30;
    text-align: left;
}
tr:nth-child(even) {
    background-color: rgba(60, 60, 63, 0.3);
}
.employee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #444;
}
#employee-list .employee-item:last-child {
    border-bottom: none;
}
#employee-list .employee-details {
    text-align: left;
}

.employee-actions button {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.employee-actions button + button {
    margin-left: 10px;
}

/* --- Collapsible Calculator --- */
.collapsible-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}
.collapsible-header h2 {
    border-bottom: none;
    margin-bottom: 0;
}
.collapsible-header button {
    font-size: 0.8rem;
    padding: 5px 10px;
}
#calculator-content-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding-top 0.5s ease-in-out, margin-top 0.5s ease-in-out;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}
#calculator-content-wrapper.open {
    max-height: 1500px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
}
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}
.calculator-box {
    background-color: rgba(26, 26, 29, 0.5);
    padding: 20px;
    border-radius: 8px;
}
.calculator-box h3 {
    text-align: center;
    margin-top: 0;
}
.calculator-box input[type="number"] {
    text-align: center;
    font-size: 1.1rem;
}
.result-display {
    margin-top: 15px;
    font-size: 1.2rem;
    text-align: center;
}
.result-display strong {
    color: #2ecc71;
    font-size: 1.4rem;
}
.calculator-actions {
    text-align: center;
}
@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* --- SOP Page --- */
.pdf-container {
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

/* --- Interior Gallery Page --- */
#filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}
.filter-btn {
    background-color: #3a3a3d;
    color: #f0f0f0;
}
.filter-btn.active {
    background-color: #4a90e2;
    color: #fff;
}
.interior-category {
    margin-bottom: 40px;
}
.interior-category h2 {
    text-align: left;
    color: white;
    margin-bottom: 20px;
}
.interior-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}
.interior-item {
    background-color: #2d2d30;
    border: 1px solid #444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
    transition: background-color 0.2s;
}
.interior-item:hover {
    background-color: #3a3a3d;
}
.interior-preview {
    flex-shrink: 0;
}
.preview-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #555;
}
.interior-details {
    flex-grow: 1;
    text-align: left;
    min-width: 0;
}
.interior-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #f0f0f0;
    white-space: nowrap;
}
.interior-note {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    font-style: italic;
}
.copy-link {
    background-color: #1a1a1d;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    border: 1px solid #555;
    transition: background-color 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}
.copy-link:hover {
    background-color: #4a90e2;
    color: white;
}
.copy-link input {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
}

/* --- Flyer Styles --- */
.flyer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.flyer-item {
    background-color: #2d2d30;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.flyer-preview {
    width: 100%;
    height: 250px;
    background-color: #1a1a1d;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    background-color: transparent;
}
.flyer-image {
    max-width: 100%;
    max-height: 100%;
    cursor: pointer;
}
.flyer-item h3 {
    text-align: center;
    margin: 0;
    color: #f0f0f0;
    font-size: 1.1rem;
}
.flyer-item .copy-link {
    width: 50%;
    margin: 0 auto;
}

/* --- Lightbox Styles --- */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10010;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s;
}
#lightbox-close:hover {
    color: #ccc;
}
/* === Contact Us Page Styles === */

#contact-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.contact-card {
    background-color: #2d2d30;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    /* Added for the hover effect */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.contact-card:hover {
    transform: translateY(-5px); /* Lifts the card up slightly */
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.contact-card-left {
    flex-basis: 120px;
    flex-shrink: 0;
    text-align: center;
}
.contact-profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4a90e2;
    margin-bottom: 10px;
}
.contact-name {
    margin: 0;
    font-size: 1.2rem;
    border: none;
    padding: 0;
}
.contact-phone {
    font-size: 1rem;
    color: #ccc;
    margin-top: 5px;
}

.contact-card-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.contact-business-card {
    max-width: 250px;
    width: 100%;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    cursor: pointer; /* Makes the card look clickable */
}

/* This targets the copy button on this page specifically */
.contact-card-right .copy-link {
    width: 75%;          /* Makes the button narrower */
    max-width: 200px;    /* Prevents it from getting too wide */
    margin: 0 auto;      /* Centers the button horizontally */
}

/* --- Manager Form Section Titles --- */

.form-section-title {
    text-align: left;
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #4a90e2;
}

.form-note {
    text-align: left;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 15px;
}

.calculator-flyer-container {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #444;
}

.calculator-flyer-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

/* REPLACE the entire Personal Ads Section Styles block in D8.css */

/* --- Personal Ads Section Styles --- */

#personal-ads-section .subsection-title {
    text-align: left;
    margin-top: 25px;
    font-size: 1.1rem;
    color: #ccc;
    border: none; /* Remove any inherited borders */
    padding-bottom: 0; /* Remove inherited padding */
}

/* 
  The .ad-item uses .employee-item for its base structure (flexbox, border, padding).
  This ensures it matches the look of other lists on the site.
*/
.ad-item {
    align-items: center; /* Vertically center the content and buttons */
    flex-wrap: wrap; 
}

.ad-details {
    flex-grow: 1; /* Allows text to take up available space */
    text-align: left;
    word-break: break-word; 
    padding-right: 15px; /* Space between text and buttons */
}

.ad-content {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #f0f0f0;
}

.ad-details small {
    font-size: 0.8rem;
    color: #aaa;
}

.ad-actions {
    display: flex;
    gap: 8px; /* Space between buttons */
    flex-shrink: 0; /* Prevents buttons from shrinking */
    margin-left: auto; /* Pushes the buttons to the far right */
}

.ad-actions button {
    font-size: 0.8rem;
    padding: 5px 10px;
    margin-left: 0; /* Override any inherited margins */
}
/* This adds the textarea to the main group of styled form elements */
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #1a1a1d;
    color: #f0f0f0;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* This adds specific behaviors for textareas, like resizing */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
/* ====================================================
   INTERIOR DECORATOR — INDEX PAGE ADDITIONS
   ==================================================== */

/* --- Style Tag Chips --- */
.style-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 6px;
    background-color: #1a1a1d;
    margin-bottom: 4px;
}
.style-tag {
    background-color: #4a90e2;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}
.style-tag:hover { background-color: #c0392b; }
.no-tags { color: #666; font-style: italic; font-size: 0.85rem; }

/* --- Decorator Projects Scroll Container --- */
.decorator-projects-scroll {
    max-height: 580px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    background-color: rgba(26, 26, 29, 0.4);
}

/* --- Project Cards --- */
.project-card {
    background-color: #2d2d30;
    border: 1px solid #444;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.project-card:last-child { margin-bottom: 0; }
.project-card:hover { border-color: #4a90e2; }
.project-card.project-deleted { border-color: #c0392b; opacity: 0.75; }

.project-card-header {
    padding: 13px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.project-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 1rem;
    color: #f0f0f0;
}
.project-card-meta { font-size: 0.82rem; color: #aaa; }
.project-style-badge {
    background-color: #3a3a3d;
    border: 1px solid #555;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    color: #ccc;
}
.deleted-badge {
    background-color: #c0392b;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: white;
}
.dec-cut-highlight { color: #2ecc71; font-weight: 700; }
.project-expand-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
    align-self: flex-start;
    margin-top: 2px;
}

.project-card-body {
    padding: 16px;
    border-top: 1px solid #444;
    background-color: rgba(26, 26, 29, 0.3);
    text-align: left;
}
.project-card-body p {
    margin-bottom: 8px;
    font-size: 0.93rem;
    color: #ccc;
}

/* --- Project Items Table --- */
.project-items-table { width: 100%; margin: 12px 0; font-size: 0.88rem; }
.project-items-table th { background-color: #1a1a1d; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.project-items-table tfoot td { border-top: 2px solid #555; font-weight: 600; color: #f0f0f0; }

/* --- Project Actions --- */
.project-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.project-actions button { font-size: 0.8rem; padding: 7px 13px; }

/* --- Project Form --- */
.proj-cuts-box {
    background-color: rgba(26, 26, 29, 0.6);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 8px;
    font-size: 0.93rem;
    color: #ccc;
}
.proj-items-header {
    display: grid;
    grid-template-columns: 1fr 70px 110px 90px 36px;
    gap: 6px;
    padding: 6px 4px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #aaa;
    border-bottom: 1px solid #444;
    text-align: left;
}
.proj-item-row {
    display: grid;
    grid-template-columns: 1fr 70px 110px 90px 36px;
    gap: 6px;
    align-items: center;
    padding: 5px 4px;
    border-bottom: 1px solid #333;
}
.proj-item-row input {
    padding: 7px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #1a1a1d;
    color: #f0f0f0;
    font-size: 0.88rem;
    width: 100%;
}
.proj-item-row input[readonly] {
    background-color: #111113;
    color: #888;
    border-color: #333;
    cursor: not-allowed;
}
.item-row-total { color: #2ecc71; font-size: 0.88rem; font-weight: 600; text-align: right; }
.remove-item-btn { font-size: 0.75rem; padding: 4px 7px; background-color: #c0392b; }
.remove-item-btn:hover { background-color: #e74c3c; }
.notes-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.83rem; color: #ccc; }

/* ====================================================
   PUBLIC DECORATORS PAGE (decorators.html)
   ==================================================== */
.decorator-public-card {
    background-color: #2d2d30;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.decorator-public-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,0.4); }

.dec-card-top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }

.dec-public-headshot {
    width: 110px; height: 110px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid #4a90e2; flex-shrink: 0;
}
.dec-no-photo {
    display: flex; justify-content: center; align-items: center;
    background-color: #1a1a1d; color: #666; font-size: 0.85rem;
}
.dec-card-info { flex-grow: 1; text-align: left; }
.dec-public-name { font-size: 1.5rem; color: #f0f0f0; margin-bottom: 6px; border: none; padding: 0; }
.dec-public-phone { color: #ccc; font-size: 0.95rem; margin-bottom: 12px; }

.dec-card-portfolio h3 {
    text-align: left; color: #aaa; font-size: 0.95rem;
    margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 1px solid #444; padding-bottom: 8px;
}
.no-portfolio { color: #666; font-style: italic; text-align: left; font-size: 0.9rem; }

/* --- Portfolio Stack Carousel (portrait / playing-card layout) --- */
.portfolio-stack {
    position: relative;
    width: 100%;
    height: 400px;          /* tall container to house portrait cards + footer */
    cursor: pointer;
    margin-top: 12px;
    user-select: none;
}

/* Ghost cards that peek behind at an angle — portrait dimensions */
.stack-ghost {
    position: absolute;
    width: 42%;
    height: 330px;
    border-radius: 14px;
    top: 12px;
    left: 50%;
    border: 1px solid #444;
}
.stack-ghost.ghost-back {
    background-color: #1e1e21;
    transform: translateX(-46%) rotate(-6deg) translateY(18px);
    z-index: 0;
}
.stack-ghost.ghost-mid {
    background-color: #28282b;
    transform: translateX(-54%) rotate(5deg) translateY(9px);
    z-index: 1;
}

/* Main visible card — portrait playing-card proportions */
.stack-main-card {
    position: absolute;
    width: 42%;
    height: 330px;
    border-radius: 14px;
    overflow: hidden;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    border: 2px solid #4a90e2;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.portfolio-stack:hover .stack-main-card {
    transform: translateX(-50%) translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}
.stack-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.18s ease;
}

/* Footer: counter + hint, sits below the card */
.stack-footer {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6%;
}
.stack-counter {
    color: #4a90e2;
    font-weight: 700;
    font-size: 0.85rem;
}
.stack-tap-hint {
    color: #666;
    font-style: italic;
    font-size: 0.78rem;
}

/* ====================================================
   FURNITURE AUTOCOMPLETE DROPDOWN
   ==================================================== */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    width: 100%;
    min-width: 260px;
    background-color: #1e1e21;
    border: 1px solid #4a90e2;
    border-radius: 6px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.autocomplete-dropdown.open {
    display: block;
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #2d2d30;
    transition: background-color 0.1s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
    background-color: #2d4a6e;
    outline: none;
}

.ac-name {
    color: #f0f0f0;
    font-size: 0.88rem;
    flex: 1;
    margin-right: 10px;
}

.ac-price {
    color: #2ecc71;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}
