/* CSS - general */
    a {
        text-decoration: none;
        color: inherit;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Poppins', sans-serif;
    }

    html, body {
        margin: 0;
        padding: 0;
        height: 100%;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        background-color: #000;
    }

/* -- -- CSS - header -- -- */
    .capcelara {
        width: 100%;
        /* height: 15%; */
        height: 80px;
        background-color: #000000;
        color: white;
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0px 10px;

        /* sempre visible: */
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
    }
    /* -- -- -- header */
    header {
        width: 30%;
        height: 100%;

        display: flex;
        justify-content: center;
        align-items: center;
    }

    .div_logo {
        display: flex;
        align-items: center;
    }

    .logo img {
        width: 5.625rem;
        height: auto;
        /* margin-right: 0.625rem; */
    }

    .nom_web h1 {
        font-size: 2.5rem;
        margin: 0px;
    }

    .div_burger {
        display: flex;
        align-items: center;
    }

/* -- -- nav -- --*/
/* -- menu --*/
    nav {
        width: 60%;
        height: 100%;
        /* margin: auto; */
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    nav ul {
        display: flex;
        list-style: none;
    }

    nav ul li {
        margin: 0 1.25rem;
    }

    nav ul li a {
        text-decoration: none;
        color: #fff;
        font-size: 1.125rem;
        transition: 0.3s;
    }

    nav ul li a:hover {
        color: #bb86fc;
    }

/* -- -- buscador / carro / usuari -- -- */
    .buscador_carro_usari {
        width: 50%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .search {
        display: flex;
        align-items: center;
        background-color: #ffffff36;
        padding: 0.3125rem 0.625rem;
        border-radius: 1.5625rem;
    }
    .search input {
        width: 18.75rem;
        border: none;
        outline: none;
        background: none;
        color: #fff;
        padding: 0.3125rem;
    }
    .search a {
        color: #fff;
        font-size: 1.25rem;
        cursor: pointer;
    }
    .search a:hover {
        color: #bb86fc;

    }

    .carro a, .user a {
        color: #fff;
        font-size: 1.5625rem;
        cursor: pointer;
        transition: 0.3s;
    }
    .carro a:hover, .user a:hover {
        color: #bb86fc;
    }

    .search form {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    main {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;

        background-color: white;
        width: 100%;
        height: auto;
        position: relative;
    }

/* -- menu burger -- */
    .burger {
        display: none;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
        /* padding: 5px; */
        width: 100%;
        height: 100%;
    }
    .burger span {
        width: 35px;
        height: 6px;
        background-color: white;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    /* Menú mòbil */
    .mobile-menu {
        display: none;
        flex-direction: column;
        background-color: #000;
        padding: 20px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s ease;
    }
    .mobile-menu.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    .mobile-menu ul {
        list-style: none;
        /* margin-bottom: 20px; */
        margin-bottom: 0px;
    }
    .mobile-menu li {
        margin-bottom: 15px;
        border-bottom: 1px solid #333;
        padding-bottom: 10px;
    }
    .mobile-menu a {
        color: white;
        text-decoration: none;
        font-size: 1.1rem;
        display: block;
        padding: 10px;
        border-radius: 4px;
        transition: background 0.3s;
    }
    .mobile-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #bb86fc;
    }
    .mobile-search {
        display: flex;
        margin-bottom: 15px;
    }
    .mobile-search input {
        flex: 1;
        padding: 10px 15px;
        border: none;
        outline: none;
        background: #ffffff36;
        color: white;
        border-radius: 1.5625rem 0 0 1.5625rem;
    }
    .mobile-search input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }
    .mobile-search a {
        background: linear-gradient(135deg, #bb86fc, #03dac6);
        color: white;
        padding: 10px 15px;
        border-radius: 0 1.5625rem 1.5625rem 0;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-icons {
        display: flex;
        justify-content: space-around;
        /* margin-top: 10px; */
        margin-right: 10px;
    }
    .mobile-icons a {
        color: white;
        font-size: 1.750rem;
        padding: 0px 10px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .mobile-icons a:hover {
        color: #bb86fc;
    }
    /* Animació del botó burger quan està actiu */
    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    .burger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    /* Ajustos per al contingut principal */
    .main-content {
        margin-top: 100px;
        padding: 20px;
        min-height: calc(100vh - 100px);
        background: white;
    }

/* Estils per als comptadors del carret */
    .carrito-contador {
        background: linear-gradient(135deg, #bb86fc, #03dac6);
        color: white;
        border-radius: 50%;
        padding: 2px 7px;
        font-size: 0.8rem;
        font-weight: bold;
        margin-left: 5px;
        display: inline-block;
        min-width: 20px;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        animation: bounce 0.3s ease;
        vertical-align: middle;
        line-height: 1.2;
    }
    
    .carrito-contador-mobile {
        background: linear-gradient(135deg, #bb86fc, #03dac6);
        color: white;
        border-radius: 50%;
        padding: 1px 5px;
        font-size: 0.7rem;
        font-weight: bold;
        position: relative;
        top: -8px;
        left: -5px;
        display: inline-block;
        min-width: 16px;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        animation: bounce 0.3s ease;
        line-height: 1.2;
    }
    
    .mobile-cart-count {
        background: linear-gradient(135deg, #bb86fc, #03dac6);
        color: white;
        border-radius: 50%;
        padding: 2px 8px;
        font-size: 0.8rem;
        font-weight: bold;
        margin-left: 8px;
        display: inline-block;
        min-width: 18px;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        animation: bounce 0.3s ease;
        line-height: 1.2;
    }
    
    /* Estils per a la informació de l'usuari */
    .user-info {
        position: relative;
        display: inline-block;
    }
    
    .user-info-mobile {
        position: relative;
    }
    
    .user-dropdown-trigger {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: white;
        padding: 5px 10px;
        border-radius: 20px;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .user-dropdown-trigger:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .user-name {
        margin-left: 8px;
        font-size: 0.9rem;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-name-mobile {
        margin-left: 5px;
        font-size: 0.85rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .badge-admin {
        background: linear-gradient(135deg, #ff6b6b, #ffa726);
        color: white;
        font-size: 0.7rem;
        padding: 2px 6px;
        border-radius: 10px;
        margin-left: 5px;
        font-weight: bold;
    }
    
    .badge-admin-mobile {
        background: linear-gradient(135deg, #ff6b6b, #ffa726);
        color: white;
        font-size: 0.65rem;
        padding: 2px 5px;
        border-radius: 8px;
        margin-left: 5px;
        font-weight: bold;
    }
    
    .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        min-width: 180px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        padding: 10px 0;
        z-index: 1000;
        display: none;
        margin-top: 10px;
    }
    
    .user-dropdown-mobile {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        min-width: 160px;
        border-radius: 8px;
        padding: 10px 0;
        z-index: 1000;
        display: none;
        margin-top: 5px;
    }
    
    .user-dropdown.show {
        display: block !important;
    }
    
    .user-dropdown-mobile.show {
        display: block !important;
    }
    
    .user-dropdown a,
    .user-dropdown-mobile a {
        display: flex;
        align-items: center;
        padding: 8px 15px;
        color: #333;
        text-decoration: none;
        transition: background 0.3s;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .user-dropdown-mobile a {
        color: white;
    }
    
    .user-dropdown a:hover {
        background: #f5f5f5;
    }
    
    .user-dropdown-mobile a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .user-dropdown i,
    .user-dropdown-mobile i {
        margin-right: 10px;
        width: 16px;
        text-align: center;
    }

/* -- -- footer -- -- */
    footer {
        width: 100%;
        height: auto;
        background-color: #000;
        color: #fff;
        display: flex;
        flex-direction: column;
        text-align: center;
    }
    .social {
        width: 100%;
        height: auto;

        display: flex;
        justify-content: center;
        align-items: center;
        margin: 1.25rem 0;
        color: white;
    }
    .social a {
        text-decoration: none;
        color: white;
        font-size: 2.5rem;
        margin: 0 0.9375rem;
        transition: 0.3s;
    }
    .social a:hover {
        color: #bb86fc;
        transform: scale(1.2);
    }
    .info_web {
        width: 100%;
        height: auto;
        margin-bottom: 1.25rem;
    }

    button {
        padding: 0.625rem 1.25rem;
        background: linear-gradient(135deg, #bb86fc, #03dac6);
        color: #fff;
        border: none;
        border-radius: 1.5625rem;
        cursor: pointer;
    }

    button:hover {
        color: black;
        background: #ddd;
    }
    .boto_preoductes {
        padding: 1.25rem 3.75rem;
        border-radius: 2.5rem;
        font-size: 1.25rem;
    }

/* -- -- responsive / @media -- -- */
@media screen and (max-width: 1350px) {
    .search input {
        width: 5rem;
    }
}

@media screen and (max-width: 992px) {
    nav {
        display: none;
    }
    
    .burger {
        display: flex;
    }
    
    header {
        width: 100%;
        justify-content: space-around;
    }
    
    .nom_web h1 {
        font-size: 2rem;
    }
    
    .logo img {
        width: 4.5rem;
    }
}

@media screen and (max-width: 768px) {
    .nom_web h1 {
        font-size: 1.8rem;
    }
    
    .logo img {
        width: 4rem;
    }
    
    .capcelara {
        padding: 0 5px;
    }
}

@media screen and (max-width: 480px) {
    .nom_web h1 {
        display: none;
        /* font-size: 1.5rem; */
    }
    
    /* .logo img {
        width: 3.5rem;
    } */
}

/* Assegurar que el menú mòbil no es mostri en escriptori */
@media (min-width: 993px) {
    .mobile-menu {
        display: none !important;
    }
    .mobile-icons {
        display: none !important;
    }
}


/* @media screen and (max-width: ) {} */
/* @media screen and (max-width: ) {} */
/* @media screen and (max-width: ) {} */
/* @media screen and (max-width: ) {} */
/* @media screen and (max-width: ) {} */
