html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;             /* Turns body into a flex container */
    flex-direction: column;    /* Stacks elements vertically */
    background-color: #FFFFFF;
    background-repeat: repeat;
    background-size: 5rem;
    font-family: 'Poppins', sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background-color: #0d2240;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-button {
    background-color: #0d2240;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.header-button img {
    width: auto;
    height: 20px;
    margin-bottom: -5px;
}
.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.banner-image {
    display: block;
    width: 100%;
    height: auto;
}

.banner h1 {
    text-align: center;
    padding: 10px;
}

.descopera-produse {
    position: absolute;
    bottom: clamp(22px, 2.4vw, 42px);
    left: clamp(32px, 4vw, 60px);
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    color: #FFFFFF;
    font-size: clamp(12px, 1.25vw, 18px);
    font-weight: bold;
    justify-content: space-around;
    background-color: #ff7b00;
    border-radius: 999px;
    cursor: pointer;
    border: none;
    padding: clamp(8px, 1vw, 16px) clamp(16px, 2vw, 26px);
    white-space: nowrap;
}

.descopera-produse img {
    width: clamp(18px, 1.5vw, 28px);
    height: auto;
}

.informatii-utile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90vw;
    height: clamp(52px, 7vh, 78px);
    margin: 0 auto;
    padding: 8px 16px;
    background-color: #0d2240;
    border-radius: 24px;
    position: relative;
    z-index: 2;
    transform: translateY(-20%);
}

.informatii-utile-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
    position: relative;
    align-self: stretch;
}

.informatii-utile-pair:not(:last-child) {
    border-right: 2px solid;
    border-image: linear-gradient(
        to bottom, 
        rgba(77, 88, 100, 0), 
        rgba(77, 88, 100, 0.95) 50%, 
        rgba(77, 88, 100, 0)
    ) 1;
}

.informatii-utile-icon,
.informatii-utile-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.informatii-utile-item {
    flex-direction: column;
    align-items: flex-start;
    color: #FFFFFF;
    text-align: left;
    font-size: clamp(0.7rem, 1.2vh, 1.2rem);
    gap: 0;
}

.informatii-utile-icon img {
    display: block;
    width: clamp(48px, 6.5vh, 80px);
    height: auto;
}

.informatii-utile-item h3,
.informatii-utile-item p {
    margin: 0;
    line-height: 1.2;
}

.informatii-utile.ideals {
    background-color: #F7F4F0;
    margin-top: 10px;
    transform: translateY(20%);        
}

.informatii-utile.ideals .informatii-utile-pair:not(:last-child) {
    border-right: 2px solid; 
    border-image: linear-gradient(
        to bottom, 
        rgba(77, 88, 100, 0), 
        rgba(255, 123, 0, 0.95) 50%, 
        rgba(77, 88, 100, 0)
    ) 1;
}

.informatii-utile.ideals .informatii-utile-item {
    color: #0d2240; 
}

.logo img{
    width:clamp(180px, 15vw, 300px);
}

.nav{
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    background-color: #FFF;
}

.category-button {
    background-color: #FFF;
    color: #0d2240;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.nav-button {
    background-color: #FFF;
    border: none;
    cursor: pointer;
}

.nav-button img {
    width: 24px;
    height: auto;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    background-color: #0d2240;
    min-width: 240px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
    z-index: 9;
    
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 24px;
    background: none;
    border: none;
    color: #FFFFFF;
    text-align: left;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(255, 123, 0, 0.15);
    color: #ff7b00;
}

/* Desktop Submenu Styles */
.dropdown-submenu-container {
    position: relative;
}

.dropdown-submenu-container .submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: #0d2240;
    min-width: 220px;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s;
}

.dropdown-submenu-container:hover .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.search-dropdown {
    position: relative;
    display: inline-block;
}

.search-bar-container {
    position: absolute;
    top: 50%;
    right: 100%;
    margin-right: 12px;
    transform: translateY(-50%) translateX(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    display: flex;
    align-items: center;
    background-color: #0d2240;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9;
    
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s;
}

.search-bar-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: -15px;
    width: 15px;
    height: 100%;
    background: transparent;
}

