@import url('style.css');

/* Shop overrides */
.shop-hero { padding: calc(var(--nav-total-h, 72px) + 48px) 0 40px; text-align: center; border-bottom: 1px solid var(--border); }
.shop-hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 12px; }
.shop-hero p { color: var(--text-muted); }
.shop-layout { padding: 40px 0 80px; }
.shop-inner { display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.shop-sidebar h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-dim); margin-bottom: 16px; }
.category-nav { display: flex; flex-direction: column; gap: 0; }
.category-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; font-size: 0.75rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.45); background: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}
.category-nav a::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: transparent; flex-shrink: 0;
    transition: background 0.2s;
}
.category-nav a:hover { color: rgba(255,255,255,0.85); opacity: 1; }
.category-nav a.active { color: #fff; }
.category-nav a.active::before { background: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.product-card:hover { border-color: #444; transform: translateY(-2px); }
.product-card-link { display: block; }
.product-image { aspect-ratio: 1; position: relative; overflow: hidden; background: var(--bg-elevated); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #0a0a0a; }
.product-placeholder-label { font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.25); }
.product-category-tag {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    padding: 6px 12px; border-radius: 2px;
    font-size: 0.625rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: rgba(255,255,255,0.8);
}
.product-info { padding: 20px; }
.product-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.product-desc { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.product-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-weight: 700; font-size: 1.0625rem; }
.product-cta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }

/* Product detail */
.product-detail { padding: 40px 0 80px; }
.product-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.2s;
}
.product-back-link:hover { color: var(--text); opacity: 1; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.product-gallery-main { margin-bottom: 12px; }
.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.product-gallery-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s;
}
.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    opacity: 1;
    border-color: var(--text);
}
.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-detail-img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); transition: opacity 0.25s ease; }
.product-detail-placeholder { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #0a0a0a; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.product-detail-placeholder .product-placeholder-label { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.25); }
.product-detail-cat { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.product-detail-info h1 { font-family: var(--font-display); font-size: 2.5rem; margin: 8px 0 16px; }
.product-detail-price { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.product-detail-desc { color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; }
.size-picker, .color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.size-option input, .color-chip input { display: none; }
.size-option span { display: block; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; transition: var(--transition); }
.size-option input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.color-chip-inner { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.color-chip input:checked + .color-chip-inner { border-color: var(--text); }
.color-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); }
.color-dot.is-light { border-color: rgba(0,0,0,0.2); }
.color-label { font-size: 0.8125rem; }
.qty-input { max-width: 100px; }
.product-trust { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; font-size: 0.875rem; color: var(--text-muted); }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.cart-table td { padding: 16px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-preview { width: 60px; height: 60px; border-radius: var(--radius); object-fit: cover; }
.cart-summary { max-width: 400px; margin-left: auto; margin-top: 32px; padding: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-muted); }
.cart-summary-total { font-size: 1.25rem; font-weight: 700; color: var(--text); border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding: 40px 0 80px; }
.checkout-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.checkout-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; height: fit-content; position: sticky; top: 100px; }
.payment-options { display: flex; flex-direction: column; gap: 12px; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--text); }
.payment-option input { accent-color: var(--text); }

/* Auth */
.auth-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: calc(var(--nav-total-h, 72px) + 48px) 20px 60px; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 5vw, 40px); }
.auth-card h1 { font-family: var(--font-display); font-size: 2rem; text-align: center; margin-bottom: 8px; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 0.9375rem; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--text-muted); }

