/* ═══════════════════════════════════════════════════════════════════════════
   LOJA VIRTUAL — CUSTOM CSS  (Bootstrap 5 complement)
   Inspirado em MercadoLivre + Shopee
═══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary:       #9B111E;
    --primary-dark:  #7F0E18;
    --secondary:     #FFE600;
    --secondary-dark:#f0d500;
    --whatsapp:      #25D366;
    --whatsapp-dark: #1ebe5d;
    --topbar-bg:     #FFE600;
    --topbar-text:   #1a1a1a;
    --header-bg:     #FFD32C;
    --catbar-bg:     #FFD32C;
    --catbar-text:   #ffffff;
    --card-radius:   12px;
    --badge-sale:    #EE4D2D;
    --text-muted:    #6c757d;
    --footer-bg:     #1a1c29;
    --footer-text:   #a0a8b8;
    --font:          'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font);
    color: #333;
    background: #f5f5f8;
}

/* ── TOP BAR ─────────────────────────────────────────────────────────────── */
.topbar {
    background: var(--topbar-bg);
    color: var(--topbar-text);
    font-size: .82rem;
    padding: .4rem 0;
    line-height: 1.4;
}
.topbar a { color: var(--topbar-text); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--header-bg);
    z-index: 1030;
}
.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.store-logo { max-height: 52px; width: auto; }

/* Busca */
.search-form .search-input {
    border: 2px solid var(--primary);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    padding: .55rem 1rem;
    font-size: .95rem;
    background: #f0f4ff;
}
.search-form .search-input:focus {
    box-shadow: none;
    border-color: var(--primary-dark);
    background: #fff;
}
.btn-search {
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: .55rem 1.2rem;
    font-size: 1.05rem;
    transition: background .2s;
}
.btn-search:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

/* Carrinho no header */
.btn-cart {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .5rem 1rem;
    font-size: .9rem;
    text-decoration: none;
    transition: background .2s;
}
.btn-cart:hover { background: var(--primary-dark); color: #fff; }
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--badge-sale);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

/* ── CATEGORY NAV ────────────────────────────────────────────────────────── */
.category-nav {
    background: var(--catbar-bg);
    padding: .35rem 0;
    z-index: 1020;
    position: relative;
}
.nav-cat-link {
    color: #000000;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    padding: .3rem .7rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav-cat-link:hover, .nav-cat-link.active {
    background: rgba(0,0,0,.1);
    color: #000;
}
.btn-nav-toggle {
    color: #000;
    background: rgba(0,0,0,.1);
    border: none;
    font-size: .85rem;
    padding: .3rem .8rem;
    border-radius: 6px;
}

