/* ===========================================
   DIYDOLLAR SHARED STYLES
   Include this file in all pages: <link rel="stylesheet" href="shared-styles.css">
   =========================================== */

/* ===========================================
   GLOBAL RESET & BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: #ffffff;
}

/* ===========================================
   HEADER & NAVIGATION
   =========================================== */
header {
    background: #ffffff;
    border-bottom: 3px solid #1a1a1a;
    padding: 1.5rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 350px 1fr;
    align-items: center;
    gap: 2rem;
}

.logo-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    justify-self: start;
}

.logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 70px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1;
}

.site-title .diy {
    color: #1a1a1a;
}

.site-title .dollar {
    color: #2d5016;
}

nav {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav > ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

nav > ul > li {
    position: relative;
}

nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    transition: color 0.3s;
}

nav > ul > li > a {
    padding: 0.5rem 0;
    display: block;
}

nav a:hover {
    color: #c9a961;
}

/* Mega Menu Dropdown */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #1a1a1a;
    min-width: 600px;
    padding: 2rem;
    display: none;
    z-index: 1000;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    right: 0;
    height: 1rem;
    background: transparent;
}

nav > ul > li:hover .mega-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mega-menu-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    color: #c9a961;
    font-family: Arial, sans-serif;
}

.mega-menu-section ul {
    list-style: none;
}

.mega-menu-section li {
    margin-bottom: 0.75rem;
}

.mega-menu-section a {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-menu-section .icon {
    font-size: 1rem;
}

.view-all {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.view-all a {
    color: #c9a961;
    font-weight: 600;
}

/* ===========================================
   SEARCH FUNCTIONALITY
   =========================================== */

/* Desktop Search - Slide-out from Icon */
.desktop-search-container {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: 1000;
}

.search-slide-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.slide-search-form {
    overflow: hidden;
    max-width: 0;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-slide-wrapper.active .slide-search-form {
    max-width: 350px;
    margin-right: 0.5rem;
}

.slide-search-input {
    width: 350px;
    padding: 0.75rem 1.25rem;
    border: 2px solid #1a1a1a;
    background: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease;
}

.slide-search-input::placeholder {
    color: #999;
    font-style: italic;
    font-family: Georgia, serif;
}

.slide-search-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
}

/* Fixed Search Icon */
.fixed-search-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid transparent;
    color: #1a1a1a;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.fixed-search-icon:hover {
    color: #c9a961;
    border-color: #c9a961;
    background: rgba(201, 169, 97, 0.05);
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
    transform: scale(1.1);
}

.fixed-search-icon:active {
    transform: scale(0.95);
}

.search-slide-wrapper.active .fixed-search-icon {
    border-color: #c9a961;
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #c9a961;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #c9a961;
}

.footer-view-all {
    display: inline-block;
    margin-top: 0.5rem;
    color: #c9a961;
    font-weight: 600;
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid #3a3a3a;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 0.85rem;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
    .header-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .logo-title-wrapper {
        justify-self: center;
    }
    
    nav > ul {
        gap: 1.5rem;
        font-size: 0.85rem;
    }

    .desktop-search-container {
        top: 1rem;
        right: 1rem;
    }
    
    .mega-menu {
        min-width: 90vw;
        left: 5vw;
        transform: none;
    }
}
