/* ==========================================================================
    GLOBAL LAYOUT STRUCTURE
    Controls the main architectural components: Header, Navigation, and Footer.
   ========================================================================== */

/* --- Header & Navigation --- */
.main-navigation-header {
    background-color: var(--surface-white-color);
    border-bottom: 1px solid var(--border-light-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navigation-top-row {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 1fr auto 0.86fr;
    align-items: center;
}

.header-logo-section {
    justify-self: start;
}

.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark-color);
    text-decoration: none;
}

.brand-logo-image {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* --- Middle Section: Search + Icons Group --- */
.search-and-icons-group {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: center;
    width: 575px; 
}

.search-input-wrapper {
    flex-grow: 1;
    position: relative;
}

.search-input-field {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 20px;
    border: 1px solid var(--border-light-color);
    background-color: var(--background-light-color);
    transition: all 0.3s;
    font-size: 13px;
    outline: none;
}

.search-input-field:focus {
    border-color: var(--primary-blue-color);
    background-color: var(--surface-white-color);
}

.search-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted-color);
    font-size: 20px;
}

.shopping-cart-button,
.account-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-muted-color);
    flex-shrink: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.shopping-cart-button:hover,
.account-button:hover {
    color: var(--primary-blue-color);
}

.cart-item-count-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary-blue-color);
    color: var(--surface-white-color);
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 5px;
}

/* --- Right Section: Isolated User Name --- */
.user-name-container {
    justify-self: start; 
    padding-left: 10px; 
}

.header-user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark-color);
    white-space: nowrap; 
}

/* Navigation Links (Bottom Row) */
.navigation-bottom-row {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 15px;
    display: flex;
    justify-content: center;
    gap: 40px;
    font-weight: 600;
    font-size: 14px;
}

.navigation-bottom-row a {
    color: var(--text-dark-color);
    transition: color 0.2s;
    text-decoration: none;
}

.navigation-bottom-row a:hover {
    color: var(--primary-blue-color);
}

/* --- Hero Carousel Section --- */
.hero-carousel-section {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.carousel-content-wrapper {
    flex-grow: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light-color);
    background-color: var(--surface-white-color);
    display: flex;
    flex-direction: column;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide-image {
    min-width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.carousel-control-button {
    background-color: var(--surface-white-color);
    border: 1px solid var(--border-light-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: var(--text-dark-color);
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.carousel-control-button:hover {
    background-color: var(--background-light-color);
}

.carousel-progress-container {
    height: 4px;
    background-color: var(--border-light-color);
    width: 100%;
}

.carousel-progress-bar {
    height: 100%;
    background-color: var(--primary-blue-color);
    width: 0%;
}

/* ==========================================================================
    GLOBAL FOOTER
   ========================================================================== */

.main-footer-container {
    background-color: var(--surface-white-color);
    border-top: 1px solid var(--border-light-color);
    padding: 50px 20px 20px;
    margin-top: 50px;
}

.footer-columns-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; 
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand-description {
    color: var(--text-muted-color);
    font-size: 13px;
    margin-top: 15px;
    max-width: 350px;
    line-height: 1.5;
}

.footer-column-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
}

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

.footer-link-list li {
    margin-bottom: 10px;
}

.footer-link-list a {
    font-size: 13px;
    color: var(--text-muted-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link-list a:hover {
    color: var(--primary-blue-color);
}

.payment-methods-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 172px; 
    margin: 0 auto;
}

.payment-logo-image {
    height: 35px;
    width: 52px;
    border: 1px solid var(--border-light-color);
    border-radius: 4px;
    padding: 4px;
    background-color: white;
    object-fit: contain;
}

.footer-copyright {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light-color);
    text-align: center;
    color: var(--text-muted-color);
    font-size: 12px;
}

/* --- Layout Responsive Styles --- */
@media (max-width: 992px) {
    .footer-columns-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Shrink the middle container slightly on iPads to prevent overlap */
    .search-and-icons-group {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .navigation-top-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .search-and-icons-group {
        width: 100%;
        justify-content: space-between;
    }

    .user-name-container {
        align-self: center;
        padding-left: 0;
    }

    .navigation-bottom-row {
        flex-wrap: wrap;
        gap: 15px;
        font-size: 14px;
    }

    .footer-columns-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-brand-description {
        max-width: 100%;
    }
    
    .hero-carousel-section {
        padding: 0 10px;
    }
}