:root {
    --primary: #8c52ff;
    --secondary: #ff5757;
    --text: #242424;
    --muted: #707070;
    --border: #e5e5e5;
    --background: #f7f7f9;
    --white: #ffffff;
    --success: #219653;
    --radius: 10px;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.5;
}

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

/* Caminho de navegação */

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 18px 0;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

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

/* Área principal */

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
    gap: 42px;
    align-items: start;
    padding-bottom: 40px;
}

/* Galeria */

.product-gallery {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
}

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

.gallery-thumb {
    width: 76px;
    height: 76px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: 0.2s ease;
}

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

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-main-image {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
}

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

/* Informações do produto */

.product-info {
    position: sticky;
    top: 20px;
}

.product-title {
    margin-bottom: 10px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
}

.product-description {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 14px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.product-rating .stars {
    color: #f5a623;
    letter-spacing: 2px;
}

/* Campos */

.product-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-group {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.option-label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 700;
}

.option-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cccccc;
    border-radius: 7px;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.option-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(140, 82, 255, 0.12);
}

/* Botões de formato */

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-button {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    transition: 0.2s ease;
}

.option-button:hover {
    border-color: var(--primary);
}

.option-button.active {
    border-color: var(--primary);
    background: rgba(140, 82, 255, 0.08);
    color: var(--primary);
    font-weight: 700;
}

/* Quantidades */

.quantity-box {
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.quantity-header,
.quantity-row {
    display: grid;
    grid-template-columns: 44px 1fr 120px 120px;
    align-items: center;
    gap: 8px;
    padding: 13px 14px;
}

.quantity-header {
    background: var(--background);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.quantity-row {
    border-top: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.quantity-row:hover {
    background: #faf8ff;
}

.quantity-row.active {
    background: rgba(140, 82, 255, 0.07);
}

.quantity-row input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.unit-price {
    font-size: 13px;
    color: var(--muted);
}

.total-price {
    font-weight: 700;
}

/* Resumo e compra */

.purchase-card {
    margin-top: 25px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.discount-badge {
    display: inline-flex;
    padding: 5px 9px;
    margin-bottom: 8px;
    border-radius: 5px;
    background: rgba(255, 87, 87, 0.12);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 700;
}

.old-price {
    display: block;
    color: var(--muted);
    font-size: 13px;
    text-decoration: line-through;
}

.current-price {
    margin: 4px 0;
    font-size: 32px;
    font-weight: 800;
}

.installments {
    color: var(--muted);
    font-size: 13px;
}

.purchase-actions {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    margin-top: 18px;
}

.quantity-input {
    width: 100%;
    height: 50px;
    padding: 0 10px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 16px;
}

.buy-button {
    min-height: 50px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(
        90deg,
        var(--secondary),
        var(--primary)
    );
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.buy-button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Especificações */

.product-section {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.section-title {
    margin-bottom: 22px;
    font-size: 25px;
}

.specification-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.specification-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    border-bottom: 1px solid var(--border);
}

.specification-row:last-child {
    border-bottom: 0;
}

.specification-label,
.specification-value {
    padding: 14px 16px;
    font-size: 14px;
}

.specification-label {
    background: var(--background);
    font-weight: 700;
}

.product-content h2 {
    margin: 30px 0 12px;
    font-size: 24px;
}

.product-content p,
.product-content li {
    color: #4f4f4f;
    font-size: 15px;
    line-height: 1.75;
}

.product-content ol,
.product-content ul {
    padding-left: 22px;
}

/* Responsividade */

@media (max-width: 960px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-info {
        position: static;
    }

    .product-main-image {
        min-height: 420px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .product-gallery {
        display: flex;
        flex-direction: column-reverse;
    }

    .gallery-thumbs {
        flex-direction: row;
        overflow-x: auto;
    }

    .gallery-thumb {
        min-width: 68px;
        width: 68px;
        height: 68px;
    }

    .product-main-image {
        min-height: 330px;
    }

    .product-title {
        font-size: 25px;
    }

    .quantity-header {
        display: none;
    }

    .quantity-row {
        grid-template-columns: 32px 1fr;
    }

    .unit-price,
    .total-price {
        grid-column: 2;
    }

    .specification-row {
        grid-template-columns: 1fr;
    }

    .specification-label {
        padding-bottom: 5px;
    }

    .specification-value {
        padding-top: 5px;
    }
}
