/* Custom styles for loja2.php using TailwindCSS */

/* Wine theme menu styles */
.wine-theme-nav {
    background: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
}

.wine-theme-nav ul {
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.wine-theme-nav ul li {
    margin: 0 1rem; /* Space between menu items */
}

.wine-theme-nav ul li a {
    font-size: 1.1rem;
    color: var(--header-text);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    letter-spacing: 1.5px;
    transition: all 0.4s ease;
}

.wine-theme-nav ul li a:hover {
    color: #f7fafc; /* Very light gray for better contrast */
    background: var(--complement-color);
}

/* Carrossel no topo */
.carousel-container {
    position: relative;
}

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

.carousel-slide img {
    width: 100%;
    height: auto;
}

/* Product card styles */
.product-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

/* Product image carousel */
.carousel-container .carousel-media {
    position: relative;
    height: 400px; /* Fixed height for product images */
}

.carousel-container .carousel-slide {
    position: absolute;
    inset: 0;
    transition: opacity 0.3s ease-in-out;
}

.carousel-container .carousel-prev,
.carousel-container .carousel-next {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-container .carousel-prev:hover,
.carousel-container .carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Product description */
.product-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
}

.product-card p {
    color: #718096;
    line-height: 1.6;
}

.product-price {
    color: #38a169;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Buttons */
.btn-primary {
    background-color: #4299e1;
    color: white;
    font-weight: bold;
    border-radius: 0.5rem;
    transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

/* Center text in "Adicionar ao carrinho" button */
.btn-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background-color: #718096;
    color: white;
    font-weight: bold;
    border-radius: 0.5rem;
    transition: all 0.3s ease-in-out;
}

.btn-secondary:hover {
    background-color: #4a5568;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(113, 128, 150, 0.2);
}

/* Stock status */
.product-stock {
    font-size: 0.875rem;
    display: block;
    margin-top: 0.5rem;
}

.product-stock.text-green-600 {
    color: #38a169;
}

.product-stock.text-red-600 {
    color: #e53e3e;
}

/* Search section styles */
.search-container form {
    background-color: #ffffff;
    border-radius: 0.75rem; /* Match product card rounding */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    transition: transform 0.3s ease-in-out;
}

.search-container form:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

/* Input and select styling */
.search-container input,
.search-container select,
.search-container button {
    font-size: 1rem; /* Slightly larger text for better readability */
}

.search-container .btn-primary {
    margin-top: 0; /* Remove space between elements */
    width: 100%; /* Full width on mobile, adjusts in desktop view */
    max-width: 200px; /* Limit maximum width of the button */
    font-size: 1.1rem; /* Slightly larger text for better readability */
}

@media (min-width: 769px) {
    .search-container form {
        flex-direction: row;
        align-items: center;
    }

    .search-container input,
    .search-container select,
    .search-container button {
        margin-bottom: 0; /* Remove bottom margins for horizontal alignment */
    }

    .search-container .btn-primary {
        width: auto;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .product-card {
        flex-direction: column !important;
    }

    .carousel-container .carousel-media {
        height: 250px; /* Adjust height for mobile */
    }

    /* Hide top menu on small screens */
    .wine-theme-nav {
        display: none;
    }

    /* Mobile menu button styles */
    .mobile-menu-button {
        background-color: var(--primary-color);
        color: white;
        font-weight: bold;
        border-radius: 0.5rem;
        padding: 10px 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease-in-out;
    }

    .mobile-menu-button:hover {
        background-color: var(--accent-color);
    }

    /* Overlay menu styles */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }

    .menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .overlay-menu {
        background: white;
        padding: 20px;
        border-radius: 10px;
        max-width: 80%;
        width: 300px;
        text-align: center;
    }

    .overlay-menu h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: var(--primary-color);
    }

    .overlay-menu ul {
        list-style: none;
        padding: 0;
    }

    .overlay-menu li {
        margin: 10px 0;
    }

    .overlay-menu a {
        text-decoration: none;
        color: var(--header-text);
        font-size: 1.2rem;
        transition: color 0.3s ease;
    }

    .overlay-menu a:hover {
        color: var(--accent-color);
    }
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    /* Hide mobile menu button and overlay on larger screens */
    .mobile-menu-button,
    .menu-overlay {
        display: none;
    }
}