/* components.css - FINAL MODERN HEADER & COMPONENT STYLES */

.giftsy-header {
    background: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 10000;
    border-bottom: 1px solid var(--giftsy-border);
}

.article-page-main .giftsy-header {
    border-bottom: none;
}

.giftsy-header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 32px !important;
    width: 100%;
}

/* Logo */
.giftsy-header-logo {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
}

.giftsy-header-logo img {
    max-width: 110px !important;
    height: auto !important;
    display: block !important;
}

/* Search Area */
.giftsy-header-search {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: 580px !important;
    width: 100% !important;
    overflow: hidden !important;
}

.giftsy-header-search .search-form,
.giftsy-header-search .search-field {
    width: 100% !important;
    box-sizing: border-box !important;
}

.giftsy-search-form {
    width: 100% !important;
    margin: 0 !important;
}

.giftsy-search-wrapper {
    display: flex !important;
    align-items: center !important;
    height: 44px !important;
    border-radius: var(--giftsy-radius-pill) !important;
    background: var(--giftsy-bg-alt) !important;
    border: 1px solid var(--giftsy-border) !important;
    overflow: hidden !important;
    width: 100% !important;
    padding: 0 16px !important;
    transition: all 0.2s ease-in-out;
}

.giftsy-search-wrapper:focus-within {
    border-color: var(--giftsy-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(96, 62, 177, 0.1);
}

.giftsy-search-icon {
    flex: 0 0 auto !important;
    color: var(--giftsy-text-muted) !important;
    margin-right: 12px !important;
    display: flex !important;
    align-items: center;
}

.giftsy-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    font-family: var(--giftsy-font) !important;
    font-size: 14px !important;
    color: var(--giftsy-text) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Remove focus/active effects on search page and globally */
.home-search input:focus,
.home-search input:focus-visible,
.home-search:focus-within,
.search-wrapper:focus-within,
.giftsy-search-wrapper:focus-within,
.search .giftsy-search-wrapper:focus-within {
    border-color: var(--giftsy-border) !important;
    background: var(--giftsy-bg-alt) !important;
    box-shadow: none !important;
    outline: none !important;
}

.home-search input:focus,
.home-search input:focus-visible,
.giftsy-search-input:focus,
.giftsy-search-input:active,
.giftsy-search-input:focus-visible,
.search .giftsy-search-input:focus,
.search .giftsy-search-input:active,
.search .giftsy-search-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-color: inherit !important;
}

/* Branding (Logo + Switcher) */
.giftsy-header-branding {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex: 0 0 auto !important;
}

/* Language Switcher */
.giftsy-language-switcher {
    position: relative;
    display: inline-block;
}

