﻿.cart {
    position: relative;
    cursor: pointer;
    font-size: 26px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #FFD814;
    color: black;
    font-size: 14px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 50%;
}

/* GRID PRODUTOS */
.products {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.product-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        transform: translateY(-5px);
    }

    .product-card img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }

.product-info {
    padding: 20px;
    height: 15rem;
}

.product-title {
    font-size: 15px;
    margin-bottom: 15px;
    color: #007dc3;
    font-weight: bold;
}

.product-price {
    font-size: 16px;
    margin-bottom: 15px;
}

    .product-price span {
        font-weight: bold;
    }

.btn-group {
    display: flex;
    gap: 10px;
}

.parameters {
    padding: 40px 40px 0 40px;
}

.search-button {
    height: 40px;
    border-radius: 5px;
    margin-left: 10px;
    padding: 1px;
}

.filter {
    color: white;
    background-color: #007dc3 !important;
    border-radius: 10px;
    font-size: 5px;
}

.add-btn {
    background: #007dc3;
    border: none;
    width: 100%;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    color: white;
    font-weight: bold;

    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

    .add-btn:hover {
        background: white;
        color: #007dc3;
        border: 1px solid #007dc3;
    }


.product_apresentation {
    display: flex;
    gap: 15px;
    padding: 20px;
    min-height: 600px;
}

.product-image {
    width: 60%;
    height: 100%;
    padding: 20px;
}

.product-description {
    width: 50%;
    padding: 20px;
}

.one-product-title {
    font-size: 25px;
    margin-bottom: 15px;
    color: #007dc3;
    font-weight: bold;
    margin-block-end: 0.83em;
    unicode-bidi: isolate;
    font-size: 22px;
    color: #007dc3;
    font-family: 'League Spartan';
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.one-product-description {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.one-product-description span {
    font-weight: bold;
}



/* Wrapper */
.cart-wrapper {
    position: relative;
}

/* Ícone/trigger */
.cart-icon {
    cursor: pointer;
    position: relative;
    /* melhor aspeto (parece botão) */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    background: #fff;
    color: #111;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    user-select: none;
}

/* Contador */
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #2563eb; /* azul */
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 999px;
    font-weight: 700;
    border: 2px solid #fff; /* destaca em cima do botão */
}

/* Dropdown */
.cart-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    /* responsivo: em mobile ocupa quase tudo */
    
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    z-index: 1000;
    color: #111;
}

    /* título */
    .cart-dropdown h3 {
        margin: 0 0 12px 0;
        font-size: 16px;
        font-weight: 700;
        color: #111;
    }

    /* seta */
    .cart-dropdown::before {
        content: "";
        position: absolute;
        top: -10px;
        right: 18px;
        border-width: 0 10px 10px 10px;
        border-style: solid;
        border-color: transparent transparent #ffffff transparent;
        /* pequena sombra na seta */
        filter: drop-shadow(0 2px 2px rgba(0,0,0,0.10));
    }

/* Mostrar no hover (desktop) + também quando tiver classe .is-open (mobile/click) */
.cart-wrapper:hover .cart-dropdown,
.cart-wrapper.is-open .cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Itens */
.cart-item-drop {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
}

    .cart-item-drop:hover {
        background: rgba(0,0,0,0.03);
    }

    .cart-item-drop img {
        width: 56px;
        height: 56px;
        border-radius: 10px;
        object-fit: cover; /* evita distorção */
        flex: none;
    }

    .cart-item-drop div {
        min-width: 0; /* permite truncar texto */
    }

        .cart-item-drop div p {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            color: #111;
            /* para títulos grandes não rebentarem */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .cart-item-drop div span {
            display: block;
            margin-top: 2px;
            font-size: 12px;
            color: #6b7280;
        }

    /* preço à direita */
    .cart-item-drop .price {
        margin-left: auto;
        font-weight: 700;
        font-size: 14px;
        white-space: nowrap;
        color: #111;
    }

/* scroll quando houver muitos itens */
.cart-items {
    max-height: 320px;
    overflow: auto;
    padding-right: 4px;
}

    /* melhor scroll (webkit) */
    .cart-items::-webkit-scrollbar {
        width: 8px;
    }

    .cart-items::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.15);
        border-radius: 999px;
    }

/* mobile: desliga hover (opcional) */
@media (hover: none) {
    .cart-wrapper:hover .cart-dropdown {
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
    }
}

.price {
    color: #B12704;
    font-weight: bold;
    font-size: 14px;
}

.cart-footer {
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

    .cart-footer p {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .cart-footer button {
        background: #007dc3;
        border: none;
        width: 100%;
        border-radius: 8px;
        font-size: 12px;
        cursor: pointer;
        color: white;
        font-weight: bold;
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        font-weight: bold;
    }

        .cart-footer button:hover {
            background: white;
            color: #007dc3;
            border: 1px solid #007dc3
        }

.classification {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 225px));
}

    .classification label {
        font-size: 12px !important;
        color: inherit !important;
        padding: 2px !important;
    }

