:root {
    --bg-color: #0B0B0F;
    --surface-color: rgba(25, 25, 35, 0.6);
    --primary-color: #8A2BE2;
    --secondary-color: #00E5FF;
    --text-main: #FFFFFF;
    --text-muted: #A0A0B0;
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(11, 11, 15, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
    margin-top: 2rem;
}

.hero-content {
    max-width: 800px;
    z-index: 10;
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(90deg, var(--primary-color), #6A1B9A);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(138, 43, 226, 0.4);
}

/* Glowing Background Circle */
.glow-circle {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

/* Products Section */
.products-section {
    padding: 6rem 5%;
    position: relative;
    z-index: 5;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}


.product-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    flex: 0 0 auto; /* prevent shrinking */
    min-width: 300px; /* ensure enough width for image & text */
    margin-right: 1rem; /* spacing between cards */
}


.product-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.highlight-card {
    border-color: rgba(138, 43, 226, 0.3);
    position: relative;
}

.highlight-card::before {
    content: "Mais Vendido";
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--primary-color);
    color: white;
    padding: 5px 30px;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0e0e1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .card-img {
    transform: scale(1.04);
}

/* Legacy fallback for dynamically-added cards */
.card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0e0e1a;
    border-bottom: 1px solid var(--glass-border);
}

.card-content {
    padding: 1.8rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}

.badge.highlight {
    background: rgba(0, 229, 255, 0.1);
    color: var(--secondary-color);
    border-color: rgba(0, 229, 255, 0.3);
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.price {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
}

.btn-buy {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

.btn-buy:hover {
    background: var(--secondary-color);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* Footer */
footer {
    background: rgba(15, 15, 20, 0.8);
    border-top: 1px solid var(--glass-border);
    text-align: center;
    padding: 5rem 5% 2rem;
    position: relative;
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--text-main);
    color: var(--bg-color);
}

.footer-bottom {
    margin-top: 5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile card background fix */
    .product-card {
        background: var(--bg-color);
        border: 1px solid var(--glass-border);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        min-width: 100%;
        width: 100%;
        margin-right: 0;
        flex: none;
    }

    /* Images stay contained on tablet */
    .card-image-wrapper,
    .card-image {
        aspect-ratio: 4 / 3;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
}

/* Add Product Card */
.add-product-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: transparent;
    cursor: pointer;
    min-height: 380px;
}

.add-product-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.add-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.add-product-card:hover .add-icon {
    color: var(--primary-color);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    backdrop-filter: blur(15px);
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Edit Button */
.edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.edit-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Additional Mobile Responsiveness */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 0.9rem;
    padding: 0 10px;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
  }
  .product-grid {
    gap: 1.5rem;
  }
  .product-card {
    margin: 0 auto;
  }

  /* Images stay contained on small screens */
  .card-image-wrapper,
  .card-image {
    aspect-ratio: 4 / 3;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
  .card-content h3 {
    font-size: 1.2rem;
  }
  .card-content p {
    font-size: 0.9rem;
  }
  .price {
    font-size: 1.4rem;
  }
  .navbar {
    padding: 1rem 2%;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.8rem;
  }
}
