/* Global Vars */
:root {
    --bg-color: #020617;
    /* Very dark blue/black */
    --surface-color: #0f172a;
    /* Dark blue-gray */
    --card-bg: #111827;
    --primary-color: #2563eb;
    /* Bright Blue */
    --primary-hover: #1d4ed8;
    --accent-green: #22c55e;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #1e293b;
    --font-main: 'Geist Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-blue {
    color: var(--primary-color);
}

/* Header */
header {
    background-color: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    white-space: nowrap;
}

.logo-img {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    border-radius: 6px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.cart-icon:hover {
    color: var(--text-color);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    /* Red */
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.btn-login {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Changed from start to center for vertical alignment */
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 50%;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-color);
}

.hero-image {
    position: relative;
    width: 45%;
    display: flex;
    justify-content: flex-end;
    /* Push image to the right */
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.3));
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Categories */
.categories {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--text-color);
    border-color: var(--text-muted);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/5;
    /* Taller card */
    cursor: pointer;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.category-overlay h3 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Products Section */
.products {
    margin-bottom: 4rem;
}

.section-tags {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag.active,
.tag:hover {
    background-color: var(--card-bg);
    /* slightly lighter */
    color: var(--text-color);
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.product-card:hover {
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.lightning-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.product-info {
    padding: 1.25rem;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 2.5em;
    /* approximate 2 lines */
    line-height: 1.4;
}

.price-block {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-muted);
}

.discount-badge {
    color: var(--accent-green);
    font-weight: 600;
}

.current-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.platform-icons {
    display: flex;
    gap: 0.5rem;
}

.platform {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    /* Brand color usually but muted here */
}

.platform.android {
    color: #3ddc84;
    background-color: rgba(61, 220, 132, 0.1);
    border-color: rgba(61, 220, 132, 0.2);
}

.platform.ios {
    color: #a2aaad;
    background-color: rgba(162, 170, 173, 0.1);
    border-color: rgba(162, 170, 173, 0.2);
}

.platform.windows {
    color: #00a4ef;
    background-color: rgba(0, 164, 239, 0.1);
    border-color: rgba(0, 164, 239, 0.2);
}

/* Lightning bolt icon - yellow/gold */
.platform i.fa-bolt {
    color: #fbbf24;
}

.payment-method {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-buy {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-buy:hover {
    background-color: var(--primary-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 1rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        width: 80%;
        margin-bottom: 2rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }
}

/* Breadcrumb */
.breadcrumb {
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a:hover {
    color: var(--text-color);
}

.breadcrumb .current {
    color: var(--text-color);
}

.breadcrumb i {
    font-size: 0.75rem;
}

/* Product Page Layout */
.product-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
}

.product-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Product Detail Card */
.product-detail-card {
    background-color: var(--card-bg);
    /* Use card bg for contrast */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
}

.product-detail-image {
    width: 500px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    border: 1px solid var(--border-color);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.dot {
    font-size: 0.5rem;
    vertical-align: middle;
}

.product-detail-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.detail-old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 1rem;
}

.detail-discount {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--accent-green);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-buy-large {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-buy-large:hover {
    background-color: var(--primary-hover);
}

.btn-add-cart {
    background-color: transparent;
    color: white;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    width: 100%;
}

.btn-add-cart:hover {
    border-color: white;
}

/* Description Box */
.description-box {
    background: transparent;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.description-box h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.description-content {
    color: var(--text-color);
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

/* Sidebar Widgets */
.product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.widget-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.widget-item:last-child {
    margin-bottom: 0;
}

.widget-item i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.widget-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.widget-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.sidebar-widget h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.payment-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.payment-icons {
    display: flex;
    gap: 0.5rem;
}

.pix-icon {
    background-color: var(--surface-color);
    border: 1px solid var(--accent-green);
    /* Green border for Pix */
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(34, 197, 94, 0.05);
}

/* Responsive Product */
@media (max-width: 1024px) {
    .product-wrapper {
        grid-template-columns: 1fr;
    }

    .product-detail-card {
        flex-direction: column;
    }

    .product-detail-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

html {
    scroll-behavior: smooth;
}

/* Overrides for smaller categories (adjusted to be slightly larger per request) */
.categories-grid {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

.category-card {
    width: 120px !important;
    height: 160px !important;
    aspect-ratio: auto !important;
    border-radius: 8px !important;
}

.category-overlay {
    display: none !important;
}

/* Mobile Product Grid Adjustment */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        /* Center content if we limit width */
        justify-items: center;
    }

    .product-card {
        width: 100%;
        max-width: 320px;
        /* Limits width so it's not too 'fat' */
    }
}