/* Stili per il titolo e la descrizione della pagina */
.product-page-header {
    text-align: center;
    margin: 40px 0;
}

.product-page-header h1 {
    font-family: 'Quicksand', sans-serif;
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--brand-primary);
}

.product-page-header p {
    font-size: 1.2em;
    color: var(--text-light-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Stili per le schede degli product */
.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 60px;
}

.product-item {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-basis: calc(25% - 20px);
    flex-grow: 1;
    padding: 20px;
    background: linear-gradient(135deg, var(--background-dark-tertiary), var(--border-color));
    border-radius: var(--border-radius-main);
    /* border-radius: 18px; */
    box-shadow: var(--box-shadow-main);
    max-width: 300px;
    transition: var(--transition-main);

    font-family: 'Quicksand', sans-serif;
    /* background-color: var(--background-dark-secondary); */
    /* color: var(--text-light-primary); */
    /* border: 1px solid transparent; */
    /* text-align: center; */
    /* overflow: hidden; */
}

.product-item::before {
    content: '';
    position: absolute;
    inset: 1px; /* spazio interno per creare il bordo */
    background-color: var(--background-dark-secondary); /* colore interno */
    /* border-radius: 14px; */
    border-radius: inherit;
    z-index: 0;
}

.product-item > * {
    position: relative;
    z-index: 1;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 12px var(--box-shadow-glow-color-strong),
        0 0 24px var(--box-shadow-glow-color-soft);
}

.product-item h3,
.product-item p,
.product-item a {
    position: relative;
    z-index: 2; /* Porta il testo sopra l'overlay */
}

.product-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text-light-primary);
}

.product-item p {
    font-size: 1em;
    color: var(--text-light-secondary);
}

.product-image-container {
    aspect-ratio: 16 / 9; /* Enforces a 16:9 aspect ratio */
    overflow: hidden;
    position: relative;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    transition: transform 0.3s ease;
}

.product-item:hover .product-image-container img {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;
    flex-grow: 1; 
    text-align: center;
}

.product-footer {
    padding: 0 20px 20px 20px;
}

/* Stili per i pulsanti dei marketplace */
.product-buttons {
    display: flex;
    flex-direction: column; /* Disposizione verticale */
    gap: 10px;
    margin-top: 15px;
}

.product-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: var(--brand-primary);
    color: var(--text-light-primary);
    text-decoration: none;
    border-radius: var(--border-radius-small);
    transition: background-color 0.3s ease;
    font-size: 0.9em;
    width: 100%; /* Larghezza del 100% per rendere i pulsanti larghi uguali */
}

.product-buttons .btn i {
    margin-right: 8px; /* Spazio tra l'icona e il testo */
}

.product-buttons .btn .marketplace-logo {
    height: 18px; /* You can adjust this value */
    width: auto;  /* To maintain aspect ratio */
    margin-right: 8px; /* Space between logo and text */
    vertical-align: middle; /* Aligns the image nicely with the text */
}

.product-buttons .btn:hover {
    background-color: var(--brand-primary-dark);
}

/* Responsive behavior for smaller screens (e.g., 2 columns) */
@media (max-width: 992px) {
    .product-item {
        flex-basis: calc(50% - 20px);
    }
}

/* Responsive behavior for very small screens (e.g., 1 column) */
@media (max-width: 768px) {
    .product-item {
        flex-basis: 100%;
    }
}