/* Frontbite Storefront Custom Stylesheet */
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 0.5em;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

/* Header & Navbar G2A Style */
.navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(10, 11, 16, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.navbar-main {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Center search box G2A style */
.nav-search-container {
    flex-grow: 1;
    max-width: 650px;
    margin: 0 30px;
}

.g2a-search-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: 8px;
    align-items: center;
    overflow: hidden;
    padding: 3px;
    transition: var(--transition);
}

.g2a-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(255, 255, 255, 0.1);
}

.g2a-search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px 16px;
    flex-grow: 1;
    font-size: 14px;
    outline: none;
}

.g2a-search-bar select {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: 0 15px;
    outline: none;
    cursor: pointer;
    border-left: 1px solid var(--border);
    height: 24px;
}

.g2a-search-bar select option {
    background: var(--bg-surface-solid);
    color: var(--text-main);
}

.g2a-search-btn {
    background: var(--secondary);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.g2a-search-btn:hover {
    background: #0891b2;
    box-shadow: 0 0 10px var(--secondary-glow);
}

/* Nav Actions Right side */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-action-item {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 20px;
}

.nav-action-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-action-item svg {
    width: 18px;
    height: 18px;
}

/* Sub Navigation row */
.navbar-sub {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    font-size: 13px;
}

.sub-nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.sub-nav-item a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.sub-nav-item a:hover {
    color: var(--text-main);
}

.sub-nav-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.sub-badge {
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

/* Loyalty VIP Plus link */
.plus-banner-link {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    box-shadow: 0 0 10px var(--primary-glow);
}

.plus-banner-link:hover {
    box-shadow: 0 0 15px var(--primary-glow);
    filter: brightness(1.1);
}


/* Hero Section G2A Style */
.g2a-hero {
    position: relative;
    padding: 70px 40px 150px 40px;
    background-color: #0b0c13;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.005) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.005) 1px, transparent 1px),
        linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, rgba(10, 11, 16, 1) 100%);
    background-size: 24px 24px, 24px 24px, 100% 100%;
    overflow: hidden;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.hero-glow-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(160px);
    opacity: 0.15;
    top: -200px;
    left: 10%;
    z-index: 1;
}

.hero-glow-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--secondary);
    filter: blur(150px);
    opacity: 0.12;
    bottom: -100px;
    right: 15%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
}

.g2a-hero h1 {
    font-size: 44px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

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

.g2a-hero p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0px;
}

/* G2A Cards Overlay Grid */
.g2a-hero-cards-wrapper {
    position: relative;
    margin-top: -90px;
    z-index: 200;
    padding-bottom: 40px;
}

.g2a-hero-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.g2a-hero-card {
    position: relative;
    height: 350px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #0f101a;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.g2a-hero-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 0 15px var(--secondary-glow);
}

.g2a-hero-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
}

.g2a-hero-card:hover .g2a-hero-card-img {
    transform: scale(1.08);
}

.g2a-hero-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 16, 26, 0) 30%, rgba(15, 16, 26, 0.85) 75%, #0f101a 100%);
    z-index: 2;
}

.g2a-hero-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.g2a-hero-card-content {
    position: relative;
    z-index: 3;
    padding: 20px;
    text-align: left;
}

.g2a-hero-card-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    color: white;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.g2a-hero-card-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.g2a-hero-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.g2a-hero-card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

/* Category pills repositioning */
.category-pills {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    flex-grow: 1;
    font-size: 16px;
    outline: none;
}

.search-box button {
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.search-box button:hover {
    background: #6d28d9;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Category pills */
.category-pills {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.category-pill {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.category-pill:hover, .category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Grid & Cards storefront */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-img {
    height: 180px;
    position: relative;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-tag.key { color: var(--success); }
.product-tag.activation { color: var(--secondary); }
.product-tag.service { color: #f59e0b; }

.product-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.product-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.product-price .original {
    font-size: 11px;
    text-decoration: line-through;
    color: var(--text-muted);
}

.product-price .current {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.btn-buy {
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    transition: var(--transition);
}

.btn-buy:hover {
    background: #6d28d9;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Drawer Cart (Slide-out panel) */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    transition: var(--transition);
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background: var(--bg-surface-solid);
    border-left: 1px solid var(--border);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 20px;
    margin-bottom: 0;
}

.cart-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 13px;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 12px;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    background: rgba(10, 11, 16, 0.9);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

.cart-btn-checkout {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    text-align: center;
    font-weight: 700;
    border-radius: 8px;
    transition: var(--transition);
}

.cart-btn-checkout:hover {
    background: #6d28d9;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Footer storefront */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 60px 40px 30px 40px;
    background: var(--bg-darker);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 30px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(18, 20, 32, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-left: 4px solid var(--primary);
    animation: slideUp 0.3s forwards;
}

/* Product Detail Page Specific */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    padding: 40px 0;
}

.product-detail-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.product-detail-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 38px;
    margin-bottom: 15px;
}

.delivery-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    margin-bottom: 20px;
}

.product-detail-price {
    font-size: 32px;
    font-weight: 800;
    margin: 20px 0;
}

.product-detail-desc {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}

.product-detail-desc ul {
    margin-left: 20px;
    margin-top: 10px;
}

.product-detail-desc li {
    margin-bottom: 8px;
}

/* Responsive viewports storefront */
@media(max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .g2a-hero-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nav-search-container {
        margin: 0 15px;
    }
}

@media(max-width: 768px) {
    .navbar-main {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 12px;
    }
    .logo {
        font-size: 24px;
    }
    .nav-search-container {
        order: 3;
        width: 100%;
        margin: 0;
        max-width: 100%;
    }
    .navbar-sub {
        height: auto;
        padding: 10px 20px;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .sub-nav-menu {
        gap: 18px;
        padding-bottom: 5px;
    }
    .sub-nav-item a {
        white-space: nowrap;
    }
    .plus-banner-link {
        display: none; /* Hide loyalty link on mobile */
    }
    .g2a-hero-cards-grid {
        grid-template-columns: 1fr;
    }
    .g2a-hero-cards-wrapper {
        margin-top: -50px;
    }
    .g2a-hero {
        padding: 50px 20px 100px 20px;
    }
    .g2a-hero h1 {
        font-size: 28px;
    }
    .g2a-search-bar select {
        display: none; /* Hide category select inside input box on mobile */
    }
    .nav-actions {
        gap: 10px;
    }
    .nav-action-item span {
        display: none; /* Hide action texts (like 'Entrar') to save space */
    }
}
