/* Perfex Store - Estilos Principais */

:root {
    --primary: #007bff;
    --success: #28a745;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.store-container { width: 100%; margin: 0 auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* BANNER */
.store-banner {
    background: linear-gradient(135deg, var(--primary), #0056b3);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.store-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.store-banner .banner-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* SEÇÕES */
.store-featured, .store-all-products { padding: 40px 0; }
.store-featured { background-color: var(--light); }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

/* GRID DE PRODUTOS */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* CARD DE PRODUTO */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-card:hover { transform: translateY(-5px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.product-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card:hover .product-overlay { opacity: 1; }

.product-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--success);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* INFORMAÇÕES */
.product-info { padding: 15px; }

.product-title { font-size: 1rem; font-weight: 600; margin-bottom: 5px; }
.product-title a { color: var(--dark); text-decoration: none; }
.product-title a:hover { color: var(--primary); }

.product-category { font-size: 0.8rem; color: #999; margin-bottom: 10px; text-transform: uppercase; }

.product-price { margin-bottom: 8px; display: flex; gap: 8px; }
.current-price { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.old-price { font-size: 0.9rem; color: #999; text-decoration: line-through; }

.installment-text { font-size: 0.8rem; color: #999; margin-bottom: 10px; }

.price-period { font-size: 0.85rem; color: #666; font-weight: 600; align-self: flex-end; }

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #adb5bd;
    background: linear-gradient(145deg, #f8f9fa, #eef1f4);
}

.placeholder-image i { font-size: 2.2rem; }
.placeholder-image span { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.filters-section { margin-bottom: 28px; }

.store-filters-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
}

.filter-search i { color: #adb5bd; flex-shrink: 0; }
.filter-search .form-control { border: none; padding-left: 0; box-shadow: none; background: transparent; }

.filter-submit { white-space: nowrap; min-height: 42px; }

.store-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed var(--border);
    color: #666;
}

.store-empty-state i { font-size: 1.5rem; color: var(--primary); margin-bottom: 10px; display: block; }

.section-subtitle {
    text-align: center;
    color: #666;
    margin: -18px auto 28px;
    max-width: 640px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    box-sizing: border-box;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 40px;
    align-items: start;
}

.product-detail-sidebar { position: sticky; top: 80px; }

.product-gallery--single { grid-template-columns: 1fr !important; }

.product-gallery-placeholder {
    width: 100%;
    min-height: 320px;
    background: linear-gradient(145deg, #f8f9fa, #eef1f4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: #adb5bd;
}

.product-gallery-placeholder i { font-size: 3rem; }
.product-gallery-placeholder span { font-size: 0.9rem; font-weight: 600; }

/* BOTÕES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #0056b3; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #218838; }

.btn-lg { padding: 12px 30px; font-size: 1.1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }

.w-100, .btn-block { width: 100%; display: flex; }

/* RODAPÉ */
.store-footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.store-footer h4 { font-size: 1.1rem; margin-bottom: 15px; font-weight: 600; }

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

.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li { margin-bottom: 8px; }
.footer-section ul li a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-section ul li a:hover { color: white; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; }

/* NAVBAR DA LOJA */
.store-navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.store-navbar .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.store-navbar .logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); text-decoration: none; }

.store-search {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 20px;
    padding: 6px 16px;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.store-search input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 0.95rem;
}

.store-search i { color: #aaa; }

.store-cart-icon {
    position: relative;
    cursor: pointer;
    padding: 8px;
    font-size: 1.3rem;
    color: var(--dark);
}

.cart-badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PÁGINA DE PRODUTO */
.product-detail {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.product-gallery {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.product-gallery-main img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.product-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-gallery-thumbs img {
    width: 70px; height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-gallery-thumbs img.active,
.product-gallery-thumbs img:hover { border-color: var(--primary); }

.product-detail-info { padding: 0 20px; }

.product-detail-info h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; }

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars { color: #f39c12; }

.product-detail-price {
    margin: 20px 0;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
}

.product-detail-price .main-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-detail-price .original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.product-detail-price .installment {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.buy-box { margin: 20px 0; }
.buy-box .btn { width: 100%; margin-bottom: 10px; font-size: 1.1rem; padding: 14px; }

.product-tabs {
    margin-top: 40px;
    border-top: 2px solid var(--border);
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.tabs-nav button {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tabs-nav button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* AVALIAÇÕES */
.reviews-list { margin-top: 20px; }

.review-item {
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.review-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.review-author { font-weight: 600; }
.review-date { color: #999; font-size: 0.85rem; }
.review-text { color: #555; }

/* CHECKOUT */
.checkout-container {
    max-width: 960px;
    width: 100%;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 30px;
    width: 100%;
}

.checkout-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.checkout-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.9rem; }

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,123,255,0.15); }
.form-control.error { border-color: #dc3545; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }

/* Métodos de pagamento */
.payment-methods { display: flex; flex-direction: column; gap: 10px; }

.payment-method-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.payment-method-item:hover,
.payment-method-item.selected { border-color: var(--primary); }

.payment-method-item input[type="radio"] { accent-color: var(--primary); }

.payment-method-icon { font-size: 1.5rem; width: 30px; text-align: center; }
.payment-method-label { font-weight: 600; }
.payment-method-desc { font-size: 0.85rem; color: #666; }

/* Resumo do pedido */
.order-summary {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.order-summary h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

.summary-product {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.summary-product img { width: 60px; height: 50px; object-fit: cover; border-radius: 4px; }
.summary-product-info h5 { font-size: 0.9rem; margin-bottom: 4px; }
.summary-product-info .price { font-weight: 700; color: var(--primary); }

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid var(--border);
}

/* PÁGINA DE AGRADECIMENTO */
.thanks-container {
    max-width: 700px;
    margin: 60px auto;
    padding: 0 15px;
    text-align: center;
}

.thanks-icon { font-size: 5rem; color: var(--success); margin-bottom: 20px; }
.thanks-container h1 { font-size: 2rem; margin-bottom: 10px; }

.order-info-box {
    background: var(--light);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.order-info-box h4 { margin-bottom: 15px; font-weight: 700; }
.order-info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.order-info-row:last-child { border-bottom: none; }

.pix-box {
    background: white;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.pix-code {
    background: var(--light);
    border-radius: 4px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
    margin: 10px 0;
}

/* MINI CARRINHO */
.mini-cart {
    position: fixed;
    top: 0; right: -400px;
    width: 380px; height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mini-cart.open { right: 0; }

.mini-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.mini-cart-overlay.active { display: block; }

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

.mini-cart-items { flex: 1; overflow-y: auto; padding: 20px; }

.mini-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.mini-cart-item img { width: 60px; height: 50px; object-fit: cover; border-radius: 4px; }
.mini-cart-item-info { flex: 1; }
.mini-cart-item-title { font-weight: 600; font-size: 0.9rem; }
.mini-cart-item-price { color: var(--primary); font-weight: 700; }
.mini-cart-item-remove { color: #dc3545; cursor: pointer; font-size: 1.1rem; }

.mini-cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/* TOAST NOTIFICATION */
.store-toast {
    position: fixed;
    bottom: 30px; right: 30px;
    background: var(--dark);
    color: white;
    padding: 14px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 320px;
}

.store-toast.show { transform: translateY(0); opacity: 1; }
.store-toast.success { border-left: 4px solid var(--success); }
.store-toast.error { border-left: 4px solid #dc3545; }

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
    .store-banner h1 { font-size: 1.8rem; }
    .section-title { font-size: 1.5rem; }
    .checkout-grid { grid-template-columns: 1fr; }
    .product-gallery { grid-template-columns: 1fr; }
    .product-gallery-thumbs { flex-direction: row; }
    .product-detail-info { padding: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .mini-cart { width: 100%; right: -100%; }
}

@media (max-width: 576px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .store-banner h1 { font-size: 1.5rem; }
}