.category-section {
    background: linear-gradient(180deg, var(--header-bg) 0%, #f5f5f8 100%);
}

/* ── HERO CAROUSEL ───────────────────────────────────────────────────────── */
.hero-carousel .carousel-item {
    min-height: 340px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 0;
}
.hero-carousel .carousel-item.active,
.hero-carousel .carousel-item.carousel-item-next,
.hero-carousel .carousel-item.carousel-item-prev {
    display: flex;
    align-items: center;
}
.hero-carousel .carousel-caption {
    position: relative;
    left: auto; right: auto; bottom: auto;
    text-align: left;
    padding: 2.5rem;
}
.hero-carousel .carousel-caption h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-carousel .carousel-indicators [data-bs-target] {
    background-color: rgba(255,255,255,.6);
}
.hero-carousel .carousel-indicators .active { background-color: #fff; }

/* ── SECTION TITLES ──────────────────────────────────────────────────────── */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    position: relative;
    padding-bottom: .5rem;
    margin-bottom: 1.25rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 48px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* ── PRODUCT CARD ────────────────────────────────────────────────────────── */
.product-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
    height: 100%;
    display: flex; flex-direction: column;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.product-card-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex; align-items: center; justify-content: center;
}
.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.product-card:hover .product-card-img-wrap img { transform: scale(1.05); }
.product-card-img-wrap .no-image {
    font-size: 4rem;
    color: #ccc;
}
.product-card-body {
    padding: .85rem;
    flex: 1;
    display: flex; flex-direction: column;
}
.product-card-category {
    font-size: .72rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .2rem;
}
.product-card-title {
    font-size: .92rem;
    font-weight: 600;
    color: #222;
    margin-bottom: .4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.product-card-original-price {
    font-size: .78rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.product-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
}
.product-card-footer {
    padding: .75rem .85rem;
    border-top: 1px solid #f0f0f0;
    display: flex; gap: .5rem;
}
.badge-discount {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--badge-sale);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 5px;
    z-index: 2;
}
.badge-featured {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--secondary);
    color: #333;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 5px;
    z-index: 2;
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-whatsapp {
    background: var(--whatsapp);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    padding: .65rem 1.5rem;
    font-size: 1rem;
    display: inline-flex; align-items: center; gap: .5rem;
    transition: background .2s;
    text-decoration: none;
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); color: #fff; }
.btn-whatsapp-footer {
    background: var(--whatsapp);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    padding: .4rem .9rem;
    text-decoration: none;
    display: inline-flex; align-items: center;
    transition: background .2s;
}
.btn-whatsapp-footer:hover { background: var(--whatsapp-dark); color: #fff; }

/* ── CATEGORY CARDS ──────────────────────────────────────────────────────── */
.cat-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 1.2rem 1rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    transition: transform .2s, box-shadow .2s, background .2s;
    display: block;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    background: var(--primary);
    color: #fff;
}
.cat-card-icon {
    font-size: 2.2rem;
    margin-bottom: .5rem;
    display: block;
}
.cat-card-name { font-size: .88rem; font-weight: 600; }

/* ── COUPON CARDS ────────────────────────────────────────────────────────── */
.coupon-card {
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}
.coupon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.coupon-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    align-items: center;
    text-align: center;
}
.coupon-card-discount {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.coupon-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.coupon-card-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .9;
    margin-top: .3rem;
}
.coupon-card-code-display {
    background: rgba(255,255,255,.2);
    padding: .6rem 1rem;
    border-radius: 6px;
}
.coupon-card-code-display code {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: none;
    padding: 0;
    border: none;
    font-family: 'Courier New', monospace;
}
.coupon-card-body {
    padding: 1.2rem;
}
.coupon-card-info {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.coupon-card-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: .5rem;
}

/* ── PRODUCT DETAIL PAGE ─────────────────────────────────────────────────── */
.product-detail-img {
    border-radius: var(--card-radius);
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.product-detail-img img {
    width: 100%;
    border-radius: 8px;
    object-fit: contain;
    max-height: 420px;
}
.product-detail-panel {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: #222;
}
.product-detail-original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.qty-input {
    width: 80px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: .4rem;
    font-size: 1rem;
}

/* ── CART ────────────────────────────────────────────────────────────────── */
.cart-table { background: #fff; border-radius: var(--card-radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.cart-table thead th { background: var(--primary); color: #fff; font-weight: 600; border: none; }
.cart-summary {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.cart-total-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

/* ── SIDEBAR / FILTERS ───────────────────────────────────────────────────── */
.filter-sidebar {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.filter-sidebar h6 {
    font-weight: 700;
    color: #333;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #eee;
}

/* ── BREADCRUMB ──────────────────────────────────────────────────────────── */
.breadcrumb-wrap {
    background: #fff;
    padding: .7rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}
.breadcrumb { margin: 0; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: #666; }

/* ── PAGINATION ──────────────────────────────────────────────────────────── */
.page-link {
    color: var(--primary);
    border-radius: 6px !important;
    margin: 0 2px;
}
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.footer-top { padding: 3rem 0 2rem; }
.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1rem;
}
.footer-text { font-size: .88rem; line-height: 1.7; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: var(--footer-text); text-decoration: none; font-size: .88rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; font-size: .87rem; }
.footer-contact i { margin-top: .15rem; color: var(--primary); flex-shrink: 0; }
.social-links { display: flex; gap: .75rem; }
.social-links a {
    color: var(--footer-text);
    font-size: 1.25rem;
    transition: color .2s, transform .2s;
}
.social-links a:hover { color: #fff; transform: translateY(-2px); }
.footer-bottom {
    background: rgba(0,0,0,.25);
    padding: .85rem 0;
    font-size: .82rem;
    color: var(--footer-text);
}

/* ── UTILS ───────────────────────────────────────────────────────────────── */
.section-gap { padding: 2.5rem 0; }
.bg-section { background: #fff; border-radius: var(--card-radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.empty-state { text-align: center; padding: 4rem 1rem; color: #aaa; }
.empty-state i { font-size: 4rem; display: block; margin-bottom: 1rem; }

@media (max-width: 768px) {
    .hero-carousel .carousel-item { min-height: 220px; }
    .hero-carousel .carousel-caption h2 { font-size: 1.3rem; }
    .hero-carousel .carousel-caption { padding: 1.2rem; }
}