/* User menu */
.cart-btn { position: relative; opacity: 0.8; }
.cart-badge { position: absolute; top: -6px; right: -6px; background: var(--text); color: var(--bg); font-size: 0.6875rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.user-menu { position: relative; }
.user-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; color: var(--text); overflow: hidden; padding: 0; display: flex; align-items: center; justify-content: center; }
.avatar-initial { font-weight: 600; font-size: 0.875rem; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Account page */
.account-page { padding: 40px 0 80px; }
.account-layout { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.account-profile-card,
.account-orders-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.account-profile-card h2,
.account-orders-card h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 24px; }
.account-password-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.account-password-section h3 { font-size: 1.125rem; margin-bottom: 20px; }
.profile-avatar-block { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-avatar-preview { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-initial { font-size: 2rem; font-weight: 700; color: var(--text-muted); }
.profile-avatar-actions { display: flex; flex-direction: column; gap: 10px; }
.profile-upload-btn { cursor: pointer; margin: 0; }
.profile-upload-btn input { display: none; }
.profile-remove-avatar { font-size: 0.8125rem; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.form-hint { font-size: 0.8125rem; color: var(--text-dim); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input.form-control:disabled,
input.form-control[readonly] { opacity: 0.65; cursor: not-allowed; background: rgba(255,255,255,0.03); }
.account-logout { margin-top: 32px; }
.dropdown { display: none; position: absolute; right: 0; top: 100%; margin-top: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); min-width: 180px; overflow: hidden; z-index: 100; }
.dropdown.open { display: block; }
.dropdown a { display: block; padding: 12px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border); }
.dropdown a:last-child { border-bottom: none; }

/* Order detail & receipt */
.order-detail-wrap { padding: 0 0 80px; }
.order-status-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.order-status-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.order-status-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 8px; }
.order-notice { padding: 20px 24px; border-radius: var(--radius-lg); margin-bottom: 24px; line-height: 1.7; }
.order-notice--info { background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.order-notice--success { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25); }
.order-notice p { color: var(--text-muted); margin-bottom: 8px; }
.order-notice p:last-child { margin-bottom: 0; }
.order-detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.order-detail-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.order-detail-card h2 { font-size: 1.125rem; margin-bottom: 16px; }
.order-totals { max-width: 320px; margin-left: auto; margin-top: 20px; }

.receipt-wrap { padding: 0 0 80px; max-width: 800px; }
.receipt-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.receipt-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.receipt-header h2 { margin: 0 0 4px; font-size: 1.5rem; }
.receipt-header p { margin: 0; color: var(--text-muted); }
.receipt-meta { margin-bottom: 24px; color: var(--text-muted); line-height: 1.8; }
.receipt-meta p { margin: 0 0 4px; }
.receipt-footer-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); text-align: center; }
.receipt-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

@media print {
    .site-header, .site-footer, .page-header, .receipt-actions, .product-back-link, .flash { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .receipt-card { border: none; padding: 0; }
    .receipt-wrap { max-width: 100%; padding: 0; }
    .cart-table th, .cart-table td { color: #000 !important; border-color: #ccc !important; }
}

@media (max-width: 900px) {
    .shop-inner { grid-template-columns: 1fr; }
    .shop-sidebar { display: none; }
    .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-sidebar { position: static; top: auto; }
    .order-status-cards { grid-template-columns: 1fr; }
    .order-detail-grid { grid-template-columns: 1fr; }
    .account-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .product-detail-info h1 { font-size: clamp(1.75rem, 7vw, 2.25rem); }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
    .shop-hero { padding: calc(var(--nav-total-h, 72px) + 32px) 0 32px; }
    .checkout-form,
    .checkout-sidebar,
    .account-profile-card,
    .account-orders-card,
    .receipt-card,
    .order-detail-card { padding: 20px; }
    .order-totals { max-width: 100%; }
    .receipt-header { flex-direction: column; text-align: center; gap: 12px; }
}

/* Carrinho responsivo — tabela vira cards */
@media (max-width: 680px) {
    .cart-table thead { display: none; }
    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td { display: block; width: 100%; }
    .cart-table tr {
        background: var(--bg-card); border: 1px solid var(--border);
        border-radius: var(--radius-lg); padding: 12px 16px; margin-bottom: 16px;
    }
    .cart-table td {
        display: flex; justify-content: space-between; align-items: center;
        gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border);
        text-align: right;
    }
    .cart-table td:last-child { border-bottom: none; }
    .cart-table td::before {
        content: attr(data-label);
        font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em;
        color: var(--text-dim); flex-shrink: 0; text-align: left;
    }
    .cart-remove-cell { justify-content: flex-end; }
    .cart-remove-cell::before { content: none; }
    .cart-summary { max-width: 100%; margin-left: 0; }
}