.giftsy-language-current {
    width: 52px;
    height: 52px;
    background: #fff;
    border: 1px solid var(--giftsy-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 0;
}

.giftsy-language-current img {
    width: 28px !important;
    height: auto !important;
    border-radius: 2px;
}

.giftsy-language-arrow {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.giftsy-language-switcher:hover .giftsy-language-current {
    border-color: var(--giftsy-primary);
    box-shadow: var(--giftsy-shadow-sm);
}

.giftsy-language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #fff;
    border: 1px solid var(--giftsy-border);
    border-radius: 12px;
    box-shadow: var(--giftsy-shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 10001;
    overflow: hidden;
    padding: 8px 0;
}

.giftsy-language-switcher:hover .giftsy-language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.giftsy-language-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--giftsy-text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 12px;
}

.giftsy-language-option:hover {
    background: #f8f9fa;
    color: var(--giftsy-primary);
}

.giftsy-language-option.is-active {
    background: #f1f3f5;
    font-weight: 600;
}

.giftsy-language-flag-small {
    width: 20px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.giftsy-language-flag-small img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 1px;
}

.giftsy-language-name {
    white-space: nowrap;
}

/* CTA Action */
.giftsy-header-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.giftsy-cta-button {
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    border-radius: var(--giftsy-radius-pill) !important;
    background: var(--giftsy-primary) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-family: var(--giftsy-font) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    letter-spacing: 0.2px;
    transition: all 0.2s ease-in-out !important;
    border: none !important;
}

.giftsy-arrow-icon {
    margin-left: 8px !important;
    transition: transform 0.2s ease-in-out !important;
}

.giftsy-cta-button:hover {
    background: var(--giftsy-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--giftsy-shadow);
}

.giftsy-cta-button:hover .giftsy-arrow-icon {
    transform: translate(2px, -2px) !important;
}

/* Back to shop CTA */
.giftsy-back-to-shop-cta-container {
    text-align: center;
    padding: 40px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.giftsy-back-to-shop-cta-container .giftsy-pill {
    background: #fff !important;
    color: var(--giftsy-text) !important;
    padding: 12px 32px !important;
    border-radius: var(--giftsy-radius-pill) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 0.5px !important;
    box-shadow: var(--giftsy-shadow-sm) !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    border: 1px solid #eee !important;
}

.giftsy-back-to-shop-cta-container .giftsy-pill:hover {
    background: var(--giftsy-primary) !important;
    color: #fff !important;
    border-color: var(--giftsy-primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--giftsy-shadow);
}

.giftsy-back-to-shop-cta-container .giftsy-pill.is-placeholder {
    cursor: default;
    opacity: 0.8;
}

.giftsy-back-to-shop-cta-container .giftsy-pill.is-placeholder:hover {
    transform: none;
    background: #fff !important;
    color: var(--giftsy-text) !important;
    border-color: #eee !important;
    box-shadow: var(--giftsy-shadow-sm) !important;
}

/* Category Pill */
.giftsy-category-pill {
    margin-bottom: 8px;
}

.hero-card .giftsy-category-pill {
    margin-bottom: 0;
}

.giftsy-category-pill a {
    background: #fff;
    color: var(--giftsy-text);
    padding: 4px 12px;
    border-radius: var(--giftsy-radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    box-shadow: var(--giftsy-shadow-sm);
    transition: all 0.2s ease;
}

.giftsy-category-pill a:hover {
    background: var(--giftsy-primary);
    color: #fff;
}

/* Footer Styles */
.giftsy-footer {
    background: #fff;
    padding: 64px 0 32px;
}

.giftsy-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.giftsy-footer-columns {
    display: flex;
    gap: 80px;
}

.giftsy-footer-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--giftsy-text);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.giftsy-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.giftsy-footer-links li {
    margin-bottom: 10px;
}

.giftsy-footer-links a {
    text-decoration: none;
    color: var(--giftsy-text-muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.giftsy-footer-links a:hover {
    color: var(--giftsy-primary);
}

.giftsy-footer-trustpilot {
    flex: 0 0 260px;
}

.giftsy-footer-bottom {
    padding-top: 32px;
    text-align: center;
}

.giftsy-footer-bottom p {
    color: var(--giftsy-text-muted);
    font-size: 13px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.giftsy-footer-bottom .custom-logo {
    height: 24px !important;
    width: auto !important;
    opacity: 0.8;
}

/* Scroll to top */
#bloglo-scroll-top {
    background: #fff !important;
    border: 1px solid var(--giftsy-border) !important;
    box-shadow: var(--giftsy-shadow) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

#bloglo-scroll-top svg,
#bloglo-scroll-top path {
    fill: var(--giftsy-primary) !important;
    width: 20px !important;
    height: 20px !important;
}

#bloglo-scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--giftsy-shadow-lg) !important;
    border-color: var(--giftsy-primary) !important;
}

/* Hide theme footer elements */
.giftsy-home .bloglo-copyright,
.giftsy-home .bloglo-footer-bottom,
.giftsy-home .bloglo-before-colophon,
.giftsy-home .bloglo-after-colophon {
    display: none !important;
}

.giftsy-home .site-footer {
    background: #fff !important;
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 991px) {
    .giftsy-footer-top {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .giftsy-header-inner {
        gap: 16px !important;
    }
    .giftsy-header-logo img {
        max-width: 90px !important;
    }
    .giftsy-footer-columns {
        gap: 40px;
    }
}

@media (max-width: 650px) {
    .giftsy-header-inner {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    .giftsy-header-branding {
        order: 1 !important;
        gap: 8px !important;
    }
    .giftsy-header-logo {
        /* Included in branding */
    }
    .giftsy-header-actions {
        order: 2 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .giftsy-header-search {
        order: 3 !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Search Results Page */
html,
body,
.search,
.search-page,
.giftsy-search-page {
    overflow-x: hidden !important;
    background: #fff !important;
    width: 100% !important;
    max-width: 100% !important;
}

.giftsy-search-results-header {
    margin-bottom: 40px;
}

.giftsy-search-results-header .giftsy-section-title-medium {
    margin-bottom: 0;
}

.giftsy-no-results {
    padding: 60px 0 120px;
    text-align: center;
    color: var(--giftsy-text-muted);
}

.giftsy-search-page .giftsy-blog-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 60px;
    width: 100%;
    box-sizing: border-box;
}

/* Fix for potential overflow in parent theme */
body.search .alignfull,
body.search .bloglo-fw-section,
body.search-results .alignfull,
body.search-results .bloglo-fw-section {
    width: 100% !important;
    margin-left: 0 !important;
    left: 0 !important;
    max-width: 100% !important;
}

.giftsy-load-more-container {
    margin-bottom: 80px;
}

@media (max-width: 1024px) {
    .giftsy-search-page .giftsy-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .giftsy-search-page .giftsy-blog-grid {
        grid-template-columns: 1fr;
    }
}
