/**
 * ─────────────────────────────────────────────────────────────────────────────
 * STORE & CART STYLES (Informática Samuray)
 * Suporte a Badges (Outlet, Promoção), Categorias, Pesquisa e Gaveta de Carrinho
 * ─────────────────────────────────────────────────────────────────────────────
 */

:root {
    --store-gold: #d4af37;
    --store-gold-hover: #b8962e;
    --store-red: #ef4444;
    --store-green: #25d366;
    --store-dark-bg: #121212;
    --store-card-bg: #181818;
    --store-border: rgba(255, 255, 255, 0.1);
}

/* ── BADGES DE PRODUTO (OUTLET & PROMOÇÃO) ── */
.product-badge {
    position: absolute !important;
    top: 18px !important;
    left: 18px !important;
    z-index: 10 !important;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    line-height: 1;
}

.product-badge.badge-outlet {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-badge.badge-promocao {
    background: linear-gradient(135deg, #d4af37, #f3c642);
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* ── PREÇOS E DESCONTOS ── */
.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}

.price-original {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.88rem;
    font-weight: 500;
}

.price-current {
    color: var(--store-gold);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.2;
}

.discount-tag {
    background: rgba(212, 175, 55, 0.15);
    color: var(--store-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}

.outlet-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ── BARRA DE PESQUISA DA LOJA ── */
.store-search-container {
    margin: 1.5rem auto 2rem;
    max-width: 650px;
    position: relative;
}

.store-search-form {
    display: flex;
    align-items: center;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 4px 6px 4px 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.store-search-form:focus-within {
    border-color: var(--store-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25), 0 6px 24px rgba(0, 0, 0, 0.35);
}

.store-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 8px 10px;
}

.store-search-input::placeholder {
    color: #888888;
}

.store-search-btn {
    background: var(--store-gold);
    color: #0a0a0a;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.store-search-btn:hover {
    background: var(--store-gold-hover);
    transform: scale(1.02);
}

.store-search-clear {
    background: transparent;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.store-search-clear:hover {
    color: #ffffff;
}

.store-search-feedback {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
    color: #a0a0a0;
}

/* ── PÍLULAS DE CATEGORIAS (HORIZONTAL SCROLL) ── */
.store-categories-wrapper {
    margin: 1.5rem 0 2.5rem;
}

.store-categories-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 4px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.store-categories-pills::-webkit-scrollbar {
    height: 6px;
}

.store-categories-pills::-webkit-scrollbar-track {
    background: transparent;
}

.store-categories-pills::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.25s ease;
    user-select: none;
}

.category-pill:hover {
    border-color: var(--store-gold);
    color: #ffffff;
    transform: translateY(-2px);
    background: #202020;
}

.category-pill.active {
    background: linear-gradient(135deg, var(--store-gold), #e0b93d);
    color: #0a0a0a;
    border-color: var(--store-gold);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.category-pill .cat-count {
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
}

.category-pill.active .cat-count {
    background: rgba(0, 0, 0, 0.2);
    color: #0a0a0a;
}

/* ── BOTÕES DE AÇÃO DOS PRODUTOS ── */
.card-actions-group {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.btn-add-cart {
    flex: 1;
    background: rgba(212, 175, 55, 0.12);
    color: var(--store-gold);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 50px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-add-cart:hover {
    background: var(--store-gold);
    color: #0a0a0a;
    border-color: var(--store-gold);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.btn-buy-direct {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-buy-direct:hover {
    border-color: #25d366;
    color: #25d366;
    background: rgba(37, 211, 102, 0.08);
}

/* ── PÁGINA DO ANÚNCIO (BREADCRUMBS, GALERIA E COMPRA) ── */
.product-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.product-breadcrumbs a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-breadcrumbs a:hover {
    color: var(--store-gold);
}

.product-breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
}

.product-breadcrumbs .current {
    color: var(--store-gold);
    font-weight: 600;
}

.btn-store-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--store-gold);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 7px 16px;
    border-radius: 50px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.btn-store-back:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #ffffff;
    border-color: var(--store-gold);
    transform: translateX(-3px);
}

.product-main-image-box {
    border-radius: 20px;
    overflow: hidden;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.single-ad-purchase-actions,
.single-ad-purchase-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 1.25rem 0 0.75rem;
    width: 100%;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    overflow: hidden;
    padding: 2px;
    height: 38px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.quantity-control button {
    background: transparent;
    border: none;
    color: #ffffff;
    width: 28px;
    height: 32px;
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 50px;
}

.quantity-control button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--store-gold);
}

.quantity-control input {
    width: 28px;
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
}

.btn-single-cart {
    height: 38px;
    padding: 0 16px;
    background: linear-gradient(135deg, #d4af37, #f3c642);
    color: #0a0a0a;
    border: none;
    border-radius: 50px;
    font-family: var(--font-main, inherit);
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.25);
    flex-shrink: 0;
    width: auto;
}

.btn-single-cart:hover {
    background: linear-gradient(135deg, #e5be3e, #fbd968);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(212, 175, 55, 0.35);
}

.btn-single-whatsapp {
    height: 38px;
    padding: 0 16px;
    background: #25d366;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-family: var(--font-main, inherit);
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.25);
    flex-shrink: 0;
    width: auto;
}

.btn-single-whatsapp:hover {
    background: #1ebd5a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(37, 211, 102, 0.35);
}

/* ── OVERLAY E GAVETA LATERAL DO CARRINHO (DRAWER) ── */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 92vw;
    height: 100vh;
    background: #141414;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
}

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

.cart-drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-drawer-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-drawer-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease, transform 0.15s ease;
}

.cart-drawer-close:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

.cart-empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: #94a3b8;
}

.cart-empty-state i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
    display: block;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: 0.92rem;
    color: var(--store-gold);
    font-weight: 700;
    margin-bottom: 8px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-qty-btn-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.cart-qty-btn-group button {
    background: #202020;
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-btn-group button:hover {
    background: #333333;
    color: var(--store-gold);
}

.cart-qty-btn-group span {
    width: 30px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.cart-remove-item {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: opacity 0.2s;
}

.cart-remove-item:hover {
    opacity: 0.7;
}

.cart-drawer-footer {
    padding: 1.15rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #111111;
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.cart-subtotal-row span {
    font-size: 0.9rem;
    color: #a0a0a0;
}

.cart-subtotal-row strong {
    font-size: 1.25rem;
    color: var(--store-gold);
    font-weight: 800;
}

.btn-checkout-whatsapp {
    width: 100%;
    height: 42px;
    background: #25d366;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 0 16px;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.25);
    margin-bottom: 0.6rem;
    text-decoration: none;
}

.btn-checkout-whatsapp:hover {
    background: #1ebd5a;
    color: #ffffff;
    box-shadow: 0 5px 16px rgba(37, 211, 102, 0.35);
    transform: translateY(-1px);
}

.btn-continue-shopping {
    width: 100%;
    height: 36px;
    background: transparent;
    color: #a0a0a0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-continue-shopping:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

/* ── BADGE DE CARRINHO NO HEADER / FLUTUANTE ── */
.header-cart-badge {
    background: var(--store-gold);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    display: inline-block;
    vertical-align: middle;
}

.cart-float-btn {
    position: fixed;
    bottom: 104px;
    right: 35px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--store-gold), #b8962e);
    color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    z-index: 995;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-float-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
}

.cart-float-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #141414;
}

@media (max-width: 640px) {
    .cart-drawer {
        width: 100vw;
        max-width: 100vw;
    }
    .cart-float-btn {
        bottom: 104px;
        right: 35px;
    }
    .single-ad-purchase-actions,
    .single-ad-purchase-row {
        gap: 8px;
        margin: 1rem 0 0.75rem;
    }
    .quantity-control {
        height: 38px;
    }
    .quantity-control button {
        width: 28px;
        height: 32px;
    }
    .quantity-control input {
        width: 28px;
        font-size: 0.9rem;
    }
    .btn-single-cart {
        height: 38px;
        padding: 0 14px;
        font-size: 0.82rem;
        flex: 1;
    }
    .btn-single-whatsapp {
        height: 38px;
        padding: 0 14px;
        font-size: 0.82rem;
        width: 100%;
        margin-top: 4px;
    }
}
