/* public/css/style.css */

:root {
    --primary-color: #FF69B4;
    --secondary-color: #87CEEB;
    --accent-color: #FFD700;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light); /* Adicionado para consistência */
}

/* Header Styles */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.875rem;
    padding: 8px 0;
    /* Adicionado z-index para garantir que o top-bar esteja acima */
    position: relative;
    z-index: 1030; /* Maior que o main-header */
}

.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    border-radius: 25px;
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    font-size: 0.95rem;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 105, 180, 0.25);
}

.search-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.cart-icon {
    position: relative;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--text-dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    position: relative; /* Adicionado para garantir que o dropdown do nav fique acima */
    z-index: 1010;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

.nav-link:hover, .nav-link.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

/* Dropdown Minha Conta */
.main-header .dropdown-menu {
    z-index: 1040; /* Maior que o header e o nav */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: none;
}
.main-header .dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="30" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="90" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0px); }
    100% { transform: translateX(100px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: var(--primary-color);
}

/* Product Cards (usado em home e product_list) */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.4;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-price .old-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    background: var(--bg-light);
    padding: 80px 0;
    margin: 80px 0;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-text {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--text-dark), #34495e);
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-title {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.footer-link:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .search-box {
        margin: 15px 0;
    }
    
    .product-image {
        height: 200px;
    }
    
    .main-nav .navbar-nav {
        background: white;
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Alert Messages */
.alert-custom {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success { background: linear-gradient(45deg, #2ecc71, #27ae60); color: white; }
.alert-danger { background: linear-gradient(45deg, #e74c3c, #c0392b); color: white; }
.alert-warning { background: linear-gradient(45deg, #f39c12, #d68910); color: white; }
.alert-info { background: linear-gradient(45deg, #3498db, #2980b9); color: white; }

/* Cart Specific Styles */
.cart-section {
    padding: 50px 0;
}

.cart-item {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Para responsividade */
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 20px;
    flex-shrink: 0; /* Não encolher a imagem */
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
    margin-bottom: 10px; /* Espaçamento em telas menores */
}

.cart-item-details h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-details p {
    margin-bottom: 5px;
    color: var(--text-light);
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-left: auto; /* Empurra para a direita em telas maiores */
    text-align: right; /* Alinha o preço à direita */
}

.cart-item-price .old-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
    display: block;
}

.quantity-control {
    display: flex;
    align-items: center;
    width: 120px; /* Largura fixa para os controles de quantidade */
    margin-top: 10px; /* Espaçamento em telas menores */
}

.quantity-control button {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.quantity-control button:hover {
    background-color: #64B5F6; /* Tom mais escuro de secondary-color */
}

.quantity-control input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin: 0 5px;
    padding: 5px 0;
}

.remove-item-btn {
    background-color: #e74c3c; /* Cor de perigo */
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-left: 15px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background-color: #c0392b;
}

.cart-summary {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 30px;
}

.cart-summary h4 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.cart-summary .list-group-item {
    border: none;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary .list-group-item strong {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.btn-checkout {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Responsive adjustments for cart */
@media (max-width: 767.98px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-item-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .cart-item-details {
        width: 100%;
        margin-bottom: 15px;
    }
    .cart-item-price {
        width: 100%;
        text-align: left;
        margin-left: 0;
        margin-bottom: 15px;
    }
    .quantity-control {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }
    .remove-item-btn {
        margin-left: 0;
        width: 100%;
    }
}

/* Product Detail Specific Styles */
.product-detail-section {
    padding: 50px 0;
}

.product-gallery {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 20px;
}

.main-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para garantir que a imagem inteira seja visível */
}

.thumbnail-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail-gallery img.active,
.thumbnail-gallery img:hover {
    border-color: var(--primary-color);
}

.product-info-details {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 30px;
}

.product-info-details h1 {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-info-details .category-brand {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.product-info-details .price-area {
    margin-bottom: 25px;
}

.product-info-details .current-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.product-info-details .old-price {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 10px;
}

.product-info-details .short-description {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.product-options .form-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-options .form-select,
.product-options .form-control {
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 1rem;
    border-color: var(--border-color);
}

.product-options .form-select:focus,
.product-options .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 105, 180, 0.2);
}

.quantity-selector {
    display: flex;
    align-items: center;
}

.quantity-selector button {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.quantity-selector button:hover {
    background-color: #64B5F6;
}

.quantity-selector input {
    width: 70px;
    text-align: center;
    margin: 0 10px;
    font-size: 1.1rem;
}

.add-to-cart-btn-detail {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
}

.add-to-cart-btn-detail:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.product-tabs .nav-link {
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    margin-right: 5px;
}

.product-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    background-color: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 15px 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* Product List Specific Styles */
.product-list-section {
    padding: 50px 0;
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    margin: 0 3px;
}
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.pagination .page-link:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}
