/* Global Footer Styles */
.site-footer {
    background: #1f2937;
    color: #e5e7eb;
    padding: 60px 24px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget-title,
.footer-widgets .widget-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-widgets ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widgets li {
    margin-bottom: 10px;
}

.footer-widgets a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-widgets a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright,
.footer-tagline {
    color: #9ca3af;
    font-size: 14px;
}

/* Responsive Footer */
@media (max-width: 900px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 16px 20px;
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-widget-title,
    .footer-widgets .widget-title {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .footer-copyright,
    .footer-tagline {
        font-size: 12px;
    }
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #e07a5f, #f4a261);
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
}

#backToTop svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5px;
}

@media (max-width: 500px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        padding: 8px;
    }
}

/* ========================= */
/* Color Autocomplete Dropdown */
/* ========================= */
.color-search-form {
    position: relative;
}

.color-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    max-height: 380px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    margin-top: 6px;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.color-autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.color-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ac-item:hover,
.ac-item.active {
    background: #fff5f0;
}

.ac-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.ac-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ac-hex {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.5px;
}

.ac-name {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

@media (max-width: 500px) {
    .color-autocomplete-dropdown {
        width: calc(100vw - 48px);
        max-width: 320px;
    }

    .ac-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .ac-swatch {
        width: 28px;
        height: 28px;
    }

    .ac-hex {
        font-size: 13px;
    }
}