/* pdd-styles.css - Versão ajustada para igualar ao Manus Product Tables */

.pdd-product-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.pdd-product-table {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pdd-product-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.pdd-product-row:last-child {
    border-bottom: none;
}

.pdd-product-image {
    flex-shrink: 0;
    margin-right: 15px;
}

.pdd-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

.pdd-product-info {
    flex: 1;
    min-width: 0;
}

.pdd-product-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.pdd-product-price {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pdd-product-price .woocommerce-Price-amount {
    color: #2c5aa0;
    font-weight: 600;
}

.pdd-product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Seletor de quantidade */
.pdd-quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.pdd-qty-minus,
.pdd-qty-plus {
    background: #f7f7f7;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    transition: background-color 0.2s ease;
}

.pdd-qty-minus:hover,
.pdd-qty-plus:hover {
    background: #e7e7e7;
    color: #333;
}

.pdd-qty-minus:active,
.pdd-qty-plus:active {
    background: #ddd;
}

.pdd-qty-input {
    border: none;
    width: 50px;
    height: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #fff;
    outline: none;
}

/* Botão adicionar ao carrinho (produtos simples) */
.pdd-add-to-cart {
    background: black;
    color: #fff;
    border: 1px solid #ff9500;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    line-height: 1.2;
}

.pdd-add-to-cart:hover {
    background: #e8860a;
    border-color: #e8860a;
    color: #fff;
}

.pdd-add-to-cart:active {
    background: black;
    border-color: #d17a0a;
}

.pdd-add-to-cart:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Botão Ver Opções (YITH Quick View) - sobrescreve estilos padrão */
.yith-wcqv-button {
    background: #ff9500 !important;
    color: #fff !important;
    border: 1px solid #ff9500 !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    line-height: 1.2 !important;
}

.yith-wcqv-button:hover {
    background: #e8860a !important;
    border-color: #e8860a !important;
    color: #fff !important;
}

.yith-wcqv-button:active {
    background: #d17a0a !important;
    border-color: #d17a0a !important;
}

/* Link fallback (caso YITH não esteja ativo) */
.pdd-product-actions a.button {
    background: #ff9500;
    color: #fff;
    border: 1px solid #ff9500;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.pdd-product-actions a.button:hover {
    background: #e8860a;
    border-color: #e8860a;
    color: #fff;
}

/* Fora de estoque */
.pdd-out-of-stock {
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 768px) {
    .pdd-product-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        text-align: left;
    }
    
    .pdd-product-image {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: center;
    }
    
    .pdd-product-info {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .pdd-product-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .pdd-quantity {
        order: 1;
    }
    
    .pdd-add-to-cart,
    .yith-wcqv-button,
    .pdd-product-actions a.button {
        order: 2;
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .pdd-product-wrapper {
        margin: 15px -10px;
    }
    
    .pdd-product-table {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .pdd-product-row {
        padding: 12px 15px;
    }
    
    .pdd-product-image img {
        width: 50px;
        height: 50px;
    }
    
    .pdd-product-title {
        font-size: 15px;
    }
    
    .pdd-product-price {
        font-size: 13px;
    }
    
    .pdd-qty-minus,
    .pdd-qty-plus {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .pdd-qty-input {
        width: 40px;
        height: 28px;
        font-size: 13px;
    }
    
    .pdd-add-to-cart,
    .yith-wcqv-button,
    .pdd-product-actions a.button {
        font-size: 13px;
        padding: 8px 12px;
        min-height: 32px;
    }
}