/* =========================================================
   DS INFORMÁTICA
   STYLE.CSS
   ========================================================= */

:root {
    --primary: #155eef;
    --primary-dark: #0d47c7;
    --secondary: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #15803d;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(15, 23, 42, .08);
    --container: 1180px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--light);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.top {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.brand span {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    font-weight: 900;
}

.nav nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: color .2s ease;
}

.nav nav a:hover {
    color: var(--primary);
}

#cartCount {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 80px 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(21, 94, 239, .12), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 60px;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -2px;
    color: var(--secondary);
}

.hero p {
    max-width: 650px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 18px;
}

.hero-card {
    min-height: 320px;
    padding: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.hero-card strong {
    font-size: 30px;
    color: var(--primary);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(21, 94, 239, .18);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: #020617;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
}

.btn-success {
    background: var(--success);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
    padding: 70px 0;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    margin: 0 0 8px;
    color: var(--secondary);
    font-size: 32px;
    line-height: 1.2;
}

.section-header p {
    margin: 0;
    color: var(--muted);
}


/* =========================================================
   CATEGORIAS
   ========================================================= */

.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.category-card {
    min-height: 130px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(21, 94, 239, .3);
    box-shadow: var(--shadow);
}

.category-card strong {
    font-size: 18px;
    margin-bottom: 5px;
}

.category-card span {
    color: var(--muted);
    font-size: 14px;
}


/* =========================================================
   PRODUTOS
   ========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 20px;
}

.product-category {
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.product-card h3 {
    min-height: 50px;
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.4;
}

.product-description {
    min-height: 44px;
    margin: 0 0 15px;
    color: var(--muted);
    font-size: 13px;
}

.product-price {
    margin-bottom: 15px;
    color: var(--secondary);
    font-size: 24px;
    font-weight: 800;
}

.product-old-price {
    margin-right: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-actions .btn {
    flex: 1;
}


/* =========================================================
   BUSCA
   ========================================================= */

.search-box {
    margin-bottom: 30px;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
}


/* =========================================================
   FORMULÁRIOS
   ========================================================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    outline: none;
    background: var(--white);
    color: var(--text);
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 94, 239, .1);
}

.form-help {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}


/* =========================================================
   PRODUCT PAGE
   ========================================================= */

.product-page {
    padding: 60px 0;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.detail-image {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
}

.detail-image img {
    width: 100%;
    max-height: 430px;
    object-fit: contain;
}

.product-detail h1 {
    margin: 0 0 15px;
    font-size: 40px;
    line-height: 1.1;
    color: var(--secondary);
}

.detail-description {
    margin: 25px 0;
    color: var(--muted);
}

.stock {
    margin: 15px 0;
    color: var(--success);
    font-size: 14px;
    font-weight: 700;
}

.out-of-stock {
    color: var(--danger);
}


/* =========================================================
   CART
   ========================================================= */

.cart-page {
    padding: 60px 0;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info h3 {
    margin: 0 0 5px;
    font-size: 17px;
}

.cart-item-info p {
    margin: 3px 0;
    color: var(--muted);
    font-size: 13px;
}

.cart-item-price {
    font-weight: 800;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
    background: var(--white);
}

.quantity-control button {
    width: 38px;
    height: 38px;
    border: 0;
    background: #f8fafc;
    color: var(--secondary);
    font-weight: 800;
}

.quantity-control input {
    width: 48px;
    min-height: 38px;
    padding: 5px;
    border: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    text-align: center;
}

.cart-summary {
    position: sticky;
    top: 100px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.cart-summary h2 {
    margin-top: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
    font-size: 21px;
    font-weight: 800;
}


/* =========================================================
   CHECKOUT
   ========================================================= */

.checkout {
    padding: 60px 0;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.checkout-section {
    margin-bottom: 25px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.checkout-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 21px;
}

.payment-options {
    display: grid;
    gap: 12px;
}

.payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.payment-option:hover {
    border-color: var(--primary);
    background: #f8fbff;
}

.payment-option input {
    width: auto;
    min-height: auto;
}

.checkout-product {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.checkout-product:last-child {
    border-bottom: 0;
}

.checkout-legal {
    margin-top: 15px;
    color: var(--muted);
    font-size: 12px;
}


/* =========================================================
   ORDER CONFIRMATION
   ========================================================= */

.order-confirmation {
    padding: 80px 0;
}

.confirmation-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 45px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    text-align: center;
}

.success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--success);
    font-size: 35px;
    font-weight: 900;
}

.confirmation-card h1 {
    margin: 0 0 10px;
    color: var(--secondary);
}

.order-number {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    background: #f8fafc;
    font-weight: 800;
}

.confirmation-product {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.confirmation-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================================
   NOTICES
   ========================================================= */

.notice {
    margin: 20px 0;
    padding: 15px 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
}

.notice.success,
.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.notice.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.notice.warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty {
    padding: 60px 25px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
}

.empty h2 {
    margin-top: 0;
}


/* =========================================================
   BENEFITS
   ========================================================= */

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.benefit {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.benefit strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.benefit p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    margin-top: 60px;
    background: var(--secondary);
    color: #cbd5e1;
}

.footer-grid {
    padding: 55px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-column strong {
    display: block;
    margin-bottom: 15px;
    color: var(--white);
    font-size: 16px;
}

.footer-column p {
    margin: 0 0 12px;
    font-size: 14px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 12px;
}

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

.footer-links li {
    margin-bottom: 9px;
    font-size: 14px;
}

.footer-links a {
    color: #cbd5e1;
    transition: color .2s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-bottom-content {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
}


/* =========================================================
   GENERIC CONTENT PAGES
   ========================================================= */

.page-header {
    padding: 60px 0 30px;
}

.page-header h1 {
    margin: 0 0 10px;
    color: var(--secondary);
    font-size: 40px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.content-card {
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.content-card h2 {
    margin-top: 30px;
    color: var(--secondary);
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card p,
.content-card li {
    color: var(--text);
}

.content-card li {
    margin-bottom: 7px;
}


/* =========================================================
   404
   ========================================================= */

.error-page {
    min-height: 60vh;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page h1 {
    margin: 0;
    color: var(--primary);
    font-size: 90px;
    line-height: 1;
}

.error-page h2 {
    margin: 15px 0;
    color: var(--secondary);
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .hero-grid,
    .product-detail,
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cart-summary {
        position: static;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .container {
        width: min(var(--container), calc(100% - 28px));
    }

    .nav {
        min-height: auto;
        padding: 15px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .nav nav {
        width: 100%;
        overflow-x: auto;
        gap: 18px;
        padding-bottom: 3px;
    }

    .nav nav a {
        white-space: nowrap;
        font-size: 13px;
    }

    .hero {
        padding: 55px 0;
    }

    .hero h1 {
        font-size: 40px;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 16px;
    }

    .section,
    .product-page,
    .cart-page,
    .checkout {
        padding: 45px 0;
    }

    .section-header h2 {
        font-size: 27px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image {
        height: 170px;
        padding: 15px;
    }

    .product-info {
        padding: 15px;
    }

    .product-card h3 {
        min-height: auto;
        font-size: 15px;
    }

    .product-description {
        display: none;
    }

    .product-price {
        font-size: 20px;
    }

    .product-actions {
        flex-direction: column;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .two,
    .three {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cart-item {
        grid-template-columns: 75px 1fr;
        gap: 12px;
    }

    .cart-item-image {
        width: 75px;
        height: 75px;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .detail-image {
        min-height: 300px;
    }

    .product-detail h1 {
        font-size: 31px;
    }

    .search-box form {
        flex-direction: column;
    }

    .confirmation-card {
        padding: 30px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 0;
    }

    .footer-bottom-content {
        padding: 18px 0;
        flex-direction: column;
        align-items: flex-start;
    }

}


/* =========================================================
   RESPONSIVE - SMALL MOBILE
   ========================================================= */

@media (max-width: 430px) {

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 220px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .btn {
        width: 100%;
    }

    .confirmation-actions .btn {
        width: 100%;
    }

}