.search-form {
    display: flex;
    margin: 0;
    padding: 0;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    width: 200px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-dropdown:hover .search-bar-container {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(12px, 2vw, 20px);
    padding: clamp(16px, 4vw, 40px);
    position: relative;
    z-index: 1; 
}

.card {
    background-color: #F7F4F0;
    aspect-ratio: 3 / 4; 
    min-height: 250px;
    border-radius: clamp(8px, 1.5vw, 12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Removed perspective and any 3D transforms */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    background-color: #0d2240;
    color: #FFFFFF;
    text-align: center;
    padding-top: 40px;
    font-size: 14px;
    margin-top: auto; /* Pushes footer to the bottom of the page */
}

.footer-section {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.footer-section img {
    width: 24px;
    height: auto;
    margin-right: 8px;
}

.footer-icons {
    gap: 16px;
    margin-top: 10px;
}

.footer-section a {
    color: white !important;
    text-decoration: none !important;
}

.mobile-menu {
    display: none;
}

.banner-mobile {
    display: none;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    header{
        display: none;
    }

    .mobile-menu {
        display: flex;
        flex-direction: row;
        align-items:center;
        justify-content: space-between;
        background-color: #FFFFFF;
        padding: 10px 0;
        border-bottom: 2px solid;
        border-image: linear-gradient(
            to left, 
            #0d2240,
            #ff7b00 70%
        ) 1;
    }

    .mobile-menu-button {
        background-color: #FFFFFF;
        border: none;
        cursor: pointer;
        padding-left:15px;
    }

.mobile-menu-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        width: 75%;
        max-width: 300px;
        height: 80dvh; /* Dynamic viewport height, avoids mobile address-bar bugs */
        background-color: #FFF;
        display: flex;
        flex-direction: column;
        /* Updated padding: 80px top, 20px sides, and a larger bottom padding (e.g., 100px) so the last item scrolls fully into view */
        padding: 80px 20px 100px 20px; 
        gap: 10px;
        
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
        
        /* Proper scrolling setup */
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
    }

    .mobile-menu-dropdown.active {
        transform: translateX(0); 
    }

    .mobile-menu-item {
        background: transparent;
        border: none;
        color: #0d2240;
        font-size: 1.1rem;
        text-align: left;
        padding: 10px;
        cursor: pointer;
        border-bottom: 2px solid;
        border-image: linear-gradient(
            to left, 
            #0d2240,
            #ff7b00 70%
        ) 1;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.6);
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        z-index: 1000;
    }

    .menu-overlay.active {
        visibility: visible;
        opacity: 1;
    }

    .dropdown-menu-mobile {
        display: none;
        flex-direction: column;
        gap: 6px;
        padding-left: 15px;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .dropdown-menu-mobile.active {
        display: flex;
    }

    /* Mobile Sub-Accordion Styling */
    .dropdown-menu-mobile-sub {
        display: none;
        flex-direction: column;
        gap: 4px;
        padding-left: 15px;
        margin-top: 4px;
        margin-bottom: 4px;
    }

    .dropdown-menu-mobile-sub.active {
        display: flex;
    }

    .dropdown-item {
        background: transparent;
        border: none;
        color: #0d2240;
        font-size: 0.9rem;
        text-align: left;
        padding: 6px 0;
        cursor: pointer;
        opacity: 0.85;
    }

    .dropdown-item:hover {
        opacity: 1;
        color: #ff7b00;
    }

    .mobile-menu-item, .dropdown-item {
        flex-shrink: 0;
    }

    body.no-scroll {
        overflow: hidden;
        height: 100vh;
    }

    .nav{
        display: none;
    }

    .banner {
        display: none;
    }

    .banner-mobile {
        display: block;
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .descopera-produse {
        position: absolute;
        /* Adjusted just a teensie bit higher */
        bottom: clamp(51px, 19vw, 115px);
        left: 50%;
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        gap: clamp(4px, 2vw, 10px);
        color: #FFFFFF;
        font-size: clamp(10px, 3.5vw, 15px);
        font-weight: bold;
        justify-content: center;
        background-color: #ff7b00;
        border-radius: 999px;
        cursor: pointer;
        border: none;
        padding: clamp(6px, 1.5vw, 12px) clamp(12px, 4vw, 22px);
        white-space: nowrap;
    }

    .informatii-utile-pair {
        flex-direction: column;
        align-items : center;
        padding: 0;
        margin:10px 0px;
    }

    .informatii-utile {
    border-radius: 0;
    padding: 0;
    margin: 0px;
    width: 100vw;
    max-width: 100%;
    height: auto;
    transform: translateY(0%);
    }

    .informatii-utile p{
        display: none;
    }

    .informatii-utile h3{
        text-align: center;
    }

    .informatii-utile-item h3{
        text-align: center;
    }
    
    .footer-section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

}